|
yast2-storage
|
#include <MdPartCo.h>
Classes | |
| struct | MdPartCPI |
| struct | MdPartPI |
Public Member Functions | |
| MdPartCo (Storage *s, const string &name, const string &device, SystemInfo &systeminfo) | |
| MdPartCo (const MdPartCo &c) | |
| virtual | ~MdPartCo () |
| const string & | labelName () const |
| virtual list< string > | udevId () const |
| unsigned | numPartitions () const |
| void | setUdevData (SystemInfo &systeminfo) |
| virtual string | procName () const |
| virtual string | sysfsPath () const |
| int | getMdPartCoState (MdPartCoStateInfo &info) const |
| int | createPartition (storage::PartitionType type, long unsigned start, long unsigned len, string &device, bool checkRelaxed=false) |
| int | createPartition (long unsigned len, string &device, bool checkRelaxed=false) |
| int | createPartition (storage::PartitionType type, string &device) |
| int | removePartition (unsigned nr) |
| int | changePartitionId (unsigned nr, unsigned id) |
| int | forgetChangePartitionId (unsigned nr) |
| int | changePartitionArea (unsigned nr, const Region &cylRegion, bool checkRelaxed=false) |
| int | nextFreePartition (storage::PartitionType type, unsigned &nr, string &device) const |
| int | destroyPartitionTable (const string &new_label) |
| int | freeCylindersAroundPartition (const MdPart *p, unsigned long &freeCylsBefore, unsigned long &freeCylsAfter) const |
| int | resizePartition (MdPart *p, unsigned long newCyl) |
| int | resizeVolume (Volume *v, unsigned long long newSize) |
| int | removeVolume (Volume *v) |
| int | removeMdPart () |
| unsigned | maxPrimary () const |
| bool | extendedPossible () const |
| unsigned | maxLogical () const |
| unsigned int | numPrimary () const |
| bool | hasExtended () const |
| unsigned int | numLogical () const |
| void | getUnusedSpace (std::list< Region > &free, bool all=true, bool logical=false) const |
| unsigned long long | cylinderToKb (unsigned long val) const |
| unsigned long | kbToCylinder (unsigned long long val) const |
| string | getPartName (unsigned nr) const |
| string | getPartDevice (unsigned nr) const |
| virtual void | getCommitActions (list< commitAction > &l) const |
| virtual void | getToCommit (CommitStage stage, list< const Container * > &col, list< const Volume * > &vol) const |
| virtual int | commitChanges (storage::CommitStage stage) |
| int | commitChanges (storage::CommitStage stage, Volume *vol) |
| Partition * | getPartition (unsigned nr, bool del) |
| virtual list< string > | getUsing () const |
| void | getInfo (storage::MdPartCoInfo &info) const |
| bool | equalContent (const Container &rhs) const |
| void | logDifference (std::ostream &log, const MdPartCo &rhs) const |
| virtual void | logDifferenceWithVolumes (std::ostream &log, const Container &rhs) const |
| MdPartCo & | operator= (const MdPartCo &rhs) |
| void | syncMdadm (EtcMdadm *mdadm) const |
| unsigned | nr () const |
| unsigned long | chunkSizeK () const |
| storage::MdType | personality () const |
| const string & | getMdUuid () const |
| list< string > | getDevs (bool all=true, bool spare=false) const |
Static Public Member Functions | |
| static storage::CType | staticType () |
| static bool | notDeleted (const MdPartCo &c) |
| static string | undevName (const string &name) |
| static list< string > | getMdRaids (SystemInfo &systeminfo) |
| static void | activate (bool val, const string &tmpDir) |
| static bool | isActive () |
| static bool | hasPartitionTable (const string &name, SystemInfo &systeminfo) |
| static bool | hasFileSystem (const string &name, SystemInfo &systeminfo) |
| static bool | matchRegex (const string &dev) |
| static bool | mdStringNum (const string &name, unsigned &num) |
| static bool | scanForRaid (list< string > &raidNames) |
| static list< string > | filterMdPartCo (const list< string > &raidList, SystemInfo &systeminfo, bool instsys) |
Protected Types | |
| typedef CastIterator< VIter, MdPart * > | MdPartInter |
| typedef CastIterator< CVIter, const MdPart * > | MdPartCInter |
| typedef CheckFnc< const MdPart > | CheckFncMdPart |
| typedef CheckerIterator < CheckFncMdPart, MdPartPI < CheckFncMdPart >::type, MdPartInter, MdPart > | MdPartPIterator |
| typedef CheckerIterator < CheckFncMdPart, MdPartCPI < CheckFncMdPart >::type, MdPartCInter, const MdPart > | MdPartCPIterator |
| typedef DerefIterator < MdPartPIterator, MdPart > | MdPartIter |
| typedef DerefIterator < MdPartCPIterator, const MdPart > | ConstMdPartIter |
| typedef IterPair< MdPartIter > | MdPartPair |
| typedef IterPair< ConstMdPartIter > | ConstMdPartPair |
Protected Member Functions | |
| MdPartPair | mdpartPair (bool(*CheckMdPart)(const MdPart &)=NULL) |
| MdPartIter | mdpartBegin (bool(*CheckMdPart)(const MdPart &)=NULL) |
| MdPartIter | mdpartEnd (bool(*CheckMdPart)(const MdPart &)=NULL) |
| ConstMdPartPair | mdpartPair (bool(*CheckMdPart)(const MdPart &)=NULL) const |
| ConstMdPartIter | mdpartBegin (bool(*CheckMdPart)(const MdPart &)=NULL) const |
| ConstMdPartIter | mdpartEnd (bool(*CheckMdPart)(const MdPart &)=NULL) const |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| void | activate_part (bool val) |
| void | init (SystemInfo &systeminfo) |
| void | createDisk (SystemInfo &systeminfo) |
| void | getVolumes (const ProcParts &ppart) |
| void | updatePointers (bool invalid=false) |
| void | updateMinor () |
| virtual void | newP (MdPart *&dm, unsigned num, Partition *p) |
| int | addNewDev (string &device) |
| int | updateDelDev () |
| void | handleWholeDevice () |
| void | removeFromMemory () |
| void | removePresentPartitions () |
| bool | validPartition (const Partition *p) |
| bool | findMdPart (unsigned nr, MdPartIter &i) |
| bool | updateEntry (EtcMdadm *mdadm) const |
| int | doCreate (Volume *v) |
| int | doRemove (Volume *v) |
| int | doResize (Volume *v) |
| int | doSetType (MdPart *v) |
| int | doCreateLabel () |
| virtual int | doRemove () |
| virtual Text | removeText (bool doing) const |
| virtual Text | setDiskLabelText (bool doing) const |
| void | initMd (SystemInfo &systeminfo) |
| void | setSize (unsigned long long size) |
| bool | isMdPart (const string &name) const |
| void | getPartNum (const string &device, unsigned &num) const |
| void | unuseDevs () const |
Static Protected Member Functions | |
| static CType | envSelection (const string &name) |
| static bool | havePartsInProc (const string &name, SystemInfo &systeminfo) |
Protected Attributes | |
| Disk * | disk |
| 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::MdPartCoInfo | info |
Static Protected Attributes | |
| static bool | active = false |
Friends | |
| class | Storage |
| class | Md |
| std::ostream & | operator<< (std::ostream &, const MdPartCo &) |
typedef CheckFnc<const MdPart> storage::MdPartCo::CheckFncMdPart [protected] |
typedef DerefIterator<MdPartCPIterator,const MdPart> storage::MdPartCo::ConstMdPartIter [protected] |
typedef IterPair<ConstMdPartIter> storage::MdPartCo::ConstMdPartPair [protected] |
typedef CastIterator<CVIter, const MdPart *> storage::MdPartCo::MdPartCInter [protected] |
typedef CheckerIterator< CheckFncMdPart, MdPartCPI<CheckFncMdPart>::type, MdPartCInter, const MdPart > storage::MdPartCo::MdPartCPIterator [protected] |
typedef CastIterator<VIter, MdPart *> storage::MdPartCo::MdPartInter [protected] |
typedef DerefIterator<MdPartPIterator,MdPart> storage::MdPartCo::MdPartIter [protected] |
typedef IterPair<MdPartIter> storage::MdPartCo::MdPartPair [protected] |
typedef CheckerIterator< CheckFncMdPart, MdPartPI<CheckFncMdPart>::type, MdPartInter, MdPart > storage::MdPartCo::MdPartPIterator [protected] |
| storage::MdPartCo::MdPartCo | ( | Storage * | s, |
| const string & | name, | ||
| const string & | device, | ||
| SystemInfo & | systeminfo | ||
| ) |
References storage::Device::dev, storage::Device::getMajorMinor(), init(), initMd(), setUdevData(), and y2deb.
Referenced by getCopy().
| storage::MdPartCo::MdPartCo | ( | const MdPartCo & | c | ) |
| storage::MdPartCo::~MdPartCo | ( | ) | [virtual] |
References storage::Device::dev, disk, and y2deb.
| void storage::MdPartCo::activate | ( | bool | val, |
| const string & | tmpDir | ||
| ) | [static] |
References active.
Referenced by storage::Storage::activateHld(), storage::Storage::detectObjects(), storage::MdCo::doRemove(), and storage::Storage::rescanEverything().
| void storage::MdPartCo::activate_part | ( | bool | val | ) | [protected] |
Referenced by doCreate(), and doResize().
| int storage::MdPartCo::addNewDev | ( | string & | device | ) | [protected] |
References storage::Container::addToList(), storage::MdPart::addUdevData(), storage::IterPair< Iter >::begin(), storage::Device::dev, storage::IterPair< Iter >::end(), storage::Volume::getFsInfo(), getPartDevice(), getPartition(), getPartNum(), handleWholeDevice(), isMdPart(), storage::MD_PARTITION_NOT_FOUND, storage::MDPART_PARTITION_NOT_FOUND, mdpartPair(), newP(), storage::Volume::nr(), storage::Device::setCreated(), storage::Volume::setCryptPwd(), y2mil, and y2war.
Referenced by createPartition().
| int storage::MdPartCo::changePartitionArea | ( | unsigned | nr, |
| const Region & | cylRegion, | ||
| bool | checkRelaxed = false |
||
| ) |
References storage::Disk::changePartitionArea(), disk, findMdPart(), storage::MDPART_PARTITION_NOT_FOUND, and y2mil.
Referenced by storage::Storage::updatePartitionArea().
| int storage::MdPartCo::changePartitionId | ( | unsigned | nr, |
| unsigned | id | ||
| ) |
References storage::Disk::changePartitionId(), disk, storage::MDPART_PARTITION_NOT_FOUND, and y2mil.
Referenced by storage::Storage::changePartitionId().
| unsigned long storage::MdPartCo::chunkSizeK | ( | ) | const [inline] |
References chunk_k.
| int storage::MdPartCo::commitChanges | ( | storage::CommitStage | stage | ) | [virtual] |
Reimplemented from storage::Container.
References storage::DECREASE, storage::Disk::del_ptable, storage::Device::deleted(), disk, doCreateLabel(), doRemove(), storage::MDPART_COMMIT_NOTHING_TODO, storage::Device::name(), and y2mil.
Referenced by commitChanges().
| int storage::MdPartCo::commitChanges | ( | storage::CommitStage | stage, |
| Volume * | vol | ||
| ) | [virtual] |
Reimplemented from storage::Container.
References commitChanges(), disk, doSetType(), storage::MdPart::getPtr(), storage::INCREASE, storage::MDPART_INVALID_VOLUME, storage::Device::name(), storage::Partition::toChangeId(), and y2mil.
| void storage::MdPartCo::createDisk | ( | SystemInfo & | systeminfo | ) | [protected] |
| int storage::MdPartCo::createPartition | ( | long unsigned | len, |
| string & | device, | ||
| bool | checkRelaxed = false |
||
| ) |
| int storage::MdPartCo::createPartition | ( | storage::PartitionType | type, |
| long unsigned | start, | ||
| long unsigned | len, | ||
| string & | device, | ||
| bool | checkRelaxed = false |
||
| ) |
| int storage::MdPartCo::createPartition | ( | storage::PartitionType | type, |
| string & | device | ||
| ) |
| unsigned long long storage::MdPartCo::cylinderToKb | ( | unsigned long | val | ) | const [inline] |
References storage::Disk::cylinderToKb(), and disk.
| int storage::MdPartCo::destroyPartitionTable | ( | const string & | new_label | ) |
References storage::Disk::destroyPartitionTable(), storage::Device::device(), disk, storage::Storage::getRecursiveRemoval(), storage::Container::getStorage(), storage::Device::getUsedBy(), storage::Device::isUsedBy(), storage::Storage::removeUsing(), storage::Storage::removeVolume(), storage::Container::ronly, storage::Storage::setRecursiveRemoval(), storage::Container::vols, and y2mil.
| int storage::MdPartCo::doCreate | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References activate_part(), active, disk, storage::Disk::doCreate(), doSetType(), storage::EXTENDED, storage::Container::getStorage(), storage::Partition::id(), storage::Partition::ID_LINUX, storage::MDPART_INTERNAL_ERR, storage::MDPART_INVALID_VOLUME, storage::MDPART_PARTITION_NOT_FOUND, storage::Device::name(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Partition::type(), updateMinor(), storage::Storage::waitForDevice(), and y2mil.
| int storage::MdPartCo::doCreateLabel | ( | ) | [protected] |
References storage::Device::device(), disk, storage::Disk::doCreateLabel(), storage::Container::getStorage(), handleWholeDevice(), labelName(), storage::Storage::removeDmMapsTo(), removeFromMemory(), removePresentPartitions(), setDiskLabelText(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Storage::waitForDevice(), and y2mil.
Referenced by commitChanges().
| int storage::MdPartCo::doRemove | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References disk, storage::Disk::doRemove(), storage::Container::getStorage(), storage::MDPART_INTERNAL_ERR, storage::MDPART_INVALID_VOLUME, storage::MDPART_PARTITION_NOT_FOUND, storage::MDPART_REMOVE_PARTITION_LIST_ERASE, storage::Device::name(), storage::Volume::prepareRemove(), storage::Container::removeFromList(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Storage::waitForDevice(), y2err, y2mil, and y2war.
| int storage::MdPartCo::doRemove | ( | ) | [protected, virtual] |
References storage::Device::deleted(), destrSb, storage::Device::device(), disk, storage::SystemCmd::execute(), findMdPart(), getDevs(), storage::Storage::getMdadm(), getMdUuid(), storage::Container::getStorage(), storage::MD_REMOVE_FAILED, MDADMBIN, storage::MDPART_NO_REMOVE, storage::Device::name(), storage::Disk::numPartitions(), storage::quote(), storage::EtcMdadm::removeEntry(), removeText(), storage::SystemCmd::retcode(), sb_ver, storage::Container::setExtError(), storage::Storage::showInfoCb(), storage::Device::silent, y2err, and y2mil.
Referenced by commitChanges(), and removePresentPartitions().
| int storage::MdPartCo::doResize | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References activate_part(), active, disk, storage::Disk::doResize(), storage::FSNONE, storage::Container::getStorage(), storage::MDPART_INTERNAL_ERR, storage::MDPART_INVALID_VOLUME, storage::MDPART_PARTITION_NOT_FOUND, storage::Device::name(), storage::Storage::showInfoCb(), storage::Device::silent, updateMinor(), storage::VFAT, storage::Storage::waitForDevice(), and y2mil.
| int storage::MdPartCo::doSetType | ( | MdPart * | v | ) | [protected] |
References disk, storage::Disk::doSetType(), storage::MdPart::getPtr(), storage::Container::getStorage(), storage::MDPART_PARTITION_NOT_FOUND, storage::Device::name(), storage::MdPart::setTypeText(), storage::Storage::showInfoCb(), storage::Device::silent, and y2mil.
Referenced by commitChanges(), and doCreate().
| CType storage::MdPartCo::envSelection | ( | const string & | name | ) | [static, protected] |
References storage::classic(), storage::CUNKNOWN, storage::MD, storage::MDPART, and str.
Referenced by filterMdPartCo().
| bool storage::MdPartCo::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References active, storage::IterPair< Iter >::begin(), chunk_k, destrSb, devs, storage::IterPair< Iter >::end(), has_container, md_name, md_parity, md_type, md_uuid, mdpartPair(), parent_container, parent_md_name, parent_metadata, parent_uuid, sb_ver, and spare.
| bool storage::MdPartCo::extendedPossible | ( | ) | const [inline] |
References disk, and storage::Disk::extendedPossible().
| list< string > storage::MdPartCo::filterMdPartCo | ( | const list< string > & | raidList, |
| SystemInfo & | systeminfo, | ||
| bool | instsys | ||
| ) | [static] |
References envSelection(), hasFileSystem(), hasPartitionTable(), havePartsInProc(), storage::MD, storage::MDPART, and y2mil.
Referenced by storage::Storage::detectMdParts().
| bool storage::MdPartCo::findMdPart | ( | unsigned | nr, |
| MdPartIter & | i | ||
| ) | [protected] |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), mdpartPair(), storage::MdPart::notDeleted(), and nr().
Referenced by changePartitionArea(), doRemove(), and handleWholeDevice().
| int storage::MdPartCo::forgetChangePartitionId | ( | unsigned | nr | ) |
References disk, storage::Disk::forgetChangePartitionId(), storage::MDPART_PARTITION_NOT_FOUND, and y2mil.
Referenced by storage::Storage::forgetChangePartitionId().
| int storage::MdPartCo::freeCylindersAroundPartition | ( | const MdPart * | p, |
| unsigned long & | freeCylsBefore, | ||
| unsigned long & | freeCylsAfter | ||
| ) | const |
| void storage::MdPartCo::getCommitActions | ( | list< commitAction > & | l | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::DECREASE, storage::Disk::del_ptable, storage::Device::deleted(), disk, removeText(), setDiskLabelText(), staticType(), and y2mil.
| virtual Container* storage::MdPartCo::getCopy | ( | ) | const [inline, protected, virtual] |
Implements storage::Container.
References MdPartCo().
| list< string > storage::MdPartCo::getDevs | ( | bool | all = true, |
| bool | spare = false |
||
| ) | const |
Referenced by doRemove(), and unuseDevs().
| void storage::MdPartCo::getInfo | ( | storage::MdPartCoInfo & | info | ) | const |
References chunk_k, storage::MdPartCoInfo::chunkSizeK, storage::MdPartCoInfo::d, storage::MdPartCoInfo::devices, devs, disk, storage::Disk::getInfo(), info, md_parity, md_type, md_uuid, storage::Device::mnr, storage::MdPartCoInfo::nr, storage::MdPartCoInfo::parity, sb_ver, storage::MdPartCoInfo::sb_ver, spare, storage::MdPartCoInfo::spares, storage::MdPartCoInfo::type, and storage::MdPartCoInfo::uuid.
| int storage::MdPartCo::getMdPartCoState | ( | MdPartCoStateInfo & | info | ) | const |
| list< string > storage::MdPartCo::getMdRaids | ( | SystemInfo & | systeminfo | ) | [static] |
References storage::ProcMdstat::begin(), storage::ProcMdstat::end(), and storage::SystemInfo::getProcMdstat().
Referenced by storage::Storage::detectMdParts().
| const string& storage::MdPartCo::getMdUuid | ( | ) | const [inline] |
References md_uuid.
Referenced by doRemove().
| string storage::MdPartCo::getPartDevice | ( | unsigned | nr | ) | const |
References storage::decString(), and storage::Device::dev.
Referenced by addNewDev(), newP(), and nextFreePartition().
| Partition * storage::MdPartCo::getPartition | ( | unsigned | nr, |
| bool | del | ||
| ) |
References storage::IterPair< Iter >::begin(), disk, storage::IterPair< Iter >::end(), storage::Disk::partPair(), and y2mil.
Referenced by addNewDev(), and updatePointers().
| string storage::MdPartCo::getPartName | ( | unsigned | nr | ) | const |
References storage::decString(), and storage::Device::nm.
Referenced by newP().
| void storage::MdPartCo::getPartNum | ( | const string & | device, |
| unsigned & | num | ||
| ) | const [protected] |
References storage::Device::dev, and storage::Device::device().
Referenced by addNewDev().
| void storage::MdPartCo::getToCommit | ( | CommitStage | stage, |
| list< const Container * > & | col, | ||
| list< const Volume * > & | vol | ||
| ) | const [virtual] |
| void storage::MdPartCo::getUnusedSpace | ( | std::list< Region > & | free, |
| bool | all = true, |
||
| bool | logical = false |
||
| ) | const [inline] |
References disk, and storage::Disk::getUnusedSpace().
| list< string > storage::MdPartCo::getUsing | ( | ) | const [virtual] |
Reimplemented from storage::Device.
| void storage::MdPartCo::getVolumes | ( | const ProcParts & | ppart | ) | [protected] |
| void storage::MdPartCo::handleWholeDevice | ( | ) | [protected] |
References storage::Container::addToList(), disk, storage::IterPair< Iter >::empty(), findMdPart(), newP(), storage::Partition::notDeleted(), storage::Disk::partPair(), storage::Container::removeFromList(), storage::Volume::setSize(), storage::Device::size_k, y2err, and y2mil.
Referenced by addNewDev(), doCreateLabel(), getVolumes(), and updateDelDev().
| bool storage::MdPartCo::hasExtended | ( | ) | const [inline] |
References disk, and storage::Disk::hasExtended().
| bool storage::MdPartCo::hasFileSystem | ( | const string & | name, |
| SystemInfo & | systeminfo | ||
| ) | [static] |
References storage::SystemInfo::getBlkid(), storage::Blkid::getEntry(), storage::Blkid::Entry::is_fs, storage::Blkid::Entry::is_luks, storage::Blkid::Entry::is_lvm, and y2mil.
Referenced by filterMdPartCo().
| bool storage::MdPartCo::hasPartitionTable | ( | const string & | name, |
| SystemInfo & | systeminfo | ||
| ) | [static] |
References storage::Parted::getLabel(), storage::SystemInfo::getParted(), and y2mil.
Referenced by filterMdPartCo().
| bool storage::MdPartCo::havePartsInProc | ( | const string & | name, |
| SystemInfo & | systeminfo | ||
| ) | [static, protected] |
References storage::ProcParts::getMatchingEntries(), storage::SystemInfo::getProcParts(), and y2mil.
Referenced by filterMdPartCo().
| void storage::MdPartCo::init | ( | SystemInfo & | systeminfo | ) | [protected] |
References createDisk(), storage::SystemInfo::getProcParts(), storage::ProcParts::getSize(), getVolumes(), storage::Device::nm, procName(), storage::Device::size_k, and y2mil.
Referenced by MdPartCo().
| void storage::MdPartCo::initMd | ( | SystemInfo & | systeminfo | ) | [protected] |
References storage::Storage::addUsedBy(), storage::Device::alt_names, storage::ProcMdstat::Entry::chunk_k, chunk_k, storage::ProcMdstat::Entry::container_member, storage::ProcMdstat::Entry::container_name, storage::Device::dev, storage::ProcMdstat::Entry::devices, storage::MdadmDetails::devname, devs, storage::ProcMdstat::getEntry(), storage::getMdadmDetails(), storage::SystemInfo::getProcMdstat(), storage::Container::getStorage(), has_container, storage::ProcMdstat::Entry::has_container, md_name, storage::ProcMdstat::Entry::md_parity, md_parity, storage::ProcMdstat::Entry::md_type, md_type, md_uuid, storage::MdadmDetails::metadata, storage::Device::nm, parent_container, parent_md_name, parent_member, parent_metadata, parent_uuid, sb_ver, setSize(), storage::ProcMdstat::Entry::size_k, spare, storage::ProcMdstat::Entry::spares, storage::ProcMdstat::Entry::super, storage::UB_MDPART, storage::MdadmDetails::uuid, and y2err.
Referenced by MdPartCo().
| static bool storage::MdPartCo::isActive | ( | ) | [inline, static] |
References active.
| bool storage::MdPartCo::isMdPart | ( | const string & | name | ) | const [protected] |
References storage::Regex::match(), and undevName().
Referenced by addNewDev().
| unsigned long storage::MdPartCo::kbToCylinder | ( | unsigned long long | val | ) | const [inline] |
References disk, and storage::Disk::kbToCylinder().
| const string& storage::MdPartCo::labelName | ( | ) | const [inline] |
References disk, and storage::Disk::labelName().
Referenced by doCreateLabel().
| void storage::MdPartCo::logDifference | ( | std::ostream & | log, |
| const MdPartCo & | rhs | ||
| ) | const |
References active, chunk_k, destrSb, devs, storage::logDiff(), storage::logDiffEnum(), md_name, md_parity, md_type, md_uuid, parent_container, parent_md_name, parent_metadata, parent_uuid, sb_ver, and spare.
Referenced by logDifferenceWithVolumes().
| void storage::MdPartCo::logDifferenceWithVolumes | ( | std::ostream & | log, |
| const Container & | rhs | ||
| ) | const [virtual] |
Implements storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), logDifference(), storage::logVolumesDifference(), and mdpartPair().
| bool storage::MdPartCo::matchRegex | ( | const string & | dev | ) | [static] |
References storage::Regex::match().
Referenced by mdStringNum().
| unsigned storage::MdPartCo::maxLogical | ( | ) | const [inline] |
References disk, and storage::Disk::maxLogical().
| unsigned storage::MdPartCo::maxPrimary | ( | ) | const [inline] |
References disk, and storage::Disk::maxPrimary().
| ConstMdPartIter storage::MdPartCo::mdpartBegin | ( | bool(*)(const MdPart &) | CheckMdPart = NULL | ) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| MdPartIter storage::MdPartCo::mdpartBegin | ( | bool(*)(const MdPart &) | CheckMdPart = NULL | ) | [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
Referenced by mdpartPair().
| MdPartIter storage::MdPartCo::mdpartEnd | ( | bool(*)(const MdPart &) | CheckMdPart = NULL | ) | [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
Referenced by mdpartPair().
| ConstMdPartIter storage::MdPartCo::mdpartEnd | ( | bool(*)(const MdPart &) | CheckMdPart = NULL | ) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| ConstMdPartPair storage::MdPartCo::mdpartPair | ( | bool(*)(const MdPart &) | CheckMdPart = NULL | ) | const [inline, protected] |
References mdpartBegin(), and mdpartEnd().
| MdPartPair storage::MdPartCo::mdpartPair | ( | bool(*)(const MdPart &) | CheckMdPart = NULL | ) | [inline, protected] |
References mdpartBegin(), and mdpartEnd().
Referenced by addNewDev(), equalContent(), findMdPart(), storage::Storage::getRecursiveUsingHelper(), getToCommit(), logDifferenceWithVolumes(), MdPartCo(), removeMdPart(), setUdevData(), updateDelDev(), updateMinor(), and updatePointers().
| bool storage::MdPartCo::mdStringNum | ( | const string & | name, |
| unsigned & | num | ||
| ) | [static] |
References matchRegex(), and storage::undevDevice().
References getPartDevice(), and getPartName().
Referenced by addNewDev(), getVolumes(), and handleWholeDevice().
| int storage::MdPartCo::nextFreePartition | ( | storage::PartitionType | type, |
| unsigned & | nr, | ||
| string & | device | ||
| ) | const |
| static bool storage::MdPartCo::notDeleted | ( | const MdPartCo & | c | ) | [inline, static] |
References storage::Device::deleted().
Referenced by storage::Storage::getMdPartMdNums(), and storage::MdCo::isHandledByMdPart().
| unsigned storage::MdPartCo::nr | ( | ) | const [inline] |
References storage::Device::mnr.
Referenced by findMdPart().
| unsigned int storage::MdPartCo::numLogical | ( | ) | const [inline] |
References disk, and storage::Disk::numLogical().
| unsigned storage::MdPartCo::numPartitions | ( | ) | const [inline] |
References disk, and storage::Disk::numPartitions().
| unsigned int storage::MdPartCo::numPrimary | ( | ) | const [inline] |
References disk, and storage::Disk::numPrimary().
| storage::MdType storage::MdPartCo::personality | ( | ) | const [inline] |
References md_type.
| virtual void storage::MdPartCo::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
| virtual string storage::MdPartCo::procName | ( | ) | const [inline, virtual] |
Reimplemented from storage::Device.
References storage::Device::nm.
Referenced by init(), and sysfsPath().
| void storage::MdPartCo::removeFromMemory | ( | ) | [protected] |
References storage::Container::vols, and y2mil.
Referenced by doCreateLabel().
| int storage::MdPartCo::removeMdPart | ( | ) |
References storage::IterPair< Iter >::begin(), storage::Device::created(), destrSb, storage::IterPair< Iter >::end(), storage::MDPART_CHANGE_READONLY, storage::MDPART_PARTITION_NOT_FOUND, mdpartPair(), storage::MdPart::notDeleted(), storage::Container::readonly(), storage::Container::removeFromList(), removePartition(), storage::Device::setDeleted(), unuseDevs(), y2err, y2mil, and y2war.
| int storage::MdPartCo::removePartition | ( | unsigned | nr | ) |
| void storage::MdPartCo::removePresentPartitions | ( | ) | [protected] |
| Text storage::MdPartCo::removeText | ( | bool | doing | ) | const [protected, virtual] |
Reimplemented from storage::Container.
References storage::_(), storage::Device::name(), and storage::sformat().
Referenced by doRemove(), and getCommitActions().
| int storage::MdPartCo::removeVolume | ( | Volume * | v | ) | [virtual] |
| int storage::MdPartCo::resizePartition | ( | MdPart * | p, |
| unsigned long | newCyl | ||
| ) |
| int storage::MdPartCo::resizeVolume | ( | Volume * | v, |
| unsigned long long | newSize | ||
| ) | [virtual] |
Reimplemented from storage::Container.
References disk, storage::Volume::getFsInfo(), storage::MdPart::getPtr(), storage::MDPART_CHANGE_READONLY, storage::MDPART_INTERNAL_ERR, storage::MDPART_INVALID_VOLUME, storage::MDPART_PARTITION_NOT_FOUND, storage::Volume::nr(), storage::Container::readonly(), storage::Disk::resizeVolume(), storage::MdPart::updateSize(), and y2mil.
| bool storage::MdPartCo::scanForRaid | ( | list< string > & | raidNames | ) | [static] |
References storage::extractNthWord(), storage::SystemCmd::getLine(), MDADMBIN, storage::SystemCmd::numLines(), storage::SystemCmd::retcode(), and y2mil.
Referenced by storage::Storage::discoverMdPVols().
| Text storage::MdPartCo::setDiskLabelText | ( | bool | doing | ) | const [protected, virtual] |
References disk, and storage::Disk::setDiskLabelText().
Referenced by doCreateLabel(), and getCommitActions().
| void storage::MdPartCo::setSize | ( | unsigned long long | size | ) | [protected] |
References storage::Device::size_k.
Referenced by initMd().
| void storage::MdPartCo::setUdevData | ( | SystemInfo & | systeminfo | ) |
References storage::Device::alt_names, storage::IterPair< Iter >::begin(), storage::Device::dev, disk, storage::IterPair< Iter >::end(), storage::UdevMap::end(), storage::UdevMap::find(), storage::SystemInfo::getUdevMap(), mdpartPair(), storage::Device::nm, storage::Disk::setUdevData(), udev_id, and y2mil.
Referenced by MdPartCo().
| static storage::CType storage::MdPartCo::staticType | ( | ) | [inline, static] |
Reimplemented from storage::Container.
References storage::MDPART.
Referenced by getCommitActions().
| void storage::MdPartCo::syncMdadm | ( | EtcMdadm * | mdadm | ) | const |
References updateEntry().
| string storage::MdPartCo::sysfsPath | ( | ) | const [virtual] |
Reimplemented from storage::Device.
References procName(), and SYSFSDIR.
Referenced by getMdPartCoState().
| virtual list<string> storage::MdPartCo::udevId | ( | ) | const [inline, virtual] |
Reimplemented from storage::Device.
References udev_id.
| string storage::MdPartCo::undevName | ( | const string & | name | ) | [static] |
References storage::Device::name().
Referenced by storage::Storage::findMdPartCo(), and isMdPart().
| void storage::MdPartCo::unuseDevs | ( | ) | const [protected] |
References storage::Storage::clearUsedBy(), getDevs(), and storage::Container::getStorage().
Referenced by removeMdPart().
| int storage::MdPartCo::updateDelDev | ( | ) | [protected] |
References storage::IterPair< Iter >::begin(), storage::Device::deleted(), storage::IterPair< Iter >::end(), handleWholeDevice(), storage::MDPART_PARTITION_NOT_FOUND, mdpartPair(), storage::Volume::nr(), storage::Container::removeFromList(), validPartition(), and y2mil.
Referenced by removePartition(), and removeVolume().
| bool storage::MdPartCo::updateEntry | ( | EtcMdadm * | mdadm | ) | const [protected] |
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.
Referenced by syncMdadm().
| void storage::MdPartCo::updateMinor | ( | ) | [protected] |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), and mdpartPair().
Referenced by doCreate(), and doResize().
| void storage::MdPartCo::updatePointers | ( | bool | invalid = false | ) | [protected] |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), getPartition(), and mdpartPair().
Referenced by MdPartCo().
| bool storage::MdPartCo::validPartition | ( | const Partition * | p | ) | [protected] |
References storage::IterPair< Iter >::begin(), disk, storage::IterPair< Iter >::end(), storage::Volume::nr(), storage::Disk::partPair(), and y2mil.
Referenced by updateDelDev().
friend class Md [friend] |
| std::ostream& operator<< | ( | std::ostream & | s, |
| const MdPartCo & | d | ||
| ) | [friend] |
friend class Storage [friend] |
Reimplemented from storage::Container.
bool storage::MdPartCo::active = false [static, protected] |
Referenced by activate(), doCreate(), doResize(), equalContent(), isActive(), and logDifference().
unsigned long storage::MdPartCo::chunk_k [protected] |
Referenced by chunkSizeK(), equalContent(), getInfo(), initMd(), logDifference(), and storage::operator<<().
bool storage::MdPartCo::destrSb [protected] |
Referenced by doRemove(), equalContent(), logDifference(), storage::operator<<(), and removeMdPart().
list<string> storage::MdPartCo::devs [protected] |
Referenced by equalContent(), getDevs(), getInfo(), getUsing(), initMd(), logDifference(), and storage::operator<<().
Disk* storage::MdPartCo::disk [protected] |
Referenced by changePartitionArea(), changePartitionId(), commitChanges(), createDisk(), createPartition(), cylinderToKb(), destroyPartitionTable(), doCreate(), doCreateLabel(), doRemove(), doResize(), doSetType(), extendedPossible(), forgetChangePartitionId(), freeCylindersAroundPartition(), getCommitActions(), getInfo(), getPartition(), getToCommit(), getUnusedSpace(), getVolumes(), handleWholeDevice(), hasExtended(), kbToCylinder(), labelName(), maxLogical(), maxPrimary(), MdPartCo(), nextFreePartition(), numLogical(), numPartitions(), numPrimary(), storage::operator<<(), removePartition(), removeVolume(), resizePartition(), resizeVolume(), setDiskLabelText(), setUdevData(), validPartition(), and ~MdPartCo().
bool storage::MdPartCo::has_container [protected] |
Referenced by equalContent(), initMd(), and updateEntry().
storage::MdPartCoInfo storage::MdPartCo::info [mutable, protected] |
Reimplemented from storage::Container.
Referenced by getInfo(), and updateEntry().
string storage::MdPartCo::md_name [protected] |
Referenced by equalContent(), initMd(), logDifference(), storage::operator<<(), and updateEntry().
MdParity storage::MdPartCo::md_parity [protected] |
Referenced by equalContent(), getInfo(), initMd(), logDifference(), and storage::operator<<().
MdType storage::MdPartCo::md_type [protected] |
Referenced by equalContent(), getInfo(), initMd(), logDifference(), storage::operator<<(), and personality().
string storage::MdPartCo::md_uuid [protected] |
Referenced by equalContent(), getInfo(), getMdUuid(), initMd(), logDifference(), storage::operator<<(), and updateEntry().
string storage::MdPartCo::parent_container [protected] |
Referenced by equalContent(), initMd(), and logDifference().
string storage::MdPartCo::parent_md_name [protected] |
Referenced by equalContent(), initMd(), and logDifference().
string storage::MdPartCo::parent_member [protected] |
Referenced by initMd(), and updateEntry().
string storage::MdPartCo::parent_metadata [protected] |
Referenced by equalContent(), initMd(), logDifference(), and updateEntry().
string storage::MdPartCo::parent_uuid [protected] |
Referenced by equalContent(), initMd(), logDifference(), and updateEntry().
string storage::MdPartCo::sb_ver [protected] |
Referenced by doRemove(), equalContent(), getInfo(), initMd(), logDifference(), and storage::operator<<().
list<string> storage::MdPartCo::spare [protected] |
Referenced by equalContent(), getDevs(), getInfo(), getUsing(), initMd(), logDifference(), and storage::operator<<().
list<string> storage::MdPartCo::udev_id [protected] |
Referenced by setUdevData(), and udevId().
1.7.3