|
yast2-storage
|
#include <MdCo.h>
Classes | |
| struct | MdCPI |
| struct | MdPI |
Public Member Functions | |
| MdCo (Storage *const s) | |
| MdCo (Storage *const s, SystemInfo &systeminfo) | |
| MdCo (const MdCo &c) | |
| virtual | ~MdCo () |
| int | createMd (unsigned num, MdType type, const list< string > &devs, const list< string > &spares) |
| int | removeMd (unsigned num, bool destroySb=true) |
| int | extendMd (unsigned num, const list< string > &devs, const list< string > &spares) |
| int | updateMd (unsigned num, const list< string > &devs, const list< string > &spares) |
| int | shrinkMd (unsigned num, const list< string > &devs, const list< string > &spares) |
| int | changeMdType (unsigned num, storage::MdType ptype) |
| int | changeMdChunk (unsigned num, unsigned long chunk) |
| int | changeMdParity (unsigned num, storage::MdParity ptype) |
| int | checkMd (unsigned num) |
| int | getMdState (unsigned num, MdStateInfo &info) |
| bool | equalContent (const Container &rhs) const |
| virtual void | logDifferenceWithVolumes (std::ostream &log, const Container &rhs) const |
| void | syncMdadm (EtcMdadm *mdadm) const |
| void | changeDeviceName (const string &old, const string &nw) |
| int | removeVolume (Volume *v) |
| list< unsigned > | usedNumbers () const |
Static Public Member Functions | |
| static storage::CType | staticType () |
| static void | activate (bool val, const string &tmpDir) |
Protected Types | |
| typedef CastIterator< VIter, Md * > | MdInter |
| typedef CastIterator< CVIter, const Md * > | MdCInter |
| typedef CheckFnc< const Md > | CheckFncMd |
| typedef CheckerIterator < CheckFncMd, MdPI< CheckFncMd > ::type, MdInter, Md > | MdPIterator |
| typedef CheckerIterator < CheckFncMd, MdCPI < CheckFncMd >::type, MdCInter, const Md > | MdCPIterator |
| typedef DerefIterator < MdPIterator, Md > | MdIter |
| typedef DerefIterator < MdCPIterator, const Md > | ConstMdIter |
| typedef IterPair< MdIter > | MdPair |
| typedef IterPair< ConstMdIter > | ConstMdPair |
Protected Member Functions | |
| MdPair | mdPair (bool(*Check)(const Md &)=NULL) |
| MdIter | mdBegin (bool(*Check)(const Md &)=NULL) |
| MdIter | mdEnd (bool(*Check)(const Md &)=NULL) |
| ConstMdPair | mdPair (bool(*Check)(const Md &)=NULL) const |
| ConstMdIter | mdBegin (bool(*Check)(const Md &)=NULL) const |
| ConstMdIter | mdEnd (bool(*Check)(const Md &)=NULL) const |
| bool | findMd (unsigned num, MdIter &i) |
| bool | findMd (unsigned num) |
| bool | findMd (const string &dev, MdIter &i) |
| bool | findMd (const string &dev) |
| int | checkUse (const list< string > &dev, const list< string > &spares) const |
| void | addMd (Md *m) |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| int | doCreate (Volume *v) |
| int | doRemove (Volume *v) |
| bool | isHandledByMdPart (const string &name) const |
Static Protected Attributes | |
| static bool | active = false |
Private Member Functions | |
| MdCo & | operator= (const MdCo &) |
Friends | |
| class | Storage |
| std::ostream & | operator<< (std::ostream &, const MdCo &) |
typedef CheckFnc<const Md> storage::MdCo::CheckFncMd [protected] |
typedef DerefIterator<MdCPIterator,const Md> storage::MdCo::ConstMdIter [protected] |
typedef IterPair<ConstMdIter> storage::MdCo::ConstMdPair [protected] |
typedef CastIterator<CVIter, const Md *> storage::MdCo::MdCInter [protected] |
typedef CheckerIterator< CheckFncMd, MdCPI<CheckFncMd>::type, MdCInter, const Md > storage::MdCo::MdCPIterator [protected] |
typedef CastIterator<VIter, Md *> storage::MdCo::MdInter [protected] |
typedef DerefIterator<MdPIterator,Md> storage::MdCo::MdIter [protected] |
typedef IterPair<MdIter> storage::MdCo::MdPair [protected] |
typedef CheckerIterator< CheckFncMd, MdPI<CheckFncMd>::type, MdInter, Md > storage::MdCo::MdPIterator [protected] |
| storage::MdCo::MdCo | ( | Storage *const | s, |
| SystemInfo & | systeminfo | ||
| ) |
| storage::MdCo::MdCo | ( | const MdCo & | c | ) |
| storage::MdCo::~MdCo | ( | ) | [virtual] |
References y2deb.
| void storage::MdCo::activate | ( | bool | val, |
| const string & | tmpDir | ||
| ) | [static] |
References storage::SystemCmd::execute(), storage::AsciiFile::logContent(), MDADMBIN, storage::Storage::waitForDevice(), and y2mil.
Referenced by storage::Storage::detectObjects(), and storage::Storage::rescanEverything().
| void storage::MdCo::addMd | ( | Md * | m | ) | [protected] |
References storage::Volume::nr(), and y2war.
| void storage::MdCo::changeDeviceName | ( | const string & | old, |
| const string & | nw | ||
| ) | [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), and storage::IterPair< Iter >::end().
| int storage::MdCo::changeMdChunk | ( | unsigned | num, |
| unsigned long | chunk | ||
| ) |
References storage::MD_CHANGE_READONLY, storage::MD_NO_CHANGE_ON_DISK, storage::MD_UNKNOWN_NUMBER, and y2mil.
Referenced by storage::Storage::changeMdChunk().
| int storage::MdCo::changeMdParity | ( | unsigned | num, |
| storage::MdParity | ptype | ||
| ) |
References storage::MD_CHANGE_READONLY, storage::MD_NO_RESIZE_ON_DISK, storage::MD_UNKNOWN_NUMBER, storage::toString(), and y2mil.
Referenced by storage::Storage::changeMdParity().
| int storage::MdCo::changeMdType | ( | unsigned | num, |
| storage::MdType | ptype | ||
| ) |
References storage::MD_CHANGE_READONLY, storage::MD_NO_CHANGE_ON_DISK, storage::MD_UNKNOWN_NUMBER, storage::toString(), and y2mil.
Referenced by storage::Storage::changeMdType().
| int storage::MdCo::checkMd | ( | unsigned | num | ) |
References storage::MD_DEVICE_UNKNOWN, and y2mil.
Referenced by storage::Storage::checkMd().
| int storage::MdCo::checkUse | ( | const list< string > & | dev, |
| const list< string > & | spares | ||
| ) | const [protected] |
References storage::Volume::canUseDevice(), storage::MD_DEVICE_UNKNOWN, storage::MD_DEVICE_USED, and y2mil.
| int storage::MdCo::createMd | ( | unsigned | num, |
| MdType | type, | ||
| const list< string > & | devs, | ||
| const list< string > & | spares | ||
| ) |
References storage::decString(), storage::MD_CHANGE_READONLY, storage::MD_DUPLICATE_NUMBER, storage::MD_NO_CREATE_UNKNOWN, storage::MD_NUMBER_TOO_LARGE, storage::RAID_UNK, storage::Device::setCreated(), storage::toString(), and y2mil.
Referenced by storage::Storage::createMd(), and storage::Storage::createMdAny().
| int storage::MdCo::doCreate | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References storage::Md::checkDevices(), storage::MD_CREATE_FAILED, storage::MD_CREATE_INVALID_VOLUME, storage::Device::name(), storage::SystemCmd::retcode(), storage::UB_LVM, storage::EtcMdadm::updateEntry(), storage::Storage::waitForDevice(), y2mil, and storage::Storage::zeroDevice().
| int storage::MdCo::doRemove | ( | Volume * | v | ) | [protected, virtual] |
| bool storage::MdCo::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::equalContent(), and mdPair().
| int storage::MdCo::extendMd | ( | unsigned | num, |
| const list< string > & | devs, | ||
| const list< string > & | spares | ||
| ) |
References storage::FSNONE, storage::MD_CHANGE_READONLY, storage::MD_NO_RESIZE_ON_DISK, storage::MD_UNKNOWN_NUMBER, and y2mil.
Referenced by storage::Storage::extendMd().
| bool storage::MdCo::findMd | ( | const string & | dev, |
| MdIter & | i | ||
| ) | [protected] |
References storage::Md::mdStringNum().
| bool storage::MdCo::findMd | ( | unsigned | num, |
| MdIter & | i | ||
| ) | [protected] |
| bool storage::MdCo::findMd | ( | unsigned | num | ) | [protected] |
| bool storage::MdCo::findMd | ( | const string & | dev | ) | [protected] |
| virtual Container* storage::MdCo::getCopy | ( | ) | const [inline, protected, virtual] |
Implements storage::Container.
References MdCo().
| int storage::MdCo::getMdState | ( | unsigned | num, |
| MdStateInfo & | info | ||
| ) |
References storage::MD_STATE_NOT_ON_DISK, storage::MD_UNKNOWN_NUMBER, and y2mil.
Referenced by storage::Storage::getMdStateInfo().
| bool storage::MdCo::isHandledByMdPart | ( | const string & | name | ) | const [protected] |
| void storage::MdCo::logDifferenceWithVolumes | ( | std::ostream & | log, |
| const Container & | rhs | ||
| ) | const [virtual] |
Implements storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::logVolumesDifference(), and mdPair().
References storage::Container::begin(), and storage::Container::end().
Referenced by mdPair().
| ConstMdIter storage::MdCo::mdBegin | ( | bool(*)(const Md &) | Check = NULL | ) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
References storage::Container::begin(), and storage::Container::end().
Referenced by mdPair().
| ConstMdIter storage::MdCo::mdEnd | ( | bool(*)(const Md &) | Check = NULL | ) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
References mdBegin(), and mdEnd().
Referenced by equalContent(), logDifferenceWithVolumes(), and MdCo().
| ConstMdPair storage::MdCo::mdPair | ( | bool(*)(const Md &) | Check = NULL | ) | const [inline, protected] |
| virtual void storage::MdCo::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
| int storage::MdCo::removeMd | ( | unsigned | num, |
| bool | destroySb = true |
||
| ) |
References storage::MD_CHANGE_READONLY, storage::MD_REMOVE_CREATE_NOT_FOUND, storage::MD_REMOVE_USED_BY, storage::MD_UNKNOWN_NUMBER, and y2mil.
Referenced by storage::Storage::removeMd().
| int storage::MdCo::removeVolume | ( | Volume * | v | ) | [virtual] |
Reimplemented from storage::Container.
References storage::MD_REMOVE_INVALID_VOLUME, storage::Device::name(), storage::Volume::nr(), and y2mil.
| int storage::MdCo::shrinkMd | ( | unsigned | num, |
| const list< string > & | devs, | ||
| const list< string > & | spares | ||
| ) |
References storage::MD_CHANGE_READONLY, storage::MD_NO_RESIZE_ON_DISK, storage::MD_UNKNOWN_NUMBER, and y2mil.
Referenced by storage::Storage::shrinkMd().
| static storage::CType storage::MdCo::staticType | ( | ) | [inline, static] |
Reimplemented from storage::Container.
References storage::MD.
| void storage::MdCo::syncMdadm | ( | EtcMdadm * | mdadm | ) | const |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), and storage::Md::notDeleted().
Referenced by storage::Storage::syncMdadm().
| int storage::MdCo::updateMd | ( | unsigned | num, |
| const list< string > & | devs, | ||
| const list< string > & | spares | ||
| ) |
References storage::FSNONE, storage::MD_CHANGE_READONLY, storage::MD_NO_RESIZE_ON_DISK, storage::MD_UNKNOWN_NUMBER, and y2mil.
Referenced by storage::Storage::updateMd().
| list< unsigned > storage::MdCo::usedNumbers | ( | ) | const |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), and storage::Md::notDeleted().
Referenced by storage::Storage::checkMdNumber(), and storage::Storage::nextFreeMd().
| std::ostream& operator<< | ( | std::ostream & | s, |
| const MdCo & | d | ||
| ) | [friend] |
friend class Storage [friend] |
Reimplemented from storage::Container.
bool storage::MdCo::active = false [static, protected] |
1.7.3