24 #ifndef STORAGE_BLK_DEVICE_H 25 #define STORAGE_BLK_DEVICE_H 28 #include "storage/Devices/Device.h" 29 #include "storage/Filesystems/Filesystem.h" 44 const std::string& get_name()
const;
45 void set_name(
const std::string& name);
47 const Region& get_region()
const;
48 void set_region(
const Region& region);
50 unsigned long long get_size()
const;
51 void set_size(
unsigned long long size);
53 std::string get_size_string()
const;
55 const std::string& get_sysfs_name()
const;
56 const std::string& get_sysfs_path()
const;
58 const std::vector<std::string>& get_udev_paths()
const;
59 const std::vector<std::string>& get_udev_ids()
const;
67 void set_dm_table_name(
const std::string& dm_table_name);
69 ResizeInfo detect_resize_info()
const override;
71 static std::vector<BlkDevice*> get_all(
Devicegraph* devicegraph);
72 static std::vector<const BlkDevice*> get_all(
const Devicegraph* devicegraph);
79 bool has_filesystem()
const;
89 bool has_encryption()
const;
99 const Impl& get_impl()
const;
108 bool is_blk_device(
const Device* device);
Encryption * create_encryption(const std::string &dm_name)
TODO parameter for encryption type? do all encryptions need a dm_name?
A start/length pair with a block size.
Definition: Region.h:71
An encryption layer on a blk device.
Definition: Encryption.h:45
const std::string & get_dm_table_name() const
Return device-mapper table name (dm-table-name for short).
The master container of the libstorage.
Definition: Devicegraph.h:133
An abstract Block Device.
Definition: BlkDevice.h:40
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:73
Definition: Filesystem.h:58
The storage namespace.
Definition: Actiongraph.h:36