#include <Btrfs.h>

Public Member Functions | |
| Btrfs (const BtrfsCo &d, const Volume &v, unsigned long long sz, const list< string > &devices) | |
| Btrfs (const BtrfsCo &d, const Volume &v) | |
| Btrfs (const BtrfsCo &d, const xmlNode *node) | |
| Btrfs (const BtrfsCo &c, const Btrfs &v) | |
| virtual | ~Btrfs () |
| void | clearSubvol () |
| void | addSubvol (const string &path) |
| list< string > | getDevices (bool add_del=false) const |
| void | getDevices (list< string > &devs, bool add_del=false) const |
| void | getSubvolumes (list< Subvolume > &sv) const |
| bool | existSubvolume (const string &name) |
| int | createSubvolume (const string &name) |
| int | deleteSubvolume (const string &name) |
| int | extendVolume (const string &dev) |
| int | extendVolume (const list< string > &devs) |
| int | shrinkVolume (const string &dev) |
| int | shrinkVolume (const list< string > &devs) |
| void | getCommitActions (list< commitAction > &l) const |
| int | doDeleteSubvol () |
| int | doCreateSubvol () |
| int | doReduce () |
| int | doExtend () |
| Text | createSubvolText (bool doing, const string &name) const |
| Text | deleteSubvolText (bool doing, const string &name) const |
| Text | extendText (bool doing, const string &device) const |
| Text | reduceText (bool doing, const string &device) const |
| Text | removeText (bool doing) const |
| Text | formatText (bool doing) const |
| int | setFormat (bool format, storage::FsType fs) |
| virtual string | udevPath () const |
| virtual list< string > | udevId () const |
| virtual string | sysfsPath () const |
| void | countSubvolAddDel (unsigned &add, unsigned &rem) const |
| list< string > | getSubvolAddDel (bool) const |
| void | saveData (xmlNode *node) const |
| virtual void | print (std::ostream &s) const |
| void | getInfo (storage::BtrfsInfo &info) const |
| bool | equalContent (const Btrfs &rhs) const |
| void | logDifference (std::ostream &log, const Btrfs &rhs) const |
| void | unuseDev () const |
| int | clearSignature () |
| void | changeDeviceName (const string &old, const string &nw) |
Static Public Member Functions | |
| static bool | notDeleted (const Btrfs &l) |
| static bool | needCreateSubvol (const Btrfs &v) |
| static bool | needDeleteSubvol (const Btrfs &v) |
| static bool | needReduce (const Btrfs &v) |
| static bool | needExtend (const Btrfs &v) |
Protected Member Functions | |
| BtrfsCo * | co () |
| string | subvolNames (bool added) const |
| Volume const * | findRealVolume () const |
Protected Attributes | |
| list< string > | devices |
| list< string > | dev_add |
| list< string > | dev_rem |
| list< Subvolume > | subvol |
| storage::BtrfsInfo | info |
Private Member Functions | |
| Btrfs & | operator= (const Btrfs &v) |
| Btrfs (const Btrfs &) | |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Btrfs &l) |
| storage::Btrfs::Btrfs | ( | const BtrfsCo & | d, | |
| const xmlNode * | node | |||
| ) |
References dev_add, dev_rem, devices, storage::getChildNodes(), storage::getChildValue(), and subvol.
References storage::Device::dev, and y2deb.
| storage::Btrfs::~Btrfs | ( | ) | [virtual] |
References storage::Device::dev, and y2deb.
| storage::Btrfs::Btrfs | ( | const Btrfs & | ) | [private] |
| void storage::Btrfs::clearSubvol | ( | ) | [inline] |
References subvol.
| void storage::Btrfs::addSubvol | ( | const string & | path | ) |
References storage::contains(), subvol, y2mil, and y2war.
| list< string > storage::Btrfs::getDevices | ( | bool | add_del = false |
) | const |
| void storage::Btrfs::getDevices | ( | list< string > & | devs, | |
| bool | add_del = false | |||
| ) | const |
| bool storage::Btrfs::existSubvolume | ( | const string & | name | ) |
References storage::Volume::getFormat(), subvol, and y2mil.
| int storage::Btrfs::createSubvolume | ( | const string & | name | ) |
| int storage::Btrfs::deleteSubvolume | ( | const string & | name | ) |
References storage::BTRFS_SUBVOL_NON_EXISTS, subvol, and y2mil.
| int storage::Btrfs::extendVolume | ( | const string & | dev | ) |
| int storage::Btrfs::extendVolume | ( | const list< string > & | devs | ) |
References storage::BTRFS_DEV_ALREADY_CONTAINED, storage::BTRFS_DEVICE_UNKNOWN, storage::BTRFS_DEVICE_USED, storage::BTRFS_HAS_NONE_DEV, storage::Storage::canUseDevice(), storage::Storage::changeFormatVolume(), storage::Storage::deletedDevice(), dev_add, dev_rem, devices, storage::Volume::format, storage::FSNONE, storage::Volume::getStorage(), storage::Volume::getUuid(), storage::Storage::knownDevice(), storage::Device::name(), storage::normalizeDevice(), storage::Volume::setSize(), storage::Storage::setUsedByBtrfs(), storage::Device::size_k, and y2mil.
| int storage::Btrfs::shrinkVolume | ( | const string & | dev | ) |
| int storage::Btrfs::shrinkVolume | ( | const list< string > & | devs | ) |
References storage::BTRFS_DEV_NOT_FOUND, storage::BTRFS_HAS_NONE_DEV, storage::Storage::clearUsedBy(), dev_add, dev_rem, devices, storage::Volume::format, storage::Volume::getStorage(), storage::Device::name(), storage::normalizeDevice(), storage::Volume::setSize(), storage::Device::size_k, and y2mil.
| void storage::Btrfs::getCommitActions | ( | list< commitAction > & | l | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::Volume::cont, countSubvolAddDel(), storage::Device::created(), createSubvolText(), storage::DECREASE, deleteSubvolText(), dev_add, dev_rem, extendText(), storage::Storage::findVolume(), storage::FORMAT, storage::Volume::getCommitActions(), storage::Volume::getStorage(), getSubvolAddDel(), storage::INCREASE, storage::Storage::isUsedBySingleBtrfs(), reduceText(), storage::SUBVOL, storage::Container::type(), and y2mil.
| int storage::Btrfs::doDeleteSubvol | ( | ) |
References storage::BTRFS_DELETE_SUBVOL_FAIL, BTRFSBIN, deleteSubvolText(), storage::SystemCmd::execute(), storage::Volume::getStorage(), storage::Volume::prepareTmpMount(), storage::SystemCmd::retcode(), storage::Storage::showInfoCb(), storage::Device::silent, subvol, storage::Volume::umountTmpMount(), and y2mil.
Referenced by storage::BtrfsCo::commitChanges().
| int storage::Btrfs::doCreateSubvol | ( | ) |
References storage::BTRFS_CREATE_SUBVOL_FAIL, BTRFSBIN, storage::checkDir(), storage::createPath(), createSubvolText(), storage::SystemCmd::execute(), storage::Volume::getStorage(), storage::Volume::prepareTmpMount(), storage::SystemCmd::retcode(), storage::Storage::showInfoCb(), storage::Device::silent, subvol, storage::Volume::umountTmpMount(), and y2mil.
Referenced by storage::BtrfsCo::commitChanges().
| int storage::Btrfs::doReduce | ( | ) |
References storage::BTRFS_REDUCE_FAIL, BTRFSBIN, dev_rem, devices, storage::SystemCmd::execute(), storage::Volume::getStorage(), storage::Volume::prepareTmpMount(), storage::quote(), reduceText(), storage::SystemCmd::retcode(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Volume::umountTmpMount(), and y2mil.
Referenced by storage::BtrfsCo::commitChanges().
| int storage::Btrfs::doExtend | ( | ) |
References storage::BTRFS_EXTEND_FAIL, BTRFSBIN, dev_add, devices, storage::SystemCmd::execute(), extendText(), storage::Volume::getStorage(), storage::Volume::prepareTmpMount(), storage::quote(), storage::SystemCmd::retcode(), storage::Storage::showInfoCb(), storage::Device::silent, storage::Volume::umountTmpMount(), and y2mil.
Referenced by storage::BtrfsCo::commitChanges().
| Text storage::Btrfs::createSubvolText | ( | bool | doing, | |
| const string & | name | |||
| ) | const |
References storage::_(), storage::Device::dev, and storage::sformat().
Referenced by doCreateSubvol(), and getCommitActions().
| Text storage::Btrfs::deleteSubvolText | ( | bool | doing, | |
| const string & | name | |||
| ) | const |
References storage::_(), storage::Device::dev, and storage::sformat().
Referenced by doDeleteSubvol(), and getCommitActions().
| Text storage::Btrfs::extendText | ( | bool | doing, | |
| const string & | device | |||
| ) | const |
References storage::_(), storage::Device::name(), and storage::sformat().
Referenced by doExtend(), and getCommitActions().
| Text storage::Btrfs::reduceText | ( | bool | doing, | |
| const string & | device | |||
| ) | const |
References storage::_(), storage::Device::name(), and storage::sformat().
Referenced by doReduce(), and getCommitActions().
| Text storage::Btrfs::removeText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), devices, storage::sformat(), and storage::Device::sizeString().
Referenced by storage::BtrfsCo::doRemove().
| Text storage::Btrfs::formatText | ( | bool | doing | ) | const [virtual] |
Reimplemented from storage::Volume.
References storage::_(), dev_add, devices, findRealVolume(), storage::Volume::formatText(), storage::Volume::mp, storage::sformat(), storage::Device::sizeString(), and y2mil.
| int storage::Btrfs::setFormat | ( | bool | format, | |
| storage::FsType | fs | |||
| ) | [virtual] |
| string storage::Btrfs::udevPath | ( | ) | const [virtual] |
| list< string > storage::Btrfs::udevId | ( | ) | const [virtual] |
| string storage::Btrfs::sysfsPath | ( | ) | const [virtual] |
| void storage::Btrfs::countSubvolAddDel | ( | unsigned & | add, | |
| unsigned & | rem | |||
| ) | const |
Referenced by getCommitActions(), needCreateSubvol(), and needDeleteSubvol().
| list< string > storage::Btrfs::getSubvolAddDel | ( | bool | add | ) | const |
| void storage::Btrfs::saveData | ( | xmlNode * | node | ) | const |
Reimplemented from storage::Volume.
References dev_add, dev_rem, devices, storage::Volume::saveData(), storage::setChildValue(), and subvol.
| virtual void storage::Btrfs::print | ( | std::ostream & | s | ) | const [inline, virtual] |
Reimplemented from storage::Volume.
| void storage::Btrfs::getInfo | ( | storage::BtrfsInfo & | info | ) | const |
| bool storage::Btrfs::equalContent | ( | const Btrfs & | rhs | ) | const |
References dev_add, dev_rem, devices, storage::Volume::equalContent(), and subvol.
| void storage::Btrfs::logDifference | ( | std::ostream & | log, | |
| const Btrfs & | rhs | |||
| ) | const |
References storage::contains(), dev_add, dev_rem, devices, storage::Volume::logDifference(), and subvol.
| void storage::Btrfs::unuseDev | ( | ) | const |
References storage::Storage::clearUsedBy(), dev_add, devices, storage::Volume::getContainer(), and storage::Container::getStorage().
Referenced by storage::BtrfsCo::removeVolume().
| int storage::Btrfs::clearSignature | ( | ) |
References devices, storage::Volume::getContainer(), storage::Container::getStorage(), y2mil, and storage::Storage::zeroDevice().
Referenced by storage::BtrfsCo::doRemove().
| void storage::Btrfs::changeDeviceName | ( | const string & | old, | |
| const string & | nw | |||
| ) |
| static bool storage::Btrfs::notDeleted | ( | const Btrfs & | l | ) | [inline, static] |
| bool storage::Btrfs::needCreateSubvol | ( | const Btrfs & | v | ) | [static] |
References countSubvolAddDel().
Referenced by storage::BtrfsCo::commitChanges(), and storage::BtrfsCo::getToCommit().
| bool storage::Btrfs::needDeleteSubvol | ( | const Btrfs & | v | ) | [static] |
References countSubvolAddDel().
Referenced by storage::BtrfsCo::commitChanges(), and storage::BtrfsCo::getToCommit().
| bool storage::Btrfs::needReduce | ( | const Btrfs & | v | ) | [static] |
References dev_rem.
Referenced by storage::BtrfsCo::commitChanges(), and storage::BtrfsCo::getToCommit().
| BtrfsCo * storage::Btrfs::co | ( | ) | [protected] |
| Volume const * storage::Btrfs::findRealVolume | ( | ) | const [protected] |
References devices, and storage::Volume::getStorage().
Referenced by formatText(), sysfsPath(), udevId(), and udevPath().
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const Btrfs & | l | |||
| ) | [friend] |
list<string> storage::Btrfs::devices [protected] |
list<string> storage::Btrfs::dev_add [protected] |
list<string> storage::Btrfs::dev_rem [protected] |
list<Subvolume> storage::Btrfs::subvol [protected] |
storage::BtrfsInfo storage::Btrfs::info [mutable, protected] |
1.5.6