23 #ifndef STORAGE_BTRFS_SUBVOLUME_H 24 #define STORAGE_BTRFS_SUBVOLUME_H 27 #include "storage/Filesystems/Mountable.h" 28 #include "storage/Devicegraph.h" 213 const Impl& get_impl()
const;
Class to represent a btrfs filesystem https://en.wikipedia.org/wiki/Btrfs in the devicegraph.
Definition: Btrfs.h:79
void set_nocow(bool nocow)
Set the copy-on-write (COW) flag of the btrfs subvolume.
BtrfsSubvolume * create_btrfs_subvolume(const std::string &path)
Create a btrfs subvolume for the btrfs subvolume.
const std::string & get_path() const
Get the path of the btrfs subvolume.
bool has_origin() const
Check whether the btrfs subvolume has an origin.
bool has_btrfs_qgroup() const
Return whether the subvolume as a corresponding level 0 qgroup.
bool is_default_btrfs_subvolume() const
Check whether the subvolume is the default subvolume.
BtrfsSubvolume * to_btrfs_subvolume(Device *device)
Converts pointer to Device to pointer to BtrfsSubvolume.
bool is_nocow() const
Get the copy-on-write (COW) flag of the btrfs subvolume.
Class to represent a btrfs subvolume in the devicegraph.
Definition: BtrfsSubvolume.h:43
long get_id() const
Get the id of the btrfs subvolume.
BtrfsQgroup * create_btrfs_qgroup()
Create the corresponding level 0 qgroup for the subvolume.
The main container of the libstorage-ng.
Definition: Devicegraph.h:169
Definition: Mountable.h:111
std::vector< BtrfsSubvolume * > get_snapshots()
Get snapshots of the btrfs subvolume.
BtrfsSubvolume * get_origin()
Get the origin of the btrfs subvolume if it has one.
Btrfs * get_btrfs()
Return the btrfs filesystem of the btrfs subvolume.
bool is_btrfs_subvolume(const Device *device)
Checks whether device points to a BtrfsSubvolume.
bool has_snapshots() const
Check whether the btrfs subvolume has snapshots.
An abstract base class for storage devices.
Definition: Device.h:81
static bool compare_by_id(const BtrfsSubvolume *lhs, const BtrfsSubvolume *rhs)
Compare (less than) two BtrfsSubvolumes by id.
static BtrfsSubvolume * create(Devicegraph *devicegraph, const std::string &path)
Create a device of type BtrfsSubvolume.
bool is_top_level() const
Check whether the subvolume is the top-level subvolume.
BtrfsSubvolume * get_top_level_btrfs_subvolume()
Return the top-level subvolume.
Class to represent a qgroup of a btrfs filesystem.
Definition: BtrfsQgroup.h:44
BtrfsQgroup * get_btrfs_qgroup()
Return the corresponding level 0 qgroup of the subvolume.
void set_default_btrfs_subvolume()
Set the subvolume to be the default subvolume.
The storage namespace.
Definition: Actiongraph.h:39