#include <PeContainer.h>

Public Member Functions | |
| PeContainer (Storage *const s, storage::CType t) | |
| PeContainer (const PeContainer &c) | |
| PeContainer & | operator= (const PeContainer &rhs) |
| virtual | ~PeContainer () |
| unsigned long long | peSize () const |
| unsigned long long | sizeK () const |
| unsigned long | peCount () const |
| unsigned long | peFree () const |
| unsigned | numPv () const |
| bool | addedPv (const string &dev) const |
| unsigned long | sizeToLe (unsigned long long sizeK) const |
| int | setPeSize (long long unsigned, bool lvm1) |
| void | unuseDev () |
| void | changeDeviceName (const string &old, const string &nw) |
| bool | equalContent (const PeContainer &rhs, bool comp_vol=true) const |
| virtual string | getDiffString (const Container &d) const |
Protected Types | |
| typedef CastIterator< VIter, Dm * > | DmInter |
| typedef CastIterator< CVIter, const Dm * > | DmCInter |
| typedef CheckFnc< const Dm > | CheckFncDm |
| typedef CheckerIterator < CheckFncDm, DmPI< CheckFncDm > ::type, DmInter, Dm > | DmPIterator |
| typedef CheckerIterator < CheckFncDm, DmCPI < CheckFncDm >::type, DmCInter, const Dm > | DmCPIterator |
| typedef DerefIterator < DmPIterator, Dm > | DmIter |
| typedef DerefIterator < DmCPIterator, const Dm > | ConstDmIter |
| typedef IterPair< DmIter > | DmPair |
| typedef IterPair< ConstDmIter > | ConstDmPair |
Protected Member Functions | |
| DmPair | dmPair (bool(*Check)(const Dm &)=NULL) |
| DmIter | dmBegin (bool(*Check)(const Dm &)=NULL) |
| DmIter | dmEnd (bool(*Check)(const Dm &)=NULL) |
| ConstDmPair | dmPair (bool(*Check)(const Dm &)=NULL) const |
| ConstDmIter | dmBegin (bool(*Check)(const Dm &)=NULL) const |
| ConstDmIter | dmEnd (bool(*Check)(const Dm &)=NULL) const |
| void | init () |
| string | addList () const |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| bool | findPe (const string &dev, const std::list< Pv > &pl, std::list< Pv >::const_iterator &i) const |
| bool | findPe (const string &dev, std::list< Pv > &pl, std::list< Pv >::iterator &i) |
| unsigned long | leByLvRemove () const |
| int | tryUnusePe (const string &dev, std::list< Pv > &pl, std::list< Pv > &pladd, std::list< Pv > &plrem, unsigned long &removed_pe) |
| bool | checkCreateConstraints () |
| int | remLvPeDistribution (unsigned long le, std::map< string, unsigned long > &pe_map, std::list< Pv > &pl, std::list< Pv > &pladd) |
| virtual bool | checkConsistency () const |
| void | addPv (const Pv *p) |
Static Protected Member Functions | |
| static int | addLvPeDistribution (unsigned long le, unsigned stripe, std::list< Pv > &pl, std::list< Pv > &pladd, std::map< string, unsigned long > &pe_map) |
Protected Attributes | |
| unsigned long long | pe_size |
| unsigned long | num_pe |
| unsigned long | free_pe |
| std::list< Pv > | pv |
| std::list< Pv > | pv_add |
| std::list< Pv > | pv_remove |
Friends | |
| class | Storage |
| std::ostream & | operator<< (std::ostream &, const PeContainer &) |
| std::ostream & | operator<< (std::ostream &, const Pv &) |
| void | printDevList (std::ostream &, const std::list< Pv > &) |
Classes | |
| struct | DmCPI |
| struct | DmPI |
| struct | Pv |
typedef CastIterator<VIter, Dm *> storage::PeContainer::DmInter [protected] |
typedef CastIterator<CVIter, const Dm *> storage::PeContainer::DmCInter [protected] |
typedef CheckFnc<const Dm> storage::PeContainer::CheckFncDm [protected] |
typedef CheckerIterator< CheckFncDm, DmPI<CheckFncDm>::type, DmInter, Dm > storage::PeContainer::DmPIterator [protected] |
typedef CheckerIterator< CheckFncDm, DmCPI<CheckFncDm>::type, DmCInter, const Dm > storage::PeContainer::DmCPIterator [protected] |
typedef DerefIterator<DmPIterator,Dm> storage::PeContainer::DmIter [protected] |
typedef DerefIterator<DmCPIterator,const Dm> storage::PeContainer::ConstDmIter [protected] |
typedef IterPair<DmIter> storage::PeContainer::DmPair [protected] |
typedef IterPair<ConstDmIter> storage::PeContainer::ConstDmPair [protected] |
| PeContainer::PeContainer | ( | Storage *const | s, | |
| storage::CType | t | |||
| ) |
| PeContainer::PeContainer | ( | const PeContainer & | c | ) |
References storage::Container::nm, and y2deb.
| PeContainer::~PeContainer | ( | ) | [virtual] |
References storage::Container::dev, and y2deb.
| PeContainer & PeContainer::operator= | ( | const PeContainer & | rhs | ) |
| unsigned long long storage::PeContainer::peSize | ( | ) | const [inline] |
References pe_size.
Referenced by storage::LvmVg::getInfo(), storage::LvmLv::getInfo(), and storage::Dm::getTableInfo().
| unsigned long long storage::PeContainer::sizeK | ( | ) | const [inline] |
Reimplemented from storage::Container.
Reimplemented in storage::DmPartCo.
References num_pe, and pe_size.
Referenced by storage::LvmVg::getInfo(), and storage::operator<<().
| unsigned long storage::PeContainer::peCount | ( | ) | const [inline] |
| unsigned long storage::PeContainer::peFree | ( | ) | const [inline] |
| unsigned storage::PeContainer::numPv | ( | ) | const [inline] |
References pv.
| bool storage::PeContainer::addedPv | ( | const string & | dev | ) | const |
| unsigned long PeContainer::sizeToLe | ( | unsigned long long | sizeK | ) | const |
References pe_size.
Referenced by checkCreateConstraints(), storage::LvmVg::doResize(), and storage::LvmVg::resizeVolume().
| int storage::PeContainer::setPeSize | ( | long long | unsigned, | |
| bool | lvm1 | |||
| ) |
Referenced by storage::LvmVg::setPeSize().
| void PeContainer::unuseDev | ( | ) |
| void storage::PeContainer::changeDeviceName | ( | const string & | old, | |
| const string & | nw | |||
| ) | [virtual] |
Reimplemented from storage::Container.
| bool PeContainer::equalContent | ( | const PeContainer & | rhs, | |
| bool | comp_vol = true | |||
| ) | const |
References storage::Container::begin(), storage::Container::end(), storage::Container::equalContent(), free_pe, num_pe, pe_size, pv, pv_add, and pv_remove.
Referenced by storage::LvmVg::equalContent(), and storage::DmPartCo::equalContent().
| string PeContainer::getDiffString | ( | const Container & | d | ) | const [virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::DmmultipathCo, storage::DmPartCo, and storage::DmraidCo.
References storage::decString(), free_pe, storage::Container::getDiffString(), num_pe, pe_size, pv, pv_add, and pv_remove.
Referenced by storage::LvmVg::logDifference(), and storage::DmCo::logDifference().
References dmBegin(), and dmEnd().
Referenced by checkConsistency(), checkCreateConstraints(), storage::DmCo::DmCo(), storage::DmCo::equalContent(), storage::DmCo::findDm(), leByLvRemove(), storage::DmCo::logDifference(), and storage::DmCo::updateDmMaps().
| ConstDmPair storage::PeContainer::dmPair | ( | bool(*)(const Dm &) | Check = NULL |
) | const [inline, protected] |
| ConstDmIter storage::PeContainer::dmBegin | ( | bool(*)(const Dm &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| ConstDmIter storage::PeContainer::dmEnd | ( | bool(*)(const Dm &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| void PeContainer::init | ( | ) | [protected] |
Reimplemented in storage::DmCo, and storage::LvmVg.
References storage::Dm::dmMajor(), free_pe, storage::Container::mjr, storage::Container::nm, num_pe, pe_size, and y2mil.
Referenced by storage::LvmVg::init(), and PeContainer().
| string PeContainer::addList | ( | ) | const [protected] |
| virtual void storage::PeContainer::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::DmCo, storage::DmmultipathCo, storage::DmPartCo, storage::DmraidCo, and storage::LvmVg.
| virtual Container* storage::PeContainer::getCopy | ( | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
Reimplemented in storage::DmCo, storage::DmmultipathCo, storage::DmPartCo, storage::DmraidCo, and storage::LvmVg.
References PeContainer().
| bool storage::PeContainer::findPe | ( | const string & | dev, | |
| const std::list< Pv > & | pl, | |||
| std::list< Pv >::const_iterator & | i | |||
| ) | const [protected] |
Referenced by addPv(), and checkConsistency().
| bool storage::PeContainer::findPe | ( | const string & | dev, | |
| std::list< Pv > & | pl, | |||
| std::list< Pv >::iterator & | i | |||
| ) | [protected] |
| unsigned long PeContainer::leByLvRemove | ( | ) | const [protected] |
References storage::IterPair< Iter >::begin(), dmPair(), storage::IterPair< Iter >::end(), isDeleted(), and y2milestone.
| int storage::PeContainer::tryUnusePe | ( | const string & | dev, | |
| std::list< Pv > & | pl, | |||
| std::list< Pv > & | pladd, | |||
| std::list< Pv > & | plrem, | |||
| unsigned long & | removed_pe | |||
| ) | [protected] |
| bool PeContainer::checkCreateConstraints | ( | ) | [protected] |
References storage::IterPair< Iter >::begin(), dmPair(), storage::IterPair< Iter >::end(), num_pe, pe_size, pv, pv_add, pv_remove, remLvPeDistribution(), sizeToLe(), y2mil, and y2war.
Referenced by storage::LvmVg::doCreateVg(), and storage::LvmVg::doExtendVg().
| static int storage::PeContainer::addLvPeDistribution | ( | unsigned long | le, | |
| unsigned | stripe, | |||
| std::list< Pv > & | pl, | |||
| std::list< Pv > & | pladd, | |||
| std::map< string, unsigned long > & | pe_map | |||
| ) | [static, protected] |
Referenced by storage::LvmVg::resizeVolume().
| int storage::PeContainer::remLvPeDistribution | ( | unsigned long | le, | |
| std::map< string, unsigned long > & | pe_map, | |||
| std::list< Pv > & | pl, | |||
| std::list< Pv > & | pladd | |||
| ) | [protected] |
Referenced by checkCreateConstraints(), and storage::LvmVg::resizeVolume().
| bool PeContainer::checkConsistency | ( | ) | const [protected, virtual] |
References storage::IterPair< Iter >::begin(), dmPair(), storage::IterPair< Iter >::end(), findPe(), free_pe, storage::Container::name(), storage::Dm::notDeleted(), num_pe, pv, pv_add, and y2warning.
Referenced by storage::Storage::detectLvmVgs(), storage::LvmVg::doCreate(), storage::LvmVg::doCreateVg(), storage::LvmVg::doExtendVg(), storage::LvmVg::doReduceVg(), storage::LvmVg::doRemove(), storage::LvmVg::doRemoveVg(), storage::LvmVg::doResize(), and storage::LvmVg::resizeVolume().
| void PeContainer::addPv | ( | const Pv * | p | ) | [protected] |
References storage::PeContainer::Pv::device, storage::Storage::eraseLabelVolume(), findPe(), storage::Container::getStorage(), pv, pv_add, and pv_remove.
Referenced by storage::LvmVg::addPv(), storage::DmraidCo::addPv(), and storage::DmmultipathCo::addPv().
friend class Storage [friend] |
Reimplemented from storage::Container.
Reimplemented in storage::DmCo, storage::DmmultipathCo, storage::DmPartCo, storage::DmraidCo, and storage::LvmVg.
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const PeContainer & | d | |||
| ) | [friend] |
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const Pv & | v | |||
| ) | [friend] |
| void printDevList | ( | std::ostream & | s, | |
| const std::list< Pv > & | l | |||
| ) | [friend] |
Referenced by storage::operator<<().
unsigned long long storage::PeContainer::pe_size [protected] |
unsigned long storage::PeContainer::num_pe [protected] |
unsigned long storage::PeContainer::free_pe [protected] |
Referenced by checkConsistency(), equalContent(), getDiffString(), init(), storage::operator<<(), operator=(), peFree(), and storage::LvmVg::resizeVolume().
std::list<Pv> storage::PeContainer::pv [protected] |
std::list<Pv> storage::PeContainer::pv_add [protected] |
std::list<Pv> storage::PeContainer::pv_remove [protected] |
Referenced by addPv(), storage::LvmVg::addPv(), checkCreateConstraints(), storage::LvmVg::commitChanges(), storage::LvmVg::doCreateVg(), storage::LvmVg::doReduceVg(), equalContent(), storage::LvmVg::getCommitActions(), getDiffString(), storage::LvmVg::getInfo(), storage::LvmVg::getToCommit(), storage::operator<<(), and operator=().
1.5.6