libstorage-ng
Loading...
Searching...
No Matches
storage::BlkFilesystem Class Reference
Inheritance diagram for storage::BlkFilesystem:
[legend]
Collaboration diagram for storage::BlkFilesystem:
[legend]

Public Member Functions

bool supports_label () const
 Return whether the filesystem supports a label.
unsigned int max_labelsize () const
 Return the maximal allowed filesystem label length.
const std::string & get_label () const
 Get the filesystem label.
void set_label (const std::string &label)
 Set the filesystem label.
bool supports_uuid () const
 Return whether the filesystem supports a UUID.
const std::string & get_uuid () const
 Get the filesystem UUID.
void set_uuid (const std::string &uuid)
 Set the filesystem UUID.
const std::string & get_mkfs_options () const ST_DEPRECATED
void set_mkfs_options (const std::string &mkfs_options) ST_DEPRECATED
const std::vector< std::string > & get_mkfs_options_v2 () const
 Get extra options for the filesystem mkfs command.
void set_mkfs_options_v2 (const std::vector< std::string > &mkfs_options_v2)
 Set extra options for the filesystem mkfs command.
bool supports_tune_options () const
 Checks whether the filesystem supports tune options.
const std::string & get_tune_options () const ST_DEPRECATED
void set_tune_options (const std::string &tune_options) ST_DEPRECATED
const std::vector< std::string > & get_tune_options_v2 () const
 Get extra options for the filesystem tune command.
void set_tune_options_v2 (const std::vector< std::string > &tune_options)
 Set extra options for the filesystem tune command.
bool supports_shrink () const
 Checks whether shrinking the filesystem is supported.
bool supports_grow () const
 Checks whether growing the filesystem is supported.
bool supports_mounted_shrink () const
 Checks whether shrinking the filesystem while being mounted is supported.
bool supports_mounted_grow () const
 Checks whether growing the filesystem while being mounted is supported.
bool supports_unmounted_shrink () const
 Checks whether shrinking the filesystem while being unmounted is supported.
bool supports_unmounted_grow () const
 Checks whether growing the filesystem while being unmounted is supported.
void set_resize_info (const ResizeInfo &resize_info)
 Set the ResizeInfo.
ContentInfo detect_content_info () const
 Detect the content info of the filesystem.
void set_content_info (const ContentInfo &content_info)
 Set the ResizeInfo.
std::vector< BlkDevice * > get_blk_devices ()
 Get underlying blk devices of the blk filesystem.
std::vector< const BlkDevice * > get_blk_devices () const
 Get underlying blk devices of the blk filesystem.
Impl & get_impl ()
const Impl & get_impl () const
Public Member Functions inherited from storage::Filesystem
FsType get_type () const
 Get the filesystem type.
bool has_space_info () const
 Query whether the SpaceInfo was already detected or set.
SpaceInfo detect_space_info () const
 Detect the SpaceInfo.
void set_space_info (const SpaceInfo &space_info)
 Set the SpaceInfo.
Impl & get_impl ()
const Impl & get_impl () const
Public Member Functions inherited from storage::Mountable
bool supports_mount () const
 Checks whether the library supports mounting the mountable.
MountPointcreate_mount_point (const std::string &path)
 Create a new mount point for the mountable with path.
bool has_mount_point () const
 Checks whether the mountable has a mount point.
MountPointget_mount_point ()
 Returns the mount point of the mountable.
const MountPointget_mount_point () const
 Returns the mount point of the mountable.
void remove_mount_point ()
 Removes the mount point from the mountable.
bool has_filesystem () const
 Checks whether the mountable has a filesystem.
Filesystemget_filesystem ()
 Return the filesystem of the mountable.
const Filesystemget_filesystem () const
 Return the filesystem of the mountable.
MountByType get_mount_by () const ST_DEPRECATED
void set_mount_by (MountByType mount_by) ST_DEPRECATED
const std::vector< std::string > & get_mount_opts () const ST_DEPRECATED
void set_mount_opts (const std::vector< std::string > &mount_opts) ST_DEPRECATED
const std::vector< std::string > & get_fstab_options () const ST_DEPRECATED
void set_fstab_options (const std::vector< std::string > &mount_opts) ST_DEPRECATED
Impl & get_impl ()
const Impl & get_impl () const
Public Member Functions inherited from storage::Device
sid_t get_sid () const
 Return the storage id (sid) of the device.
bool operator== (const Device &rhs) const
bool operator!= (const Device &rhs) const
Device * copy_to_devicegraph (Devicegraph *devicegraph) const
 Copies the device to the devicegraph.
bool exists_in_devicegraph (const Devicegraph *devicegraph) const
 Checks if the device exists in the devicegraph.
bool exists_in_probed () const
 Checks if the device exists in the probed devicegraph.
bool exists_in_staging () const
 Checks if the device exists in the staging devicegraph.
bool exists_in_system () const
 Checks if the device exists in the system devicegraph.
std::string get_displayname () const
ResizeInfo detect_resize_info () const
 Detect the resize info of the device.
bool has_children () const
size_t num_children () const
bool has_parents () const
size_t num_parents () const
std::vector< Device * > get_children ()
std::vector< const Device * > get_children () const
std::vector< Device * > get_children (View view)
 Get all children of the device.
std::vector< const Device * > get_children (View view) const
 Get all children of the device.
std::vector< Device * > get_parents ()
std::vector< const Device * > get_parents () const
std::vector< Device * > get_parents (View view)
 Get all parents of the device.
std::vector< const Device * > get_parents (View view) const
 Get all parents of the device.
std::vector< Device * > get_siblings (bool itself)
std::vector< const Device * > get_siblings (bool itself) const
std::vector< Device * > get_descendants (bool itself)
std::vector< const Device * > get_descendants (bool itself) const
std::vector< Device * > get_descendants (bool itself, View view)
std::vector< const Device * > get_descendants (bool itself, View view) const
std::vector< Device * > get_ancestors (bool itself)
std::vector< const Device * > get_ancestors (bool itself) const
std::vector< Device * > get_leaves (bool itself)
std::vector< const Device * > get_leaves (bool itself) const
std::vector< Device * > get_roots (bool itself)
std::vector< const Device * > get_roots (bool itself) const
std::vector< Holder * > get_in_holders ()
std::vector< const Holder * > get_in_holders () const
std::vector< Holder * > get_out_holders ()
std::vector< const Holder * > get_out_holders () const
void remove_descendants () ST_DEPRECATED
void remove_descendants (View view)
 Remove all descendants of the device.
const std::map< std::string, std::string > & get_userdata () const
 Return the userdata of the device.
void set_userdata (const std::map< std::string, std::string > &userdata)
 Set the userdata of the device.
std::string get_name_sort_key () const
 Get a sort-key based on the device name.
Devicegraphget_devicegraph ()
 Return the devicegraph the device belongs to.
const Devicegraphget_devicegraph () const
 Return the devicegraph the device belongs to.
Impl & get_impl ()
const Impl & get_impl () const
virtual Device * clone () const ST_DEPRECATED=0
virtual std::unique_ptr< Device > clone_v2 () const =0
void save (xmlNode *node) const ST_DEPRECATED

Static Public Member Functions

static std::vector< BlkFilesystem * > get_all (Devicegraph *devicegraph)
 Get all BlkFilesystems.
static std::vector< const BlkFilesystem * > get_all (const Devicegraph *devicegraph)
 Get all BlkFilesystems.
static std::vector< const BlkFilesystem * > find_by_label (const Devicegraph *devicegraph, const std::string &label)
 Find filesystems by label.
static std::vector< const BlkFilesystem * > find_by_uuid (const Devicegraph *devicegraph, const std::string &uuid)
 Find filesystems by UUID.
Static Public Member Functions inherited from storage::Filesystem
static std::vector< Filesystem * > get_all (Devicegraph *devicegraph)
 Get all Filesystems.
static std::vector< const Filesystem * > get_all (const Devicegraph *devicegraph)
 Get all Filesystems.
Static Public Member Functions inherited from storage::Mountable
static std::vector< Mountable * > get_all (Devicegraph *devicegraph)
 Get all Mountables.
static std::vector< const Mountable * > get_all (const Devicegraph *devicegraph)
 Get all Mountables.
static bool is_valid_path (FsType fs_type, const std::string &path)
 Checks whether the path is valid.
Static Public Member Functions inherited from storage::Device
static std::vector< Device * > get_all (Devicegraph *devicegraph)
 Get all Devices.
static std::vector< const Device * > get_all (const Devicegraph *devicegraph)
 Get all Devices.
static bool compare_by_sid (const Device *lhs, const Device *rhs)
 Compare (less than) two Devices by sid.
static bool compare_by_name (const Device *lhs, const Device *rhs)
 Compare (less than) two Devices by name.

Protected Member Functions

 BlkFilesystem (Impl *impl)
ST_NO_SWIG BlkFilesystem (std::unique_ptr< Device::Impl > &&impl)
Protected Member Functions inherited from storage::Filesystem
 Filesystem (Impl *impl)
ST_NO_SWIG Filesystem (std::unique_ptr< Device::Impl > &&impl)
Protected Member Functions inherited from storage::Mountable
 Mountable (Impl *impl)
ST_NO_SWIG Mountable (std::unique_ptr< Device::Impl > &&impl)
Protected Member Functions inherited from storage::Device
 Device (Impl *impl) ST_DEPRECATED
ST_NO_SWIG Device (std::unique_ptr< Impl > &&impl)
void create (Devicegraph *devicegraph) ST_DEPRECATED
 Create a device in the devicegraph.
void load (Devicegraph *devicegraph) ST_DEPRECATED

Member Function Documentation

◆ detect_content_info()

ContentInfo storage::BlkFilesystem::detect_content_info ( ) const

Detect the content info of the filesystem.

Exceptions
Exception

◆ get_all()

std::vector< const BlkFilesystem * > storage::BlkFilesystem::get_all ( const Devicegraph * devicegraph)
static

Get all BlkFilesystems.

◆ get_blk_devices()

std::vector< const BlkDevice * > storage::BlkFilesystem::get_blk_devices ( ) const

Get underlying blk devices of the blk filesystem.

◆ get_uuid()

const std::string & storage::BlkFilesystem::get_uuid ( ) const

Get the filesystem UUID.

May be empty.

◆ set_content_info()

void storage::BlkFilesystem::set_content_info ( const ContentInfo & content_info)

Set the ResizeInfo.

Only use for testsuites.

◆ set_label()

void storage::BlkFilesystem::set_label ( const std::string & label)

Set the filesystem label.

May not work if the filesystem is mounted (e.g. for swap).

◆ set_mkfs_options_v2()

void storage::BlkFilesystem::set_mkfs_options_v2 ( const std::vector< std::string > & mkfs_options_v2)

Set extra options for the filesystem mkfs command.

No quoting required. It is undefined where exactly the extra options are inserted into the command line options of the external program.

◆ set_resize_info()

void storage::BlkFilesystem::set_resize_info ( const ResizeInfo & resize_info)

Set the ResizeInfo.

Only use for testsuites.

◆ set_tune_options_v2()

void storage::BlkFilesystem::set_tune_options_v2 ( const std::vector< std::string > & tune_options)

Set extra options for the filesystem tune command.

No quoting required. It is undefined where exactly the extra options are inserted into the command line options of the external program.

May not work if the filesystem is mounted.

Only supported on Ext, Reiserfs and Nilfs2.

◆ set_uuid()

void storage::BlkFilesystem::set_uuid ( const std::string & uuid)

Set the filesystem UUID.

Only supported for btrfs, xfs, ext, reiserfs, jfs, udf, nilfs2 and swap. In general the UUID is only set when creating a new filesystem on disk. May not work if the filesystem is mounted (e.g. for swap).


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/libstorage-ng-4.5.341-build/libstorage-ng-4.5.341/storage/Filesystems/BlkFilesystem.h