#include <Md.h>

Public Member Functions | |
| Md (const MdCo &c, const string &name, const string &device, MdType Type, const list< string > &devs, const list< string > &spares) | |
| Md (const MdCo &c, const string &name, const string &device, SystemInfo &systeminfo) | |
| Md (const MdCo &c, const Md &v) | |
| virtual | ~Md () |
| storage::MdType | personality () const |
| void | setPersonality (storage::MdType val) |
| storage::MdParity | parity () const |
| int | setParity (storage::MdParity val) |
| unsigned long | chunkSizeK () const |
| void | setChunkSizeK (unsigned long val) |
| void | setMdUuid (const string &val) |
| bool | destroySb () const |
| void | setDestroySb (bool val=true) |
| const string & | getMdUuid () const |
| list< string > | getDevs (bool all=true, bool spare=false) const |
| int | checkDevices () |
| int | addDevice (const string &dev, bool spare=false) |
| int | removeDevice (const string &dev) |
| string | createCmd () const |
| void | updateData (SystemInfo &systeminfo) |
| void | setUdevData (SystemInfo &systeminfo) |
| virtual list< string > | udevId () const |
| virtual string | procName () const |
| virtual string | sysfsPath () const |
| virtual void | print (std::ostream &s) const |
| Text | removeText (bool doing) const |
| Text | createText (bool doing) const |
| Text | formatText (bool doing) const |
| void | changeDeviceName (const string &old, const string &nw) |
| void | getInfo (storage::MdInfo &info) const |
| bool | equalContent (const Md &rhs) const |
| void | logDifference (std::ostream &log, const Md &rhs) const |
| int | getState (MdStateInfo &info) const |
| bool | updateEntry (EtcMdadm *mdadm) const |
| virtual list< string > | getUsing () const |
Static Public Member Functions | |
| static bool | matchRegex (const string &dev) |
| static unsigned | mdMajor () |
| static bool | mdStringNum (const string &name, unsigned &num) |
| static string | mdDevice (unsigned num) |
| static bool | notDeleted (const Md &l) |
Protected Member Functions | |
| void | computeSize () |
Protected Attributes | |
| MdType | md_type |
| MdParity | md_parity |
| unsigned long | chunk_k |
| string | md_uuid |
| string | md_name |
| string | sb_ver |
| bool | destrSb |
| list< string > | devs |
| list< string > | spare |
| list< string > | udev_id |
| bool | has_container |
| string | parent_container |
| string | parent_uuid |
| string | parent_md_name |
| string | parent_metadata |
| string | parent_member |
| storage::MdInfo | info |
Static Protected Attributes | |
| static unsigned | md_major = 0 |
Private Member Functions | |
| Md (const Md &) | |
| Md & | operator= (const Md &) |
Friends | |
| class | MdPartCo |
| std::ostream & | operator<< (std::ostream &s, const Md &m) |
| storage::Md::Md | ( | const MdCo & | c, | |
| const string & | name, | |||
| const string & | device, | |||
| SystemInfo & | systeminfo | |||
| ) |
References storage::Storage::addUsedBy(), storage::ProcMdstat::Entry::chunk_k, chunk_k, storage::Volume::cont, storage::ProcMdstat::Entry::container_member, storage::ProcMdstat::Entry::container_name, storage::Device::dev, storage::Device::device(), storage::ProcMdstat::Entry::devices, storage::MdadmDetails::devname, devs, storage::Storage::fetchDanglingUsedBy(), storage::ProcMdstat::getEntry(), storage::Device::getMajorMinor(), storage::getMdadmDetails(), storage::SystemInfo::getProcMdstat(), storage::Volume::getStorage(), has_container, storage::ProcMdstat::Entry::has_container, storage::MD, md_name, storage::ProcMdstat::Entry::md_parity, md_parity, storage::ProcMdstat::Entry::md_type, md_type, md_uuid, mdStringNum(), storage::MdadmDetails::metadata, storage::Device::nm, storage::Volume::num, storage::Volume::numeric, parent_container, parent_md_name, parent_member, parent_metadata, parent_uuid, storage::ProcMdstat::Entry::readonly, sb_ver, storage::Volume::setReadonly(), storage::Volume::setSize(), setUdevData(), storage::ProcMdstat::Entry::size_k, spare, storage::ProcMdstat::Entry::spares, storage::ProcMdstat::Entry::super, storage::Container::type(), storage::UB_MD, storage::Device::uby, storage::MdadmDetails::uuid, y2deb, and y2err.
References storage::Device::dev, and y2deb.
| storage::Md::~Md | ( | ) | [virtual] |
References storage::Device::dev, and y2deb.
| storage::Md::Md | ( | const Md & | ) | [private] |
| storage::MdType storage::Md::personality | ( | ) | const [inline] |
References md_type.
| void storage::Md::setPersonality | ( | storage::MdType | val | ) |
References computeSize(), and md_type.
| storage::MdParity storage::Md::parity | ( | ) | const [inline] |
References md_parity.
| int storage::Md::setParity | ( | storage::MdParity | val | ) |
| unsigned long storage::Md::chunkSizeK | ( | ) | const [inline] |
References chunk_k.
| void storage::Md::setChunkSizeK | ( | unsigned long | val | ) | [inline] |
References chunk_k.
| void storage::Md::setMdUuid | ( | const string & | val | ) | [inline] |
| bool storage::Md::destroySb | ( | ) | const [inline] |
References destrSb.
| void storage::Md::setDestroySb | ( | bool | val = true |
) | [inline] |
References destrSb.
| const string& storage::Md::getMdUuid | ( | ) | const [inline] |
References md_uuid.
| list< string > storage::Md::getDevs | ( | bool | all = true, |
|
| bool | spare = false | |||
| ) | const |
| int storage::Md::checkDevices | ( | ) |
References devs, storage::MD_TOO_FEW_DEVICES, storage::MD_TOO_MANY_SPARES, md_type, storage::RAID0, storage::RAID5, storage::RAID6, spare, storage::toString(), and y2mil.
| int storage::Md::addDevice | ( | const string & | dev, | |
| bool | spare = false | |||
| ) |
| int storage::Md::removeDevice | ( | const string & | dev | ) |
| string storage::Md::createCmd | ( | ) | const |
| bool storage::Md::matchRegex | ( | const string & | dev | ) | [static] |
| unsigned storage::Md::mdMajor | ( | ) | [static] |
References storage::getMajorDevices(), md_major, and y2mil.
| void storage::Md::updateData | ( | SystemInfo & | systeminfo | ) |
References storage::ProcMdstat::Entry::chunk_k, chunk_k, storage::ProcMdstat::getEntry(), storage::getMdadmDetails(), storage::SystemInfo::getProcMdstat(), storage::ProcMdstat::Entry::md_parity, md_parity, storage::ProcMdstat::Entry::md_type, md_type, storage::Device::nm, storage::PAR_DEFAULT, setMdUuid(), storage::Volume::setSize(), storage::ProcMdstat::Entry::size_k, storage::toString(), storage::MdadmDetails::uuid, y2err, and y2war.
| void storage::Md::setUdevData | ( | SystemInfo & | systeminfo | ) |
References storage::Device::alt_names, storage::Device::dev, storage::getDirLinks(), storage::SystemInfo::getUdevMap(), storage::Device::nm, udev_id, and y2mil.
Referenced by Md().
| virtual list<string> storage::Md::udevId | ( | ) | const [inline, virtual] |
| virtual string storage::Md::procName | ( | ) | const [inline, virtual] |
| string storage::Md::sysfsPath | ( | ) | const [virtual] |
| bool storage::Md::mdStringNum | ( | const string & | name, | |
| unsigned & | num | |||
| ) | [static] |
References matchRegex(), and storage::undevDevice().
Referenced by storage::Storage::changeMdChunk(), storage::Storage::changeMdParity(), storage::Storage::changeMdType(), storage::Storage::checkMd(), storage::Storage::createMd(), storage::Storage::extendMd(), storage::MdCo::findMd(), storage::Storage::getMdStateInfo(), Md(), storage::Storage::removeMd(), and storage::Storage::shrinkMd().
| string storage::Md::mdDevice | ( | unsigned | num | ) | [static] |
References storage::decString(), and storage::Device::dev.
Referenced by storage::Storage::createMd(), and storage::Storage::createMdAny().
| virtual void storage::Md::print | ( | std::ostream & | s | ) | const [inline, virtual] |
Reimplemented from storage::Volume.
| Text storage::Md::removeText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Device::dev, storage::sformat(), and storage::Device::sizeString().
| Text storage::Md::createText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Device::dev, devs, storage::ENC_NONE, storage::Volume::encryption, storage::Volume::fsTypeString(), storage::Volume::mp, storage::sformat(), and storage::Device::sizeString().
| Text storage::Md::formatText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), storage::Device::dev, storage::ENC_NONE, storage::Volume::encryption, storage::Volume::fsTypeString(), storage::Volume::mp, storage::sformat(), and storage::Device::sizeString().
| static bool storage::Md::notDeleted | ( | const Md & | l | ) | [inline, static] |
References storage::Device::deleted().
Referenced by storage::MdCo::findMd(), storage::Storage::getMdInfo(), storage::MdCo::syncMdadm(), and storage::MdCo::usedNumbers().
| void storage::Md::changeDeviceName | ( | const string & | old, | |
| const string & | nw | |||
| ) |
| void storage::Md::getInfo | ( | storage::MdInfo & | info | ) | const |
References chunk_k, storage::MdInfo::chunkSizeK, storage::MdInfo::devices, devs, storage::Volume::getInfo(), info, md_parity, md_type, md_uuid, storage::MdInfo::nr, storage::Volume::num, storage::MdInfo::parity, sb_ver, storage::MdInfo::sb_ver, spare, storage::MdInfo::spares, storage::MdInfo::type, storage::MdInfo::uuid, and storage::MdInfo::v.
| bool storage::Md::equalContent | ( | const Md & | rhs | ) | const |
| void storage::Md::logDifference | ( | std::ostream & | log, | |
| const Md & | rhs | |||
| ) | const |
| int storage::Md::getState | ( | MdStateInfo & | info | ) | const |
| bool storage::Md::updateEntry | ( | EtcMdadm * | mdadm | ) | const |
References storage::EtcMdadm::mdconf_info::container_member, storage::EtcMdadm::mdconf_info::container_metadata, storage::EtcMdadm::mdconf_info::container_present, storage::EtcMdadm::mdconf_info::container_uuid, storage::Device::dev, storage::EtcMdadm::mdconf_info::device, has_container, info, md_name, md_uuid, parent_member, parent_metadata, parent_uuid, storage::EtcMdadm::updateEntry(), and storage::EtcMdadm::mdconf_info::uuid.
| list< string > storage::Md::getUsing | ( | ) | const [virtual] |
| void storage::Md::computeSize | ( | ) | [protected] |
References storage::Storage::computeMdSize(), devs, storage::Volume::getStorage(), md_type, storage::Volume::setSize(), storage::Device::size_k, and spare.
Referenced by addDevice(), Md(), removeDevice(), and setPersonality().
friend class MdPartCo [friend] |
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const Md & | m | |||
| ) | [friend] |
MdType storage::Md::md_type [protected] |
Referenced by checkDevices(), computeSize(), createCmd(), equalContent(), getInfo(), logDifference(), Md(), storage::operator<<(), personality(), setParity(), setPersonality(), and updateData().
MdParity storage::Md::md_parity [protected] |
Referenced by createCmd(), equalContent(), getInfo(), logDifference(), Md(), storage::operator<<(), parity(), setParity(), and updateData().
unsigned long storage::Md::chunk_k [protected] |
Referenced by chunkSizeK(), createCmd(), equalContent(), getInfo(), logDifference(), Md(), storage::operator<<(), setChunkSizeK(), and updateData().
string storage::Md::md_uuid [protected] |
Referenced by equalContent(), getInfo(), getMdUuid(), logDifference(), Md(), storage::operator<<(), setMdUuid(), and updateEntry().
string storage::Md::md_name [protected] |
Referenced by logDifference(), Md(), storage::operator<<(), and updateEntry().
string storage::Md::sb_ver [protected] |
Referenced by equalContent(), getInfo(), logDifference(), Md(), and storage::operator<<().
bool storage::Md::destrSb [protected] |
Referenced by destroySb(), equalContent(), logDifference(), storage::operator<<(), and setDestroySb().
list<string> storage::Md::devs [protected] |
Referenced by addDevice(), changeDeviceName(), checkDevices(), computeSize(), createCmd(), createText(), equalContent(), getDevs(), getInfo(), getUsing(), logDifference(), Md(), storage::operator<<(), removeDevice(), and setParity().
list<string> storage::Md::spare [protected] |
Referenced by addDevice(), changeDeviceName(), checkDevices(), computeSize(), createCmd(), equalContent(), getDevs(), getInfo(), getUsing(), logDifference(), Md(), storage::operator<<(), and removeDevice().
list<string> storage::Md::udev_id [protected] |
Referenced by setUdevData(), and udevId().
bool storage::Md::has_container [protected] |
Referenced by Md(), and updateEntry().
string storage::Md::parent_container [protected] |
Referenced by logDifference(), and Md().
string storage::Md::parent_uuid [protected] |
Referenced by logDifference(), Md(), and updateEntry().
string storage::Md::parent_md_name [protected] |
Referenced by logDifference(), and Md().
string storage::Md::parent_metadata [protected] |
Referenced by logDifference(), Md(), and updateEntry().
string storage::Md::parent_member [protected] |
Referenced by Md(), and updateEntry().
unsigned storage::Md::md_major = 0 [static, protected] |
Referenced by mdMajor().
storage::MdInfo storage::Md::info [mutable, protected] |
1.5.6