#include <MdCo.h>

Public Member Functions | |
| MdCo (Storage *const s, bool detect) | |
| MdCo (const MdCo &rhs) | |
| virtual | ~MdCo () |
| int | createMd (unsigned num, storage::MdType type, const std::list< string > &devs) |
| int | removeMd (unsigned num, bool destroySb=true) |
| int | extendMd (unsigned num, const string &dev) |
| int | shrinkMd (unsigned num, const string &dev) |
| 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 |
| void | logDifference (const Container &d) const |
| unsigned | unusedNumber () |
| void | syncRaidtab () |
| void | changeDeviceName (const string &old, const string &nw) |
| int | removeVolume (Volume *v) |
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 |
| MdCo (Storage *const s, const string &File) | |
| void | getMdData () |
| void | getMdData (unsigned num) |
| 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 string &dev) |
| void | addMd (Md *m) |
| void | checkMd (Md *m) |
| void | updateEntry (const Md *m) |
| void | initTab () |
| void | init () |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| int | doCreate (Volume *v) |
| int | doRemove (Volume *v) |
| void | logData (const string &Dir) |
Protected Attributes | |
| EtcRaidtab * | tab |
Static Protected Attributes | |
| static bool | active = false |
Friends | |
| class | Storage |
| std::ostream & | operator<< (std::ostream &, const MdCo &) |
Classes | |
| struct | MdCPI |
| struct | MdPI |
typedef CastIterator<VIter, Md *> storage::MdCo::MdInter [protected] |
typedef CastIterator<CVIter, const Md *> storage::MdCo::MdCInter [protected] |
typedef CheckFnc<const Md> storage::MdCo::CheckFncMd [protected] |
typedef CheckerIterator< CheckFncMd, MdPI<CheckFncMd>::type, MdInter, Md > storage::MdCo::MdPIterator [protected] |
typedef CheckerIterator< CheckFncMd, MdCPI<CheckFncMd>::type, MdCInter, const Md > storage::MdCo::MdCPIterator [protected] |
typedef DerefIterator<MdPIterator,Md> storage::MdCo::MdIter [protected] |
typedef DerefIterator<MdCPIterator,const Md> storage::MdCo::ConstMdIter [protected] |
typedef IterPair<MdIter> storage::MdCo::MdPair [protected] |
typedef IterPair<ConstMdIter> storage::MdCo::ConstMdPair [protected] |
| MdCo::MdCo | ( | Storage *const | s, | |
| bool | detect | |||
| ) |
| MdCo::MdCo | ( | const MdCo & | rhs | ) |
| storage::MdCo::MdCo | ( | Storage *const | s, | |
| const string & | File | |||
| ) | [protected] |
| static storage::CType storage::MdCo::staticType | ( | ) | [inline, static] |
| int storage::MdCo::createMd | ( | unsigned | num, | |
| storage::MdType | type, | |||
| const std::list< string > & | devs | |||
| ) |
| int MdCo::removeMd | ( | unsigned | num, | |
| bool | destroySb = true | |||
| ) |
References storage::Storage::clearUsedBy(), findMd(), storage::Container::getStorage(), storage::MD_CHANGE_READONLY, storage::MD_REMOVE_CREATE_NOT_FOUND, storage::MD_REMOVE_USED_BY, storage::MD_UNKNOWN_NUMBER, storage::Container::readonly(), storage::Container::removeFromList(), storage::UB_NONE, y2mil, and y2milestone.
Referenced by removeVolume().
| int storage::MdCo::extendMd | ( | unsigned | num, | |
| const string & | dev | |||
| ) |
| int storage::MdCo::shrinkMd | ( | unsigned | num, | |
| const string & | dev | |||
| ) |
| int MdCo::changeMdType | ( | unsigned | num, | |
| storage::MdType | ptype | |||
| ) |
| int MdCo::changeMdChunk | ( | unsigned | num, | |
| unsigned long | chunk | |||
| ) |
| int MdCo::changeMdParity | ( | unsigned | num, | |
| storage::MdParity | ptype | |||
| ) |
| int MdCo::checkMd | ( | unsigned | num | ) |
| int MdCo::getMdState | ( | unsigned | num, | |
| MdStateInfo & | info | |||
| ) |
References findMd(), storage::MD_STATE_NOT_ON_DISK, storage::MD_UNKNOWN_NUMBER, and y2milestone.
| bool MdCo::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::Container::equalContent(), and mdPair().
| void MdCo::logDifference | ( | const Container & | d | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::Container::getDiffString(), mdPair(), and y2mil.
| unsigned MdCo::unusedNumber | ( | ) |
References findMd().
| void MdCo::syncRaidtab | ( | ) |
| void storage::MdCo::changeDeviceName | ( | const string & | old, | |
| const string & | nw | |||
| ) | [virtual] |
Reimplemented from storage::Container.
| static void storage::MdCo::activate | ( | bool | val, | |
| const string & | tmpDir | |||
| ) | [static] |
Referenced by storage::Storage::activateHld(), storage::Storage::detectObjects(), and doRemove().
| int MdCo::removeVolume | ( | Volume * | v | ) | [virtual] |
Reimplemented from storage::Container.
References storage::MD_REMOVE_INVALID_VOLUME, storage::Volume::name(), storage::Volume::nr(), removeMd(), and y2milestone.
References mdBegin(), and mdEnd().
Referenced by equalContent(), findMd(), getMdData(), logDifference(), MdCo(), and syncRaidtab().
| ConstMdPair storage::MdCo::mdPair | ( | bool(*)(const Md &) | Check = NULL |
) | const [inline, protected] |
| ConstMdIter storage::MdCo::mdBegin | ( | bool(*)(const Md &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| ConstMdIter storage::MdCo::mdEnd | ( | bool(*)(const Md &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| void MdCo::getMdData | ( | ) | [protected] |
References addMd(), storage::IterPair< Iter >::begin(), storage::classic(), storage::decString(), storage::Container::device(), storage::IterPair< Iter >::end(), storage::extractNthWord(), findMd(), getline(), storage::Container::getStorage(), mdPair(), storage::Md::mdStringNum(), storage::normalizeDevice(), storage::Md::notDeleted(), storage::Storage::setUsedBy(), storage::UB_MD, y2mil, y2milestone, and y2warning.
Referenced by doCreate(), and MdCo().
| void MdCo::getMdData | ( | unsigned | num | ) | [protected] |
References checkMd(), storage::classic(), storage::decString(), storage::extractNthWord(), getline(), y2mil, and y2milestone.
| bool MdCo::findMd | ( | unsigned | num, | |
| MdIter & | i | |||
| ) | [protected] |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), mdPair(), and storage::Md::notDeleted().
Referenced by addMd(), changeMdChunk(), changeMdParity(), changeMdType(), checkMd(), findMd(), getMdData(), getMdState(), removeMd(), and unusedNumber().
| bool MdCo::findMd | ( | unsigned | num | ) | [protected] |
References findMd().
| bool storage::MdCo::findMd | ( | const string & | dev, | |
| MdIter & | i | |||
| ) | [protected] |
| bool storage::MdCo::findMd | ( | const string & | dev | ) | [protected] |
| int storage::MdCo::checkUse | ( | const string & | dev | ) | [protected] |
| void MdCo::addMd | ( | Md * | m | ) | [protected] |
References storage::Container::addToList(), findMd(), storage::Volume::nr(), and y2warning.
Referenced by getMdData().
| void MdCo::checkMd | ( | Md * | m | ) | [protected] |
| void MdCo::updateEntry | ( | const Md * | m | ) | [protected] |
References storage::Md::getDevs(), initTab(), storage::Md::mdadmLine(), storage::Volume::nr(), storage::Md::raidtabLines(), tab, and storage::EtcRaidtab::updateEntry().
Referenced by doCreate(), and syncRaidtab().
| void MdCo::initTab | ( | ) | [protected] |
References storage::Container::getStorage(), and tab.
Referenced by doRemove(), init(), and updateEntry().
| void MdCo::init | ( | ) | [protected] |
References initTab(), storage::Md::mdMajor(), storage::Container::mjr, and tab.
Referenced by MdCo().
| virtual void storage::MdCo::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
| virtual Container* storage::MdCo::getCopy | ( | ) | const [inline, protected, virtual] |
| int MdCo::doCreate | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References getMdData(), storage::Container::getStorage(), storage::MD_CREATE_FAILED, storage::MD_CREATE_INVALID_VOLUME, storage::Volume::name(), storage::Storage::removeDmTableTo(), storage::SystemCmd::retcode(), storage::Container::setExtError(), storage::Storage::showInfoCb(), storage::Container::silent, storage::UB_LVM, updateEntry(), storage::Storage::waitForDevice(), y2mil, y2milestone, and storage::Storage::zeroDevice().
| int MdCo::doRemove | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References activate(), active, storage::SystemCmd::execute(), storage::Container::getStorage(), initTab(), storage::MD_NOT_IN_LIST, storage::MD_REMOVE_FAILED, storage::MD_REMOVE_INVALID_VOLUME, MDADMBIN, storage::Volume::name(), storage::quote(), storage::EtcRaidtab::removeEntry(), storage::Container::removeFromList(), storage::Container::setExtError(), storage::Storage::showInfoCb(), storage::Container::silent, tab, y2mil, and y2milestone.
| void storage::MdCo::logData | ( | const string & | Dir | ) | [protected, virtual] |
Reimplemented from storage::Container.
friend class Storage [friend] |
Reimplemented from storage::Container.
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const MdCo & | d | |||
| ) | [friend] |
EtcRaidtab* storage::MdCo::tab [protected] |
Referenced by doRemove(), init(), initTab(), MdCo(), syncRaidtab(), updateEntry(), and ~MdCo().
bool MdCo::active = false [static, protected] |
Referenced by doRemove().
1.5.6