#include <BtrfsCo.h>

Public Member Functions | |
| BtrfsCo (Storage *const s) | |
| BtrfsCo (Storage *const s, SystemInfo &systeminfo) | |
| BtrfsCo (const BtrfsCo &c) | |
| virtual | ~BtrfsCo () |
| void | addFromVolume (const Volume &v, string &uuid) |
| void | eraseVolume (Volume *v) |
| bool | existSubvolume (const string &device, const string &name) |
| int | createSubvolume (const string &device, const string &name) |
| int | removeSubvolume (const string &device, const string &name) |
| int | extendVolume (const string &device, const string &dev) |
| int | extendVolume (const string &device, const list< string > &devs) |
| int | shrinkVolume (const string &device, const string &dev) |
| int | shrinkVolume (const string &device, const list< string > &devs) |
| bool | deviceToUuid (const string &device, string &uuid) |
| int | doRemove (Volume *v) |
| void | changeDeviceName (const string &old, const string &nw) |
| int | commitChanges (CommitStage stage, Volume *vol) |
| void | getToCommit (storage::CommitStage stage, list< const Container * > &col, list< const Volume * > &vo) const |
| int | removeVolume (Volume *v) |
| int | removeVolume (Volume *v, bool quiet) |
| int | removeUuid (const string &uuid) |
| bool | equalContent (const Container &rhs) const |
| void | saveData (xmlNode *node) const |
| string | fakeUuid () |
| virtual void | logDifferenceWithVolumes (std::ostream &log, const Container &rhs) const |
| virtual void | logData (const string &Dir) const |
Static Public Member Functions | |
| static storage::CType | staticType () |
Protected Types | |
| typedef CastIterator< VIter, Btrfs * > | BtrfsInter |
| typedef CastIterator< CVIter, const Btrfs * > | BtrfsCInter |
| typedef CheckFnc< const Btrfs > | CheckFncBtrfs |
| typedef CheckerIterator < CheckFncBtrfs, BtrfsPI < CheckFncBtrfs >::type, BtrfsInter, Btrfs > | BtrfsPIterator |
| typedef CheckerIterator < CheckFncBtrfs, BtrfsCPI < CheckFncBtrfs >::type, BtrfsCInter, const Btrfs > | BtrfsCPIterator |
| typedef DerefIterator < BtrfsPIterator, Btrfs > | BtrfsIter |
| typedef DerefIterator < BtrfsCPIterator, const Btrfs > | ConstBtrfsIter |
| typedef IterPair< BtrfsIter > | BtrfsPair |
| typedef IterPair< ConstBtrfsIter > | ConstBtrfsPair |
Protected Member Functions | |
| BtrfsPair | btrfsPair (bool(*Check)(const Btrfs &)=NULL) |
| BtrfsIter | btrfsBegin (bool(*Check)(const Btrfs &)=NULL) |
| BtrfsIter | btrfsEnd (bool(*Check)(const Btrfs &)=NULL) |
| ConstBtrfsPair | btrfsPair (bool(*Check)(const Btrfs &)=NULL) const |
| ConstBtrfsIter | btrfsBegin (bool(*Check)(const Btrfs &)=NULL) const |
| ConstBtrfsIter | btrfsEnd (bool(*Check)(const Btrfs &)=NULL) const |
| void | getBtrfsData (SystemInfo &systeminfo) |
| bool | findBtrfs (const string &uuid, BtrfsIter &i) |
| void | addBtrfs (Btrfs *m) |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
Private Member Functions | |
| BtrfsCo & | operator= (const BtrfsCo &) |
Friends | |
| class | Storage |
| std::ostream & | operator<< (std::ostream &, const BtrfsCo &) |
Classes | |
| struct | BtrfsCPI |
| struct | BtrfsPI |
typedef CastIterator<VIter, Btrfs *> storage::BtrfsCo::BtrfsInter [protected] |
typedef CastIterator<CVIter, const Btrfs *> storage::BtrfsCo::BtrfsCInter [protected] |
typedef CheckFnc<const Btrfs> storage::BtrfsCo::CheckFncBtrfs [protected] |
typedef CheckerIterator< CheckFncBtrfs, BtrfsPI<CheckFncBtrfs>::type, BtrfsInter, Btrfs > storage::BtrfsCo::BtrfsPIterator [protected] |
typedef CheckerIterator< CheckFncBtrfs, BtrfsCPI<CheckFncBtrfs>::type, BtrfsCInter, const Btrfs > storage::BtrfsCo::BtrfsCPIterator [protected] |
typedef DerefIterator<BtrfsPIterator,Btrfs> storage::BtrfsCo::BtrfsIter [protected] |
typedef DerefIterator<BtrfsCPIterator,const Btrfs> storage::BtrfsCo::ConstBtrfsIter [protected] |
typedef IterPair<BtrfsIter> storage::BtrfsCo::BtrfsPair [protected] |
typedef IterPair<ConstBtrfsIter> storage::BtrfsCo::ConstBtrfsPair [protected] |
| storage::BtrfsCo::BtrfsCo | ( | Storage *const | s, | |
| SystemInfo & | systeminfo | |||
| ) |
References getBtrfsData(), and y2deb.
| storage::BtrfsCo::BtrfsCo | ( | const BtrfsCo & | c | ) |
| storage::BtrfsCo::~BtrfsCo | ( | ) | [virtual] |
References storage::Device::dev, and y2deb.
| void storage::BtrfsCo::addFromVolume | ( | const Volume & | v, | |
| string & | uuid | |||
| ) |
References fakeUuid(), storage::Volume::initUuid(), and storage::Container::vols.
Referenced by storage::Storage::changeFormatVolume().
| void storage::BtrfsCo::eraseVolume | ( | Volume * | v | ) |
| bool storage::BtrfsCo::existSubvolume | ( | const string & | device, | |
| const string & | name | |||
| ) |
| int storage::BtrfsCo::createSubvolume | ( | const string & | device, | |
| const string & | name | |||
| ) |
References storage::BTRFS_CHANGE_READONLY, storage::BTRFS_VOLUME_NOT_FOUND, findBtrfs(), storage::Container::readonly(), and y2mil.
Referenced by storage::Storage::createSubvolume().
| int storage::BtrfsCo::removeSubvolume | ( | const string & | device, | |
| const string & | name | |||
| ) |
References storage::BTRFS_CHANGE_READONLY, storage::BTRFS_VOLUME_NOT_FOUND, findBtrfs(), storage::Container::readonly(), and y2mil.
Referenced by storage::Storage::removeSubvolume().
| int storage::BtrfsCo::extendVolume | ( | const string & | device, | |
| const string & | dev | |||
| ) |
Referenced by storage::Storage::extendBtrfsVolume().
| int storage::BtrfsCo::extendVolume | ( | const string & | device, | |
| const list< string > & | devs | |||
| ) |
| int storage::BtrfsCo::shrinkVolume | ( | const string & | device, | |
| const string & | dev | |||
| ) |
Referenced by storage::Storage::shrinkBtrfsVolume().
| int storage::BtrfsCo::shrinkVolume | ( | const string & | device, | |
| const list< string > & | devs | |||
| ) |
| bool storage::BtrfsCo::deviceToUuid | ( | const string & | device, | |
| string & | uuid | |||
| ) |
| int storage::BtrfsCo::doRemove | ( | Volume * | v | ) | [virtual] |
Reimplemented from storage::Container.
References storage::BTRFS_REMOVE_INVALID_VOLUME, storage::BTRFS_REMOVE_NO_BTRFS, storage::Btrfs::clearSignature(), storage::Container::getStorage(), storage::Device::isSilent(), storage::Container::removeFromList(), storage::Btrfs::removeText(), storage::Storage::showInfoCb(), and y2mil.
| void storage::BtrfsCo::changeDeviceName | ( | const string & | old, | |
| const string & | nw | |||
| ) | [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), btrfsPair(), and storage::IterPair< Iter >::end().
| static storage::CType storage::BtrfsCo::staticType | ( | ) | [inline, static] |
| int storage::BtrfsCo::commitChanges | ( | CommitStage | stage, | |
| Volume * | vol | |||
| ) | [virtual] |
Reimplemented from storage::Container.
References storage::BTRFS_COMMIT_INVALID_VOLUME, storage::Container::commitChanges(), storage::DECREASE, storage::Btrfs::doCreateSubvol(), storage::Btrfs::doDeleteSubvol(), storage::Btrfs::doExtend(), storage::Btrfs::doReduce(), storage::INCREASE, storage::Device::name(), storage::Btrfs::needCreateSubvol(), storage::Btrfs::needDeleteSubvol(), storage::Volume::needExtend(), storage::Btrfs::needReduce(), storage::SUBVOL, and y2mil.
| void storage::BtrfsCo::getToCommit | ( | storage::CommitStage | stage, | |
| list< const Container * > & | col, | |||
| list< const Volume * > & | vo | |||
| ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), btrfsPair(), storage::DECREASE, storage::IterPair< Iter >::end(), storage::Container::getToCommit(), storage::INCREASE, storage::Btrfs::needCreateSubvol(), storage::Btrfs::needDeleteSubvol(), storage::Volume::needExtend(), storage::Btrfs::needReduce(), storage::SUBVOL, and y2mil.
| int storage::BtrfsCo::removeVolume | ( | Volume * | v | ) | [virtual] |
| int storage::BtrfsCo::removeVolume | ( | Volume * | v, | |
| bool | quiet | |||
| ) |
References storage::Device::setDeleted(), storage::Device::setSilent(), storage::Btrfs::unuseDev(), y2err, and y2mil.
| int storage::BtrfsCo::removeUuid | ( | const string & | uuid | ) |
References storage::BTRFS_REMOVE_NOT_FOUND, findBtrfs(), removeVolume(), and y2mil.
Referenced by storage::Storage::removeUsing().
| bool storage::BtrfsCo::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), btrfsPair(), storage::IterPair< Iter >::end(), and storage::equalContent().
| void storage::BtrfsCo::saveData | ( | xmlNode * | node | ) | const |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), btrfsPair(), storage::IterPair< Iter >::end(), storage::Container::saveData(), and storage::xmlNewChild().
Referenced by logData().
| string storage::BtrfsCo::fakeUuid | ( | ) |
References storage::decString(), findBtrfs(), and y2mil.
Referenced by addFromVolume(), and storage::Btrfs::setFormat().
| void storage::BtrfsCo::logDifferenceWithVolumes | ( | std::ostream & | log, | |
| const Container & | rhs | |||
| ) | const [virtual] |
| void storage::BtrfsCo::logData | ( | const string & | Dir | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::Container::getStorage(), storage::Storage::handleLogFile(), storage::XmlFile::save(), saveData(), storage::XmlFile::setRootElement(), and storage::xmlNewNode().
References btrfsBegin(), and btrfsEnd().
Referenced by BtrfsCo(), changeDeviceName(), storage::Storage::detectBtrfs(), equalContent(), eraseVolume(), findBtrfs(), getBtrfsData(), getToCommit(), logDifferenceWithVolumes(), and saveData().
| ConstBtrfsPair storage::BtrfsCo::btrfsPair | ( | bool(*)(const Btrfs &) | Check = NULL |
) | const [inline, protected] |
References btrfsBegin(), and btrfsEnd().
| ConstBtrfsIter storage::BtrfsCo::btrfsBegin | ( | bool(*)(const Btrfs &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| ConstBtrfsIter storage::BtrfsCo::btrfsEnd | ( | bool(*)(const Btrfs &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| void storage::BtrfsCo::getBtrfsData | ( | SystemInfo & | systeminfo | ) | [protected] |
References storage::Device::altNames(), storage::app_ws, storage::IterPair< Iter >::begin(), storage::BTRFS, btrfsPair(), storage::Device::device(), storage::CmdBtrfsShow::Entry::devices, storage::IterPair< Iter >::end(), storage::Storage::findDevice(), storage::Storage::findVolume(), storage::Volume::fsTypeString(), storage::SystemInfo::getCmdBtrfsShow(), storage::CmdBtrfsShow::getEntry(), storage::Volume::getFormat(), storage::Volume::getFs(), storage::Volume::getMount(), storage::Container::getStorage(), storage::Device::getUsedBy(), storage::CmdBtrfsShow::getUuids(), storage::Storage::mountTmpRo(), storage::Device::setAltNames(), storage::Device::sizeK(), storage::SystemCmd::stdout(), storage::UB_BTRFS, storage::Storage::umountDev(), storage::Container::vols, y2mil, and y2war.
Referenced by BtrfsCo().
| bool storage::BtrfsCo::findBtrfs | ( | const string & | uuid, | |
| BtrfsIter & | i | |||
| ) | [protected] |
References storage::IterPair< Iter >::begin(), btrfsPair(), storage::IterPair< Iter >::empty(), storage::IterPair< Iter >::end(), storage::Btrfs::notDeleted(), and y2mil.
Referenced by createSubvolume(), existSubvolume(), extendVolume(), fakeUuid(), removeSubvolume(), removeUuid(), and shrinkVolume().
| void storage::BtrfsCo::addBtrfs | ( | Btrfs * | m | ) | [protected] |
| virtual void storage::BtrfsCo::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::Container.
| virtual Container* storage::BtrfsCo::getCopy | ( | ) | const [inline, protected, virtual] |
friend class Storage [friend] |
Reimplemented from storage::Container.
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const BtrfsCo & | d | |||
| ) | [friend] |
1.5.6