24 #ifndef STORAGE_BTRFS_H 25 #define STORAGE_BTRFS_H 28 #include "storage/Devicegraph.h" 29 #include "storage/Filesystems/BlkFilesystem.h" 44 UNKNOWN, DEFAULT, SINGLE, DUP, RAID0, RAID1, RAID5, RAID6, RAID10, RAID1C3, RAID1C4
137 void set_default_btrfs_subvolume(
BtrfsSubvolume* btrfs_subvolume)
const;
139 std::vector<BtrfsSubvolume*> get_btrfs_subvolumes();
140 std::vector<const BtrfsSubvolume*> get_btrfs_subvolumes()
const;
154 bool get_configure_snapper()
const;
155 void set_configure_snapper(
bool configure);
162 const Impl& get_impl()
const;
164 virtual Btrfs* clone()
const override;
Class to represent a btrfs filesystem https://en.wikipedia.org/wiki/Btrfs in the devicegraph.
Definition: Btrfs.h:66
Btrfs * to_btrfs(Device *device)
Converts pointer to Device to pointer to Btrfs.
void set_metadata_raid_level(BtrfsRaidLevel metadata_raid_level)
Set the metadata RAID level.
std::vector< BtrfsRaidLevel > get_allowed_metadata_raid_levels() const
Get the allowed metadata RAID levels for the btrfs.
Class to represent a btrfs subvolume in the devicegraph.
Definition: BtrfsSubvolume.h:40
std::vector< BtrfsRaidLevel > get_allowed_data_raid_levels() const
Get the allowed data RAID levels for the btrfs.
The master container of the libstorage.
Definition: Devicegraph.h:153
bool is_btrfs(const Device *device)
Checks whether device points to a Btrfs.
Definition: BlkFilesystem.h:42
An abstract Block Device.
Definition: BlkDevice.h:46
void remove_device(BlkDevice *blk_device)
Remove a block device from the btrfs.
void set_data_raid_level(BtrfsRaidLevel data_raid_level)
Set the data RAID level.
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:75
Definition: Devicegraph.h:48
std::string get_btrfs_raid_level_name(BtrfsRaidLevel btrfs_raid_level)
Convert the btrfs RAID level btrfs_raid_level to a string.
FilesystemUser * add_device(BlkDevice *blk_device)
Add a block device to the btrfs.
BtrfsRaidLevel get_metadata_raid_level() const
Get the metadata RAID level.
BtrfsRaidLevel get_data_raid_level() const
Get the data RAID level.
The storage namespace.
Definition: Actiongraph.h:37
BtrfsSubvolume * find_btrfs_subvolume_by_path(const std::string &path)
Find a btrfs subvolume of the btrfs by its path.
BtrfsRaidLevel
Btrfs RAID levels (aka profiles) used for metadata and data.
Definition: Btrfs.h:42
Definition: FilesystemUser.h:33