diff --git a/README.md b/README.md new file mode 100644 index 0000000..a532024 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Storaged Project Website + +Source for [storaged.org](https://storaged.org) website. + +## Local Development + +```bash +bundle install # Install dependencies +bundle exec jekyll serve # Dev server at http://localhost:4000 +bundle exec jekyll build # Build static site to _site/ +``` + +## Contributing + +Blog posts go in `_posts/` as `YYYY-MM-DD-Title.md`. + +Each blogpost starts with a metadata block: + +```yaml +--- +layout: post +title: "Post Title" +date: 2026-01-01 10:00:00 +0100 +categories: category +author: Author Name +--- +``` + +Note: Jekyll will exclude posts with a future date from the build so don't forget to adjust the date before merging PR with the new post. + +New authors need to be added to `_data/authors.yml` with their name, short bio, and GitHub username: + +```yaml +Author Name: + name: Author Name + bio: Short description of the author. + github: github-username +``` diff --git a/_config.yml b/_config.yml index 9d51e4f..2b79f4a 100644 --- a/_config.yml +++ b/_config.yml @@ -6,11 +6,13 @@ description: >- theme: minima plugins: - jekyll-feed + - jekyll-sitemap show_excerpts: true github_username: storaged-project rss: rss +goatcounter: storaged header_pages: - blivet/blivet.md @@ -24,3 +26,7 @@ markdown: kramdown include: - _static - _*.html + +exclude: + - README.md + - vendor diff --git a/_data/authors.yml b/_data/authors.yml new file mode 100644 index 0000000..838d2f5 --- /dev/null +++ b/_data/authors.yml @@ -0,0 +1,11 @@ +Vojtech Trefny: + name: Vojtech Trefny + bio: Senior Software Engineer at Red Hat working on blivet, libblockdev, + storage role and other storaged projects. + github: vojtechtrefny + +Tomáš Bžatek: + name: Tomáš Bžatek + bio: Senior Software Engineer at Red Hat working on UDisks, NVMe and other + storage tools and technologies. + github: tbzatek diff --git a/_includes/author-bio.html b/_includes/author-bio.html new file mode 100644 index 0000000..79e18b7 --- /dev/null +++ b/_includes/author-bio.html @@ -0,0 +1,13 @@ +{% if page.author %} + {% assign author = site.data.authors[page.author] %} + {% if author %} +
+ {% endif %} +{% endif %} diff --git a/_includes/goatcounter.html b/_includes/goatcounter.html new file mode 100644 index 0000000..ccb35cc --- /dev/null +++ b/_includes/goatcounter.html @@ -0,0 +1,4 @@ +{%- if site.goatcounter -%} + +{%- endif -%} diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 0000000..e73cfb4 --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,32 @@ +| - |
- This is a list of API changes in libblockdev 3.0 with suggested replacements. -
-
- bd_lvm_data_lv_name() has been removed, use data_lv from BDLVMLVdata instead.
-
- bd_lvm_metadadata_lv_name() has been removed, use metadata_lv from BDLVMLVdata instead.
-
- BD_LVM_MAX_LV_SIZE constant has been removed, use bd_lvm_get_max_lv_size() instead.
-
- bd_nvdimm_namepace_get_supported_sector_sizes has been removed, use bd_nvdimm_namespace_get_supported_sector_sizes instead.
-
- bd_fs_clean and bd_fs_wipe have new parameter force
- that allows controlling whether the signatures will be removed from a mounted device or not. Use
- TRUE to preserve the original behaviour.
-
- Following functions have a new parameter fstype that allows to skip scanning the device
- for signature. Use NULL to preserve the original behaviour.
- Affected functions: bd_fs_resize, bd_fs_repair, bd_fs_check, bd_fs_set_label, bd_fs_set_uuid, bd_fs_get_size and bd_fs_get_free_space
-
- Type-specific bd_fs_..._wipe functions have been removed. Use bd_fs_wipe or bd_fs_clean instead.
- Affected functions: bd_fs_btrfs_wipe, bd_fs_ext2_wipe, bd_fs_ext3_wipe, bd_fs_ext4_wipe, bd_fs_exfat_wipe, bd_fs_f2fs_wipe, bd_fs_nilfs2_wipe, bd_fs_ntfs_wipe, bd_fs_vfat_wipe, bd_fs_udf_wipe, bd_fs_xfs_wipe
-
| - |
NULL is OK, both for passing and for returning.
Parameter points to an array of items.
This symbol is a constructor, not a static method.
Generics and defining elements of containers and arrays.
NULL may be passed as the value in, out, in-out; or as a return value.
NULL may be passed instead of a pointer to a location.
Parameter for returning results. Default is transfer full.
The callback is valid until the GDestroyNotify argument is called.
Exposed in C code, not necessarily available in other languages.
The caller owns the data container, but not the data inside it.
The caller owns the data, and is responsible for free it.
The data is owned by the callee, which is responsible of freeing it.
| - |
| - |
| - |
- The libblockdev library supports GObject introspection and thus - can be used from a variety of languages. To make such use even easier and to make - the code using libblockdev from different languages than C feel more natural the - library also provides so-called overrides — pieces of - code that usually wrap the original libblockdev functions with language-native - objects (usually functions) that provide language-specific features like default - values for parameters etc. -
-
- The overrides are not documented here (yet), but it should be easy to directly check
- the sources for anybody who understands their language of choice. The overrides are
- located in the src/LANG_NAME directory in the
- source tree. The only language that libblockdev provides overrides for right now is
- Python (under the src/python directory).
-
| - |
- libblockdev's test suite is written using the standard unittest.TestCase framework - in Python. Tests are separated in modules, usually one per libblockdev plugin - e.g. - BTRFS, LVM, Crypto. There are one or more base classes in each module used to - setup the environment and perform some testing. More specific test scenarios - inherit from these base classes. -
-- Before running the tests you have to prepare your system so that libblockdev - can be built from source. -
-- Install all build requirements. On Fedora this can be done with -
-
-cat dist/libblockdev.spec.in | grep BuildRequires: | cut -f2 -d: | cut -f2 -d' ' | xargs dnf -y install
-
-- - Configure the build scripts - -
-./autogen.sh
-./configure
--
-- To execute the Pylint code analysis tool run: - -
-make check
-- - The check target is a dependency of all test targets and you don't have to - execute it explicitly when testing. -
-- To execute the test suite from inside the source directory run one of these - commands: - -
-make test
-- - executes all safe tests or - -
-make fast-test
-- - executes all fast tests or - -
-make test-all
-- - executes all tests, including ones which may result in kernel panic or - take more time to complete or - -
-make test-plugin-NAME
-- - executes only tests for given plugin and similarly - -
-make fast-test-plugin-NAME
-- - executes only fast tests for given plugin. -
-- It is also possible to run only subset of available tests or only one test - using the `run_tests.py` script: - -
-# python3 tests/run_tests.py fs_test.GenericResize
-- - executes all tests from the GenericResize test class - from filesystem plugin test cases and - -
-# python3 tests/run_tests.py fs_test.GenericResize.test_ext2_generic_resize
-- - executes only test_ext2_generic_resize from this class. - - This script also allows skipping slow tests or running potentially dangerous - tests. Use: - -
-$ python3 tests/run_tests.py --help
-- - to see all available options. - -
-- It is also possible to generate test coverage reports using the Python coverage - tool: - -
-make coverage
-- - is equivalent to `make test'. - -
-make coverage-all
-- - is equivalent to `make test-all'. -
-libblockdev Reference Manual for libblockdev 2.99. |
|---|
-
-- The latest version of this documentation can be found on-line at - http://storaged.org/libblockdev/. -
--
-- The latest version of the code can be found at - https://github.com/storaged-project/libblockdev -
--
-- Documentation for Python bindings is available here -
--
-| -Top - | -
| #define | -BD_BTRFS_MAIN_VOLUME_ID | -
| #define | -BD_BTRFS_MIN_MEMBER_SIZE | -
| #define | -BD_BTRFS_ERROR | -
| enum | -BDBtrfsError | -
| - | BDBtrfsDeviceInfo | -
| - | BDBtrfsSubvolumeInfo | -
| - | BDBtrfsFilesystemInfo | -
| enum | -BDBtrfsTech | -
| enum | -BDBtrfsTechMode | -
gboolean
-bd_btrfs_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_btrfs_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-void
-bd_btrfs_device_info_free (BDBtrfsDeviceInfo *info);
-Frees info
-.
[skip]
- -BDBtrfsDeviceInfo *
-bd_btrfs_device_info_copy (BDBtrfsDeviceInfo *info);
-Creates a new copy of info
-.
[skip]
- -void
-bd_btrfs_subvolume_info_free (BDBtrfsSubvolumeInfo *info);
-Frees info
-.
[skip]
- -BDBtrfsSubvolumeInfo *
-bd_btrfs_subvolume_info_copy (BDBtrfsSubvolumeInfo *info);
-Creates a new copy of info
-.
[skip]
- -void
-bd_btrfs_filesystem_info_free (BDBtrfsFilesystemInfo *info);
-Frees info
-.
[skip]
- -BDBtrfsFilesystemInfo *
-bd_btrfs_filesystem_info_copy (BDBtrfsFilesystemInfo *info);
-Creates a new copy of info
-.
[skip]
- -gboolean -bd_btrfs_create_volume (-const gchar **devices, -const gchar *label, -const gchar *data_level, -const gchar *md_level, -const BDExtraArg **extra, -GError **error);
devices |
-list of devices to create btrfs volume from. |
-[array zero-terminated=1] | -
label |
-label for the volume. |
-[nullable] | -
data_level |
-RAID level for the data or |
-[nullable] | -
md_level |
-RAID level for the metadata or |
-[nullable] | -
extra |
-extra options for the volume creation (right now -passed to the 'mkfs.btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new btrfs volume was created from devices
-or not
See mkfs.btrfs(8) for details about data_level
-, md_level
-and btrfs in general.
Tech category: BD_BTRFS_TECH_MULTI_DEV-BD_BTRFS_TECH_MODE_CREATE
gboolean -bd_btrfs_add_device (-const gchar *mountpoint, -const gchar *device, -const BDExtraArg **extra, -GError **error);
mountpoint |
-mountpoint of the btrfs volume to add new device to |
-- |
device |
-a device to add to the btrfs volume |
-- |
extra |
-extra options for the addition (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully added to the mountpoint
-btrfs volume or not
Tech category: BD_BTRFS_TECH_MULTI_DEV-BD_BTRFS_TECH_MODE_MODIFY
gboolean -bd_btrfs_remove_device (-const gchar *mountpoint, -const gchar *device, -const BDExtraArg **extra, -GError **error);
mountpoint |
-mountpoint of the btrfs volume to remove device from |
-- |
device |
-a device to remove from the btrfs volume |
-- |
extra |
-extra options for the removal (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully removed from the mountpoint
-btrfs volume or not
Tech category: BD_BTRFS_TECH_MULTI_DEV-BD_BTRFS_TECH_MODE_MODIFY
gboolean -bd_btrfs_create_subvolume (-const gchar *mountpoint, -const gchar *name, -const BDExtraArg **extra, -GError **error);
mountpoint |
-mountpoint of the btrfs volume to create subvolume under |
-- |
name |
-name of the subvolume |
-- |
extra |
-extra options for the subvolume creation (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the mountpoint
-/name
-subvolume was successfully created or not
Tech category: BD_BTRFS_TECH_SUBVOL-BD_BTRFS_TECH_MODE_CREATE
gboolean -bd_btrfs_delete_subvolume (-const gchar *mountpoint, -const gchar *name, -const BDExtraArg **extra, -GError **error);
mountpoint |
-mountpoint of the btrfs volume to delete subvolume from |
-- |
name |
-name of the subvolume |
-- |
extra |
-extra options for the subvolume deletion (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the mountpoint
-/name
-subvolume was successfully deleted or not
Tech category: BD_BTRFS_TECH_SUBVOL-BD_BTRFS_TECH_MODE_DELETE
guint64 -bd_btrfs_get_default_subvolume_id (-const gchar *mountpoint, -GError **error);
mountpoint |
-mountpoint of the volume to get the default subvolume ID of |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
ID of the mountpoint
-volume's default subvolume. If 0,
-error
-) may be set to indicate error
Tech category: BD_BTRFS_TECH_SUBVOL-BD_BTRFS_TECH_MODE_QUERY
gboolean -bd_btrfs_set_default_subvolume (-const gchar *mountpoint, -guint64 subvol_id, -const BDExtraArg **extra, -GError **error);
mountpoint |
-mountpoint of the volume to set the default subvolume ID of |
-- |
subvol_id |
-ID of the subvolume to be set as the default subvolume |
-- |
extra |
-extra options for the setting (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the mountpoint
-volume's default subvolume was correctly set
-to subvol_id
-or not
Tech category: BD_BTRFS_TECH_SUBVOL-BD_BTRFS_TECH_MODE_MODIFY
gboolean -bd_btrfs_create_snapshot (-const gchar *source, -const gchar *dest, -gboolean ro, -const BDExtraArg **extra, -GError **error);
source |
-path to source subvolume |
-- |
dest |
-path to new snapshot volume |
-- |
ro |
-whether the snapshot should be read-only |
-- |
extra |
-extra options for the snapshot creation (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the dest
-snapshot of source
-was successfully created or not
Tech category: BD_BTRFS_TECH_SNAPSHOT-BD_BTRFS_TECH_MODE_CREATE
BDBtrfsDeviceInfo ** -bd_btrfs_list_devices (-const gchar *device, -GError **error);
device |
-a device that is part of the queried btrfs volume |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the devices that are part of the btrfs volume
-containing device
-or NULL in case of error
Tech category: BD_BTRFS_TECH_MULTI_DEV-BD_BTRFS_TECH_MODE_QUERY.
[array zero-terminated=1]
-BDBtrfsSubvolumeInfo ** -bd_btrfs_list_subvolumes (-const gchar *mountpoint, -gboolean snapshots_only, -GError **error);
mountpoint |
-a mountpoint of the queried btrfs volume |
-- |
snapshots_only |
-whether to list only snapshot subvolumes or not |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the subvolumes that are part of the btrfs volume
-mounted at mountpoint
-or NULL in case of error
The subvolumes are sorted in a way that no child subvolume appears in the -list before its parent (sub)volume.
-Tech category: BD_BTRFS_TECH_SUBVOL-BD_BTRFS_TECH_MODE_QUERY.
[array zero-terminated=1]
-BDBtrfsFilesystemInfo * -bd_btrfs_filesystem_info (-const gchar *device, -GError **error);
device |
-a device that is part of the queried btrfs volume |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the device
-'s volume's filesystem or NULL in case of error
Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_QUERY
gboolean -bd_btrfs_mkfs (-const gchar **devices, -const gchar *label, -const gchar *data_level, -const gchar *md_level, -const BDExtraArg **extra, -GError **error);
devices |
-list of devices to create btrfs volume from. |
-[array zero-terminated=1] | -
label |
-label for the volume. |
-[nullable] | -
data_level |
-RAID level for the data or |
-[nullable] | -
md_level |
-RAID level for the metadata or |
-[nullable] | -
extra |
-extra options for the volume creation (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new btrfs volume was created from devices
-or not
See mkfs.btrfs(8) for details about data_level
-, md_level
-and btrfs in general.
Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_CREATE
gboolean -bd_btrfs_resize (-const gchar *mountpoint, -guint64 size, -const BDExtraArg **extra, -GError **error);
mountpoint |
-a mountpoint of the to be resized btrfs filesystem |
-- |
size |
-requested new size |
-- |
extra |
-extra options for the volume resize (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the mountpoint
-filesystem was successfully resized to size
-or not
Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_MODIFY
gboolean -bd_btrfs_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-a device that is part of the checked btrfs volume |
-- |
extra |
-extra options for the check (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the filesystem was successfully checked or not
-Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_QUERY
gboolean -bd_btrfs_repair (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-a device that is part of the to be repaired btrfs volume |
-- |
extra |
-extra options for the repair (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the filesystem was successfully checked and repaired or not
-Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_MODIFY
gboolean -bd_btrfs_change_label (-const gchar *mountpoint, -const gchar *label, -GError **error);
mountpoint |
-a mountpoint of the btrfs filesystem to change label of |
-- |
label |
-new label for the filesystem |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of the mountpoint
-filesystem was successfully set
-to label
-or not
Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_MODIFY
gboolean -bd_btrfs_is_tech_avail (-BDBtrfsTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDBtrfsTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
typedef struct {
- guint64 id;
- gchar *path;
- guint64 size;
- guint64 used;
-} BDBtrfsDeviceInfo;
-
-
-typedef struct {
- guint64 id;
- guint64 parent_id;
- gchar *path;
-} BDBtrfsSubvolumeInfo;
-
-
-typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 num_devices;
- guint64 used;
-} BDBtrfsFilesystemInfo;
-
-
-| -Top - | -
| #define | -BD_CRYPTO_LUKS_METADATA_SIZE | -
| #define | -BD_CRYPTO_ERROR | -
| enum | -BDCryptoError | -
| #define | -BD_CRYPTO_BACKUP_PASSPHRASE_CHARSET | -
| #define | -BD_CRYPTO_BACKUP_PASSPHRASE_LENGTH | -
| #define | -BD_CRYPTO_CHI_SQUARE_BYTES_TO_CHECK | -
| #define | -BD_CRYPTO_CHI_SQUARE_LOWER_LIMIT | -
| #define | -BD_CRYPTO_CHI_SQUARE_UPPER_LIMIT | -
| - | BDCryptoLUKSExtra | -
| - | BDCryptoLUKSPBKDF | -
| enum | -BDCryptoLUKSVersion | -
| - | BDCryptoLUKSInfo | -
| - | BDCryptoIntegrityInfo | -
| - | BDCryptoIntegrityExtra | -
| enum | -BDCryptoIntegrityOpenFlags | -
| - | BDCryptoLUKSTokenInfo | -
| enum | -BDCryptoTech | -
| enum | -BDCryptoTechMode | -
A plugin for operations with encrypted devices. For now, only -LUKS devices are supported.
-Functions taking a parameter called "device" require the backing device to be -passed. On the other hand functions taking the "luks_device" parameter -require the LUKS device (/dev/mapper/SOMETHING").
-Sizes are given in bytes unless stated otherwise.
-void
-bd_crypto_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean
-bd_crypto_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-gchar *
-bd_crypto_generate_backup_passphrase (GError **error);
-
- A newly generated BD_CRYPTO_BACKUP_PASSPHRASE_LENGTH-long passphrase.
See BD_CRYPTO_BACKUP_PASSPHRASE_CHARSET for the definition of the charset used for the passphrase.
Tech category: always available
-gboolean -bd_crypto_device_is_luks (-const gchar *device, -GError **error);
device |
-the queried device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
TRUE if the given device
-is a LUKS device or FALSE if not or
-failed to determine (the error
-) is populated with the error in such
-cases)
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_QUERY
gboolean -bd_crypto_device_seems_encrypted (-const gchar *device, -GError **error);
Determines whether a block device seems to be encrypted.
-TCRYPT volumes are not easily identifiable, because they have no -cleartext header, but are completely encrypted. This function is -used to determine whether a block device is a candidate for being -TCRYPT encrypted.
-To achieve this, we calculate the chi square value of the first -512 Bytes and treat devices with a chi square value between 136 -and 426 as candidates for being encrypted. -For the reasoning, see: https://tails.boum.org/blueprint/veracrypt/
-device |
-the queried device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
TRUE if the given device
-seems to be encrypted or FALSE if not or
-failed to determine (the error
-) is populated with the error in such
-cases)
Tech category: BD_CRYPTO_TECH_TRUECRYPT-BD_CRYPTO_TECH_MODE_QUERY
gchar * -bd_crypto_luks_uuid (-const gchar *device, -GError **error);
device |
-the queried device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
UUID of the device
-or NULL if failed to determine (error
-is populated with the error in such cases)
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_QUERY
guint64 -bd_crypto_luks_get_metadata_size (-const gchar *device, -GError **error);
device |
-the queried device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
luks device metadata size of the device
-or 0 if failed to determine (error
-is populated
-with the error in such cases)
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_QUERY
gchar * -bd_crypto_luks_status (-const gchar *luks_device, -GError **error);
luks_device |
-the queried LUKS device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
one of "invalid", "inactive", "active" or "busy" or
-NULL if failed to determine (error
-is populated with the error in
-such cases)
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_QUERY.
[transfer none]
-gboolean -bd_crypto_luks_format (-const gchar *device, -const gchar *cipher, -guint64 key_size, -const gchar *passphrase, -const gchar *key_file, -guint64 min_entropy, -GError **error);
Formats the given device
- as LUKS according to the other parameters given. If
-min_entropy
- is specified (greater than 0), the function waits for enough
-entropy to be available in the random data pool (WHICH MAY POTENTIALLY TAKE
-FOREVER).
device |
-a device to format as LUKS |
-- |
cipher |
-cipher specification (type-mode, e.g. "aes-xts-plain64") or |
-[nullable] | -
key_size |
-size of the volume key in bits or 0 to use the default |
-- |
passphrase |
-a passphrase for the new LUKS device or |
-[nullable] | -
key_file |
-a key file for the new LUKS device or |
-[nullable] | -
min_entropy |
-minimum random data entropy (in bits) required to format |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given device
-was successfully formatted as LUKS or not
-(the error
-) contains the error in such cases)
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_CREATE
gboolean -bd_crypto_luks_format_blob (-const gchar *device, -const gchar *cipher, -guint64 key_size, -const guint8 *pass_data, -gsize data_len, -guint64 min_entropy, -GError **error);
Formats the given device
- as LUKS according to the other parameters given. If
-min_entropy
- is specified (greater than 0), the function waits for enough
-entropy to be available in the random data pool (WHICH MAY POTENTIALLY TAKE
-FOREVER).
device |
-a device to format as LUKS |
-- |
cipher |
-cipher specification (type-mode, e.g. "aes-xts-plain64") or |
-[nullable] | -
key_size |
-size of the volume key in bits or 0 to use the default |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
min_entropy |
-minimum random data entropy (in bits) required to format |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given device
-was successfully formatted as LUKS or not
-(the error
-) contains the error in such cases)
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_CREATE
void
-bd_crypto_luks_extra_free (BDCryptoLUKSExtra *extra);
-Frees extra
-.
[skip]
- -BDCryptoLUKSExtra *
-bd_crypto_luks_extra_copy (BDCryptoLUKSExtra *extra);
-Creates a new copy of extra
-.
[skip]
- -BDCryptoLUKSExtra * -bd_crypto_luks_extra_new (-guint64 data_alignment, -const gchar *data_device, -const gchar *integrity, -guint64 sector_size, -const gchar *label, -const gchar *subsystem, -BDCryptoLUKSPBKDF *pbkdf);
[constructor]
-data_alignment |
-data alignment in sectors, 0 for default/auto detection |
-- |
data_device |
-detached encrypted data device or NULL. |
-[nullable] | -
integrity |
-integrity algorithm (e.g. "hmac-sha256") or NULL for no integrity support. |
-[nullable] | -
sector_size |
-encryption sector size, 0 for default (512) |
-- |
label |
-LUKS header label or NULL. |
-[nullable] | -
subsystem |
-LUKS header subsystem or NULL. |
-[nullable] | -
pbkdf |
-key derivation function specification or NULL for default. |
-[nullable] | -
void
-bd_crypto_luks_pbkdf_free (BDCryptoLUKSPBKDF *pbkdf);
-Frees pbkdf
-.
[skip]
- -BDCryptoLUKSPBKDF *
-bd_crypto_luks_pbkdf_copy (BDCryptoLUKSPBKDF *pbkdf);
-Creates a new copy of pbkdf
-.
[skip]
- -BDCryptoLUKSPBKDF * -bd_crypto_luks_pbkdf_new (-const gchar *type, -const gchar *hash, -guint32 max_memory_kb, -guint32 iterations, -guint32 time_ms, -guint32 parallel_threads);
[constructor]
-type |
-PBKDF algorithm. |
-[nullable] | -
hash |
-hash for LUKS header or NULL for default. |
-[nullable] | -
max_memory_kb |
-requested memory cost (in KiB) or 0 for default (benchmark) |
-- |
iterations |
-requested iterations or 0 for default (benchmark) |
-- |
time_ms |
-requested time cost or 0 for default (benchmark) |
-- |
parallel_threads |
-requested parallel cost (threads) or 0 for default (benchmark) |
-- |
gboolean -bd_crypto_luks_format_luks2 (-const gchar *device, -const gchar *cipher, -guint64 key_size, -const gchar *passphrase, -const gchar *key_file, -guint64 min_entropy, -BDCryptoLUKSVersion luks_version, -BDCryptoLUKSExtra *extra, -GError **error);
Formats the given device
- as LUKS according to the other parameters given. If
-min_entropy
- is specified (greater than 0), the function waits for enough
-entropy to be available in the random data pool (WHICH MAY POTENTIALLY TAKE
-FOREVER).
Either passphrase
- or key_file
- has to be != NULL.
Using this function with luks_version
- set to BD_CRYPTO_LUKS_VERSION_LUKS1 and
-extra
- to NULL is the same as calling bd_crypto_luks_format.
device |
-a device to format as LUKS |
-- |
cipher |
-cipher specification (type-mode, e.g. "aes-xts-plain64") or |
-[nullable] | -
key_size |
-size of the volume key in bits or 0 to use the default |
-- |
passphrase |
-a passphrase for the new LUKS device or |
-[nullable] | -
key_file |
-a key file for the new LUKS device or |
-[nullable] | -
min_entropy |
-minimum random data entropy (in bits) required to format |
-- |
luks_version |
-whether to use LUKS v1 or LUKS v2 |
-- |
extra |
-extra arguments for LUKS format creation. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given device
-was successfully formatted as LUKS or not
-(the error
-) contains the error in such cases)
Tech category: BD_CRYPTO_TECH_LUKS2-BD_CRYPTO_TECH_MODE_CREATE
gboolean -bd_crypto_luks_format_luks2_blob (-const gchar *device, -const gchar *cipher, -guint64 key_size, -const guint8 *pass_data, -gsize data_len, -guint64 min_entropy, -BDCryptoLUKSVersion luks_version, -BDCryptoLUKSExtra *extra, -GError **error);
Formats the given device
- as LUKS according to the other parameters given. If
-min_entropy
- is specified (greater than 0), the function waits for enough
-entropy to be available in the random data pool (WHICH MAY POTENTIALLY TAKE
-FOREVER).
Using this function with luks_version
- set to BD_CRYPTO_LUKS_VERSION_LUKS1 and
-extra
- to NULL is the same as calling bd_crypto_luks_format_blob.
device |
-a device to format as LUKS |
-- |
cipher |
-cipher specification (type-mode, e.g. "aes-xts-plain64") or |
-[nullable] | -
key_size |
-size of the volume key in bits or 0 to use the default |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
min_entropy |
-minimum random data entropy (in bits) required to format |
-- |
luks_version |
-whether to use LUKS v1 or LUKS v2 |
-- |
extra |
-extra arguments for LUKS format creation. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given device
-was successfully formatted as LUKS or not
-(the error
-) contains the error in such cases)
Tech category: BD_CRYPTO_TECH_LUKS2-BD_CRYPTO_TECH_MODE_CREATE
gboolean -bd_crypto_luks_open (-const gchar *device, -const gchar *name, -const gchar *passphrase, -const gchar *key_file, -gboolean read_only, -GError **error);
device |
-the device to open |
-- |
name |
-name for the LUKS device |
-- |
passphrase |
-passphrase to open the |
-[nullable] | -
key_file |
-key file path to use for opening the |
-[nullable] | -
read_only |
-whether to open as read-only or not (meaning read-write) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
One of passphrase
-, key_file
-has to be != NULL.
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_luks_open_blob (-const gchar *device, -const gchar *name, -const guint8 *pass_data, -gsize data_len, -gboolean read_only, -GError **error);
device |
-the device to open |
-- |
name |
-name for the LUKS device |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
read_only |
-whether to open as read-only or not (meaning read-write) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_luks_close (-const gchar *luks_device, -GError **error);
luks_device |
-LUKS device to close |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given luks_device
-was successfully closed or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_luks_add_key (-const gchar *device, -const gchar *pass, -const gchar *key_file, -const gchar *npass, -const gchar *nkey_file, -GError **error);
device |
-device to add new key to |
-- |
pass |
-passphrase for the |
-[nullable] | -
key_file |
-key file for the |
-[nullable] | -
npass |
-passphrase to add to |
-[nullable] | -
nkey_file |
-key file to add to |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the npass
-or nkey_file
-was successfully added to device
-or not
One of pass
-, key_file
-has to be != NULL and the same applies to npass
-,
-nkey_file
-.
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_ADD_KEY
gboolean -bd_crypto_luks_add_key_blob (-const gchar *device, -const guint8 *pass_data, -gsize data_len, -const guint8 *npass_data, -gsize ndata_len, -GError **error);
device |
-device to add new key to |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
npass_data |
-a new passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=ndata_len] | -
ndata_len |
-length of the |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the npass_data
-was successfully added to device
-or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_ADD_KEY
gboolean -bd_crypto_luks_remove_key (- -const gchar *device, -const gchar *pass, -const gchar *key_file, -GError **error);
whether the key was successfully removed or not
-Either pass
-or key_file
-has to be != NULL.
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_REMOVE_KEY
gboolean -bd_crypto_luks_remove_key_blob (-const gchar *device, -const guint8 *pass_data, -gsize data_len, -GError **error);
device |
-device to add new key to |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data) to remove. |
-[array length=data_len] | -
data_len |
-length of the |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the key was successfully removed or not
-Either pass
-or key_file
-has to be != NULL.
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_REMOVE_KEY
gboolean -bd_crypto_luks_change_key (-const gchar *device, -const gchar *pass, -const gchar *npass, -GError **error);
device |
-device to change key of |
-- |
pass |
-old passphrase |
-- |
npass |
-new passphrase |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the key was successfully changed or not
-No support for changing key files (yet).
-Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_ADD_KEY&BD_CRYPTO_TECH_MODE_REMOVE_KEY
gboolean -bd_crypto_luks_change_key_blob (-const gchar *device, -const guint8 *pass_data, -gsize data_len, -const guint8 *npass_data, -gsize ndata_len, -GError **error);
device |
-device to change key of |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
npass_data |
-a new passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=ndata_len] | -
ndata_len |
-length of the |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the key was successfully changed or not
-Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_ADD_KEY&BD_CRYPTO_TECH_MODE_REMOVE_KEY
gboolean -bd_crypto_luks_resize (-const gchar *luks_device, -guint64 size, -GError **error);
You need to specify passphrase when resizing LUKS 2 devices that don't have
-verified key loaded in kernel. If you don't specify a passphrase, resize
-will fail with BD_CRYPTO_ERROR_RESIZE_PERM. Use bd_crypto_luks_resize_luks2
-or bd_crypto_luks_resize_luks2_blob for these devices.
luks_device |
-opened LUKS device to resize |
-- |
size |
-requested size in sectors or 0 to adapt to the backing device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the luks_device
-was successfully resized or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_RESIZE
gboolean -bd_crypto_luks_resize_luks2 (-const gchar *luks_device, -guint64 size, -const gchar *passphrase, -const gchar *key_file, -GError **error);
luks_device |
-opened LUKS device to resize |
-- |
passphrase |
-passphrase to resize the |
-[nullable] | -
key_file |
-key file path to use for resizing the |
-[nullable] | -
size |
-requested size in sectors or 0 to adapt to the backing device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the luks_device
-was successfully resized or not
You need to specify either passphrase
-or keyfile
-for LUKS 2 devices that
-don't have verified key loaded in kernel.
-For LUKS 1 devices you can set both passphrase
-and keyfile
-to NULL to
-achieve the same as calling bd_crypto_luks_resize.
Tech category: BD_CRYPTO_TECH_LUKS2-BD_CRYPTO_TECH_MODE_RESIZE
gboolean -bd_crypto_luks_resize_luks2_blob (-const gchar *luks_device, -guint64 size, -const guint8 *pass_data, -gsize data_len, -GError **error);
luks_device |
-opened LUKS device to resize |
-- |
pass_data |
-a passphrase for the new LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
size |
-requested size in sectors or 0 to adapt to the backing device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the luks_device
-was successfully resized or not
You need to specify pass_data
-for LUKS 2 devices that don't have
-verified key loaded in kernel.
Tech category: BD_CRYPTO_TECH_LUKS2-BD_CRYPTO_TECH_MODE_RESIZE
gboolean -bd_crypto_luks_suspend (-const gchar *luks_device, -GError **error);
luks_device |
-LUKS device to suspend |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given luks_device
-was successfully suspended or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_SUSPEND_RESUME
gboolean -bd_crypto_luks_resume_blob (-const gchar *luks_device, -const guint8 *pass_data, -gsize data_len, -GError **error);
luks_device |
-LUKS device to resume |
-- |
pass_data |
-a passphrase for the LUKS device (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given luks_device
-was successfully resumed or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_SUSPEND_RESUME
gboolean -bd_crypto_luks_resume (- -const gchar *luks_device, -const gchar *passphrase, -const gchar *key_file, -GError **error);
whether the given luks_device
-was successfully resumed or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_SUSPEND_RESUME
gboolean -bd_crypto_luks_kill_slot (-const gchar *device, -gint slot, -GError **error);
Note: This can destroy last remaining keyslot without confirmation making - the LUKS device permanently inaccessible.
-device |
-device to kill slot on |
-- |
slot |
-keyslot to destroy |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given slot
-was successfully destroyed or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_REMOVE_KEY
gboolean -bd_crypto_luks_header_backup (-const gchar *device, -const gchar *backup_file, -GError **error);
device |
-device to backup the LUKS header |
-- |
backup_file |
-file to save the header backup to |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given backup of device
-was successfully written to
-backup_file
-or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_BACKUP_RESTORE
gboolean -bd_crypto_luks_header_restore (-const gchar *device, -const gchar *backup_file, -GError **error);
device |
-device to restore the LUKS header to |
-- |
backup_file |
-existing file with a LUKS header backup |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given device
-LUKS header was successfully restored
-from backup_file
-
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_BACKUP_RESTORE
gboolean -bd_crypto_luks_set_label (-const gchar *device, -const gchar *label, -const gchar *subsystem, -GError **error);
device |
-device to set label on |
-- |
label |
-label to set. |
-[nullable] | -
subsystem |
-subsystem to set. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given label
-and subsystem
-were successfully set or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_MODIFY
gboolean -bd_crypto_luks_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-device to set UUID on |
-- |
uuid |
-UUID to set or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given uuid
-was successfully set or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_MODIFY
void
-bd_crypto_luks_info_free (BDCryptoLUKSInfo *info);
-Frees info
-.
[skip]
- -BDCryptoLUKSInfo *
-bd_crypto_luks_info_copy (BDCryptoLUKSInfo *info);
-Creates a new copy of info
-.
[skip]
- -BDCryptoLUKSInfo * -bd_crypto_luks_info (-const gchar *device, -GError **error);
device |
-a device to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the device
-or NULL in case of error
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_QUERY
void
-bd_crypto_integrity_info_free (BDCryptoIntegrityInfo *info);
-Frees info
-.
[skip]
- -BDCryptoIntegrityInfo *
-bd_crypto_integrity_info_copy (BDCryptoIntegrityInfo *info);
-Creates a new copy of info
-.
[skip]
- -BDCryptoIntegrityInfo * -bd_crypto_integrity_info (-const gchar *device, -GError **error);
device |
-a device to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the device
-or NULL in case of error
Tech category: BD_CRYPTO_TECH_INTEGRITY-BD_CRYPTO_TECH_MODE_QUERY
BDCryptoIntegrityExtra *
-bd_crypto_integrity_extra_copy (BDCryptoIntegrityExtra *extra);
-Creates a new copy of extra
-.
[skip]
- -void
-bd_crypto_integrity_extra_free (BDCryptoIntegrityExtra *extra);
-Frees extra
-.
[skip]
- -BDCryptoIntegrityExtra * -bd_crypto_integrity_extra_new (-guint64 sector_size, -guint64 journal_size, -guint journal_watermark, -guint journal_commit_time, -guint64 interleave_sectors, -guint64 tag_size, -guint64 buffer_sectors);
[constructor]
-sector_size |
-integrity sector size, 0 for default (512) |
-- |
journal_size |
-size of journal in bytes |
-- |
journal_watermark |
-journal flush watermark in percents; in bitmap mode sectors-per-bit |
-- |
journal_commit_time |
-journal commit time (or bitmap flush time) in ms |
-- |
interleave_sectors |
-number of interleave sectors (power of two) |
-- |
tag_size |
-tag size per-sector in bytes |
-- |
buffer_sectors |
-number of sectors in one buffer |
-- |
gboolean -bd_crypto_integrity_format (-const gchar *device, -const gchar *algorithm, -gboolean wipe, -const guint8 *key_data, -gsize key_size, -BDCryptoIntegrityExtra *extra, -GError **error);
Formats the given device
- as integrity according to the other parameters given.
device |
-a device to format as integrity |
-- |
algorithm |
-integrity algorithm specification (e.g. "crc32c" or "sha256") or |
-- |
wipe |
-whether to wipe the device after format; a device that is not initially wiped will contain invalid checksums |
-- |
key_data |
-integrity key or |
-[nullable][array length=key_size] | -
key_size |
-size the integrity key and |
-- |
extra |
-extra arguments for integrity format creation. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given device
-was successfully formatted as integrity or not
-(the error
-) contains the error in such cases)
Tech category: BD_CRYPTO_TECH_INTEGRITY-BD_CRYPTO_TECH_MODE_CREATE
gboolean -bd_crypto_integrity_open (-const gchar *device, -const gchar *name, -const gchar *algorithm, -const guint8 *key_data, -gsize key_size, -BDCryptoIntegrityOpenFlags flags, -BDCryptoIntegrityExtra *extra, -GError **error);
device |
-integrity device to open |
-- |
name |
-name for the opened |
-- |
algorithm |
-integrity algorithm specification (e.g. "crc32c" or "sha256") or |
-[nullable] | -
key_data |
-integrity key or |
-[nullable][array length=key_size] | -
key_size |
-size the integrity key and |
-- |
flags |
-flags for the integrity device activation |
-- |
extra |
-extra arguments for integrity open. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
Tech category: BD_CRYPTO_TECH_INTEGRITY-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_integrity_close (-const gchar *integrity_device, -GError **error);
integrity_device |
-integrity device to close |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given integrity_device
-was successfully closed or not
Tech category: BD_CRYPTO_TECH_INTEGRITY-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
void
-bd_crypto_luks_token_info_free (BDCryptoLUKSTokenInfo *info);
-Frees info
-.
[skip]
- -BDCryptoLUKSTokenInfo *
-bd_crypto_luks_token_info_copy (BDCryptoLUKSTokenInfo *info);
-Creates a new copy of info
-.
[skip]
- -BDCryptoLUKSTokenInfo ** -bd_crypto_luks_token_info (-const gchar *device, -GError **error);
device |
-a device to get LUKS2 token information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about tokens on device
-
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_QUERY.
[array zero-terminated=1]
-gboolean -bd_crypto_keyring_add_key (-const gchar *key_desc, -const guint8 *key_data, -gsize data_len, -GError **error);
key_desc |
-kernel keyring key description |
-- |
key_data |
-a key to add to kernel keyring (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
error |
-place to store error (if any) -*. |
-[out][optional] | -
whether the given key was successfully saved to kernel keyring or not
-Tech category: BD_CRYPTO_TECH_KEYRING-BD_CRYPTO_TECH_MODE_ADD_KEY
gboolean -bd_crypto_luks_open_keyring (-const gchar *device, -const gchar *name, -const gchar *key_desc, -gboolean read_only, -GError **error);
Note: Keyslot passphrase must be stored in 'user' key type and the key has to be reachable - by process context on behalf of which this function is called.
-device |
-the device to open |
-- |
name |
-name for the LUKS device |
-- |
key_desc |
-kernel keyring key description |
-- |
read_only |
-whether to open as read-only or not (meaning read-write) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
Tech category: BD_CRYPTO_TECH_LUKS-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_tc_open (-const gchar *device, -const gchar *name, -const guint8 *pass_data, -gsize data_len, -gboolean read_only, -GError **error);
device |
-the device to open |
-- |
name |
-name for the TrueCrypt/VeraCrypt device |
-- |
pass_data |
-a passphrase for the TrueCrypt/VeraCrypt volume (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
read_only |
-whether to open as read-only or not (meaning read-write) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
Tech category: BD_CRYPTO_TECH_TRUECRYPT-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_tc_open_full (-const gchar *device, -const gchar *name, -const guint8 *pass_data, -gsize data_len, -const gchar **keyfiles, -gboolean hidden, -gboolean system, -gboolean veracrypt, -guint32 veracrypt_pim, -gboolean read_only, -GError **error);
device |
-the device to open |
-- |
name |
-name for the TrueCrypt/VeraCrypt device |
-- |
pass_data |
-a passphrase for the TrueCrypt/VeraCrypt volume (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
read_only |
-whether to open as read-only or not (meaning read-write) |
-- |
keyfiles |
-paths to the keyfiles for the TrueCrypt/VeraCrypt volume. |
-[nullable][array zero-terminated=1] | -
hidden |
-whether a hidden volume inside the volume should be opened |
-- |
system |
-whether to try opening as an encrypted system (with boot loader) |
-- |
veracrypt |
-whether to try VeraCrypt modes (TrueCrypt modes are tried anyway) |
-- |
veracrypt_pim |
-VeraCrypt PIM value |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
Tech category: BD_CRYPTO_TECH_TRUECRYPT-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_tc_close (-const gchar *tc_device, -GError **error);
tc_device |
-TrueCrypt/VeraCrypt device to close |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given tc_device
-was successfully closed or not
Tech category: BD_CRYPTO_TECH_TRUECRYPT-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_escrow_device (-const gchar *device, -const gchar *passphrase, -const gchar *cert_data, -const gchar *directory, -const gchar *backup_passphrase, -GError **error);
device |
-path of the device to create escrow data for |
-- |
passphrase |
-passphrase used for the device |
-- |
cert_data |
-certificate data to use for escrow. |
-[array zero-terminated=1][element-type gchar] | -
directory |
-directory to put escrow data into |
-- |
backup_passphrase |
-backup passphrase for the device or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the escrow data was successfully created for device
-or not
Tech category: BD_CRYPTO_TECH_ESCROW-BD_CRYPTO_TECH_MODE_CREATE
gboolean -bd_crypto_bitlk_open (-const gchar *device, -const gchar *name, -const guint8 *pass_data, -gsize data_len, -gboolean read_only, -GError **error);
device |
-the device to open |
-- |
name |
-name for the BITLK device |
-- |
pass_data |
-a passphrase for the BITLK volume (may contain arbitrary binary data). |
-[array length=data_len] | -
data_len |
-length of the |
-- |
read_only |
-whether to open as read-only or not (meaning read-write) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully opened or not
Tech category: BD_CRYPTO_TECH_BITLK-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_bitlk_close (-const gchar *bitlk_device, -GError **error);
bitlk_device |
-BITLK device to close |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given bitlk_device
-was successfully closed or not
Tech category: BD_CRYPTO_TECH_BITLK-BD_CRYPTO_TECH_MODE_OPEN_CLOSE
gboolean -bd_crypto_is_tech_avail (-BDCryptoTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDCryptoTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
#define BD_CRYPTO_BACKUP_PASSPHRASE_CHARSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./" --
typedef struct {
- guint64 data_alignment;
- gchar *data_device;
- gchar *integrity;
- guint64 sector_size;
- gchar *label;
- gchar *subsystem;
- BDCryptoLUKSPBKDF *pbkdf;
-} BDCryptoLUKSExtra;
-
-guint64 |
-data alignment in sectors, 0 for default/auto detection |
-- |
gchar * |
-detached encrypted data device or NULL |
-- |
gchar * |
-integrity algorithm (e.g. "hmac-sha256") or NULL for no integrity support -Note: this field is valid only for LUKS 2 |
-- |
guint64 |
-encryption sector size, 0 for default (512) -Note: this field is valid only for LUKS 2 |
-- |
gchar * |
-LUKS header label or NULL -Note: this field is valid only for LUKS 2 |
-- |
gchar * |
-LUKS header subsystem or NULL -Note: this field is valid only for LUKS 2 |
-- |
BDCryptoLUKSPBKDF * |
-key derivation function specification or NULL for default -Note: this field is valid only for LUKS 2 |
-- |
typedef struct {
- gchar *type;
- gchar *hash;
- guint32 max_memory_kb;
- guint32 iterations;
- guint32 time_ms;
- guint32 parallel_threads;
-} BDCryptoLUKSPBKDF;
-
-gchar * |
-PBKDF algorithm |
-- |
gchar * |
-hash for LUKS header or NULL |
-- |
guint32 |
-requested memory cost (in KiB) or 0 for default (benchmark) |
-- |
guint32 |
-requested iterations or 0 for default (benchmark) |
-- |
guint32 |
-requested time cost or 0 for default (benchmark) |
-- |
guint32 |
-requested parallel cost (threads) or 0 for default (benchmark) |
-- |
typedef struct {
- BDCryptoLUKSVersion version;
- gchar *cipher;
- gchar *mode;
- gchar *uuid;
- gchar *backing_device;
- gint64 sector_size;
- gchar *label;
- gchar *subsystem;
-} BDCryptoLUKSInfo;
-
-BDCryptoLUKSVersion |
-LUKS version |
-- |
gchar * |
-used cipher (e.g. "aes") |
-- |
gchar * |
-used cipher mode (e.g. "xts-plain") |
-- |
gchar * |
-UUID of the LUKS device |
-- |
gchar * |
-name of the underlying block device |
-- |
gint64 |
-size (in bytes) of encryption sector (valid only for LUKS 2) |
-- |
gchar * |
-label of the LUKS device (valid only for LUKS 2) |
-- |
gchar * |
-subsystem of the LUKS device (valid only for LUKS 2) |
-- |
typedef struct {
- gchar *algorithm;
- guint32 key_size;
- guint32 sector_size;
- guint32 tag_size;
- guint32 interleave_sectors;
- guint64 journal_size;
- gchar *journal_crypt;
- gchar *journal_integrity;
-} BDCryptoIntegrityInfo;
-
-gchar * |
-integrity algorithm |
-- |
guint32 |
-integrity key size in bytes |
-- |
guint32 |
-sector size in bytes |
-- |
guint32 |
-tag size per-sector in bytes |
-- |
guint32 |
-number of interleave sectors |
-- |
guint64 |
-size of journal in bytes |
-- |
gchar * |
-journal encryption algorithm |
-- |
gchar * |
-journal integrity algorithm |
-- |
typedef struct {
- guint32 sector_size;
- guint64 journal_size;
- guint journal_watermark;
- guint journal_commit_time;
- guint32 interleave_sectors;
- guint32 tag_size;
- guint32 buffer_sectors;
-} BDCryptoIntegrityExtra;
-
-guint32 |
-integrity sector size |
-- |
guint64 |
-size of journal in bytes |
-- |
guint |
-journal flush watermark in percents; in bitmap mode sectors-per-bit |
-- |
guint |
-journal commit time (or bitmap flush time) in ms |
-- |
guint32 |
-number of interleave sectors (power of two) |
-- |
guint32 |
-tag size per-sector in bytes |
-- |
guint32 |
-number of sectors in one buffer |
-- |
typedef struct {
- guint id;
- gchar *type;
- gint keyslot;
-} BDCryptoLUKSTokenInfo;
-
-
-| -Top - | -
| -gboolean - | --bd_dm_check_deps () - | -
| -void - | --bd_dm_close () - | -
| -gboolean - | --bd_dm_init () - | -
| -GQuark - | --bd_dm_error_quark () - | -
| -gboolean - | --bd_dm_create_linear () - | -
| -gboolean - | --bd_dm_remove () - | -
| -gchar * - | --bd_dm_name_from_node () - | -
| -gchar * - | --bd_dm_node_from_name () - | -
| -gboolean - | --bd_dm_map_exists () - | -
| -gchar * - | --bd_dm_get_subsystem_from_name () - | -
| -gchar ** - | --bd_dm_get_member_raid_sets () - | -
| -gboolean - | --bd_dm_activate_raid_set () - | -
| -gboolean - | --bd_dm_deactivate_raid_set () - | -
| -gchar * - | --bd_dm_get_raid_set_type () - | -
| -gboolean - | --bd_dm_is_tech_avail () - | -
| #define | -BD_DM_ERROR | -
| enum | -BDDMError | -
| enum | -BDDMTech | -
| enum | -BDDMTechMode | -
void
-bd_dm_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean
-bd_dm_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-gboolean -bd_dm_create_linear (-const gchar *map_name, -const gchar *device, -guint64 length, -const gchar *uuid, -GError **error);
map_name |
-name of the map |
-- |
device |
-device to create map for |
-- |
length |
-length of the mapping in sectors |
-- |
uuid |
-UUID for the new dev mapper device or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new linear mapping map_name
-was successfully created
-for the device
-or not
Tech category: BD_DM_TECH_MAP-BD_DM_TECH_MODE_CREATE_ACTIVATE
gboolean -bd_dm_remove (-const gchar *map_name, -GError **error);
map_name |
-name of the map to remove |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the map_name
-map was successfully removed or not
Tech category: BD_DM_TECH_MAP-BD_DM_TECH_MODE_REMOVE_DEACTIVATE
gchar * -bd_dm_name_from_node (-const gchar *dm_node, -GError **error);
dm_node |
-name of the DM node (e.g. "dm-0") |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
map name of the map providing the dm_node
-device or NULL
-(error
-) contains the error in such cases)
Tech category: BD_DM_TECH_MAP-BD_DM_TECH_MODE_QUERY
gchar * -bd_dm_node_from_name (-const gchar *map_name, -GError **error);
map_name |
-name of the queried DM map |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
DM node name for the map_name
-map or NULL (error
-) contains
-the error in such cases)
Tech category: BD_DM_TECH_MAP-BD_DM_TECH_MODE_QUERY
gboolean -bd_dm_map_exists (-const gchar *map_name, -gboolean live_only, -gboolean active_only, -GError **error);
map_name |
-name of the queried map |
-- |
live_only |
-whether to go through the live maps only or not |
-- |
active_only |
-whether to ignore suspended maps or not |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given map_name
-exists (and is live if live_only
-is
-TRUE (and is active if active_only
-is TRUE)).
Tech category: BD_DM_TECH_MAP-BD_DM_TECH_MODE_QUERY
gchar * -bd_dm_get_subsystem_from_name (- - -const gchar *device_name, -GError **error);
gchar ** -bd_dm_get_member_raid_sets (-const gchar *name, -const gchar *uuid, -gint major, -gint minor, -GError **error);
name |
-name of the member. |
-[nullable] | -
uuid |
-uuid of the member. |
-[nullable] | -
major |
-major number of the device or -1 if not specified |
-- |
minor |
-minor number of the device or -1 if not specified |
-- |
error |
-variable to store error (if any). |
-[out][optional] | -
list of names of the RAID sets related to
-the member or NULL in case of error
One of name
-, uuid
-or major
-:minor
-has to be given.
Tech category: BD_DM_TECH_RAID-BD_DM_TECH_MODE_QUERY.
[transfer full][array zero-terminated=1]
-gboolean -bd_dm_activate_raid_set (-const gchar *name, -GError **error);
name |
-name of the DM RAID set to activate |
-- |
error |
-variable to store error (if any). |
-[out][optional] | -
whether the RAID set name
-was successfully activate or not
Tech category: BD_DM_TECH_RAID-BD_DM_TECH_MODE_CREATE_ACTIVATE
gboolean -bd_dm_deactivate_raid_set (-const gchar *name, -GError **error);
name |
-name of the DM RAID set to deactivate |
-- |
error |
-variable to store error (if any). |
-[out][optional] | -
whether the RAID set name
-was successfully deactivate or not
Tech category: BD_DM_TECH_RAID-BD_DM_TECH_MODE_REMOVE_DEACTIVATE
gchar * -bd_dm_get_raid_set_type (-const gchar *name, -GError **error);
name |
-name of the DM RAID set to get the type of |
-- |
error |
-variable to store error (if any). |
-[out][optional] | -
string representation of the name
-RAID set's type
Tech category: BD_DM_TECH_RAID-BD_DM_TECH_MODE_QUERY
gboolean -bd_dm_is_tech_avail (-BDDMTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDDMTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
| -Top - | -
| typedef | -BDFSExt2Info | -
| typedef | -BDFSExt3Info | -
| typedef | -BDFSExt4Info | -
| enum | -BDFsError | -
| #define | -BD_FS_ERROR | -
| enum | -BDFSConfigureFlags | -
| enum | -BDFSFeatureFlags | -
| - | BDFSFeatures | -
| enum | -BDFSFsckFlags | -
| - | BDFSMkfsOptions | -
| enum | -BDFSMkfsOptionsFlags | -
| - | BDFSXfsInfo | -
| - | BDFSVfatInfo | -
| enum | -BDFSTech | -
| enum | -BDFSTechMode | -
| enum | -BDFsResizeFlags | -
| - | BDFSNtfsInfo | -
| - | BDFSF2FSInfo | -
| enum | -BDFSF2FSFeature | -
| - | BDFSNILFS2Info | -
| - | BDFSExfatInfo | -
| - | BDFSBtrfsInfo | -
| - | BDFSUdfInfo | -
gboolean
-bd_fs_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_fs_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean -bd_fs_wipe (- -const gchar *device, -gboolean all, -gboolean force, -GError **error);
whether signatures were successfully wiped on device
-or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_WIPE
gboolean -bd_fs_clean (-const gchar *device, -gboolean force, -GError **error);
Clean all signatures from device
-.
-Difference between this and bd_fs_wipe() is that this function doesn't
-return error if device
- is already empty. This will also always remove
-all signatures from device
-, not only the first one.
device |
-the device to clean |
-- |
force |
-whether to wipe signatures on a mounted |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether device
-was successfully cleaned or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_WIPE
gchar * -bd_fs_get_fstype (-const gchar *device, -GError **error);
Get first signature on device
- as a string.
device |
-the device to probe |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
type of filesystem found on device
-, NULL in case
-no signature has been detected or in case of error
-(error
-is set in this case)
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_fs_freeze (-const gchar *mountpoint, -GError **error);
Freezes filesystem mounted on mountpoint
-. The filesystem must
-support freezing.
gboolean -bd_fs_unfreeze (-const gchar *mountpoint, -GError **error);
Un-freezes filesystem mounted on mountpoint
-. The filesystem must
-support freezing.
gboolean -bd_fs_mount (-const gchar *device, -const gchar *mountpoint, -const gchar *fstype, -const gchar *options, -const BDExtraArg **extra, -GError **error);
device |
-device to mount, if not specified |
-[nullable] | -
mountpoint |
-mountpoint for |
-[nullable] | -
fstype |
-filesystem type. |
-[nullable] | -
options |
-comma delimited options for mount. |
-[nullable] | -
extra |
-extra options for the unmount -currently only 'run_as_uid' -and 'run_as_gid' are supported -value must be a valid non zero -uid (gid). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether device
-(or mountpoint
-) was successfully mounted or not
Tech category: BD_FS_TECH_MOUNT (no mode, ignored)
gboolean -bd_fs_unmount (-const gchar *spec, -gboolean lazy, -gboolean force, -const BDExtraArg **extra, -GError **error);
spec |
-mount point or device to unmount |
-- |
lazy |
-enable/disable lazy unmount |
-- |
force |
-enable/disable force unmount |
-- |
extra |
-extra options for the unmount -currently only 'run_as_uid' -and 'run_as_gid' are supported -value must be a valid non zero -uid (gid). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether spec
-was successfully unmounted or not
Tech category: BD_FS_TECH_MOUNT (no mode, ignored)
gchar * -bd_fs_get_mountpoint (-const gchar *device, -GError **error);
Get mountpoint for device
-. If device
- is mounted multiple times only
-one mountpoint will be returned.
device |
-device to find mountpoint for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
mountpoint for device
-, NULL in case device is
-not mounted or in case of an error (error
-is set
-in this case)
Tech category: BD_FS_TECH_MOUNT (no mode, ignored).
[transfer full]
-gboolean -bd_fs_is_mountpoint (-const gchar *path, -GError **error);
path |
-path (folder) to check |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether path
-is a mountpoint or not
Tech category: BD_FS_TECH_MOUNT (no mode, ignored)
gboolean -bd_fs_resize (-const gchar *device, -guint64 new_size, -const gchar *fstype, -GError **error);
Resize filesystem on device
-. This calls other fs resize functions from this
-plugin based on provides or detected filesystem (e.g. bd_fs_xfs_resize for XFS).
-This function will return an error for unknown/unsupported filesystems.
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system (if 0, the file system is -adapted to the underlying block device) |
-- |
fstype |
-the filesystem type on |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_repair (-const gchar *device, -const gchar *fstype, -GError **error);
Repair filesystem on device
-. This calls other fs repair functions from this
-plugin based on detected filesystem (e.g. bd_fs_xfs_repair for XFS). This
-function will return an error for unknown/unsupported filesystems.
device |
-the device the file system of which to repair |
-- |
fstype |
-the filesystem type on |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully repaired or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_check (-const gchar *device, -const gchar *fstype, -GError **error);
Check filesystem on device
-. This calls other fs check functions from this
-plugin based on detected filesystem (e.g. bd_fs_xfs_check for XFS). This
-function will return an error for unknown/unsupported filesystems.
device |
-the device the file system of which to check |
-- |
fstype |
-the filesystem type on |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-passed the consistency check or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_CHECK
gboolean -bd_fs_set_label (-const gchar *device, -const gchar *label, -const gchar *fstype, -GError **error);
Set label for filesystem on device
-. This calls other fs label functions from this
-plugin based on detected filesystem (e.g. bd_fs_xfs_set_label for XFS). This
-function will return an error for unknown/unsupported filesystems.
device |
-the device with file system to set the label for |
-- |
label |
-label to set |
-- |
fstype |
-the filesystem type on |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully relabeled or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_check_label (-const gchar *fstype, -const gchar *label, -GError **error);
This calls other fs check label functions from this plugin based on the provided -filesystem (e.g. bd_fs_xfs_check_label for XFS). This function will return -an error for unknown/unsupported filesystems.
- - -guint64 -bd_fs_get_size (-const gchar *device, -const gchar *fstype, -GError **error);
Get size for filesystem on device
-. This calls other fs info functions from this
-plugin based on detected filesystem (e.g. bd_fs_xfs_get_info for XFS). This
-function will return an error for unknown/unsupported filesystems.
device |
-the device with file system to get size for |
-- |
fstype |
-the filesystem type on |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
size of filesystem on device
-, 0 in case of error.
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
guint64 -bd_fs_get_free_space (-const gchar *device, -const gchar *fstype, -GError **error);
Get free space for filesystem on device
-. This calls other fs info functions from this
-plugin based on detected filesystem (e.g. bd_fs_ext4_get_info for ext4). This
-function will return an error for unknown/unsupported filesystems.
device |
-the device with file system to get free space for |
-- |
fstype |
-the filesystem type on |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
free space of filesystem on device
-, 0 in case of error.
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_resize (-const gchar *type, -BDFsResizeFlags *mode, -gchar **required_utility, -GError **error);
Searches for the required utility to resize the given filesystem and returns whether -it is installed. The mode flags indicate if growing and/or shrinking resize is available if -mounted/unmounted. -Unknown filesystems or filesystems which do not support resizing result in errors.
-type |
-the filesystem type to be tested for installed resize support |
-- |
mode |
-flags for allowed resizing (i.e. growing/shrinking support for online/offline). |
-[out] | -
required_utility |
-the utility binary which is required for resizing (if missing i.e. returns FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether filesystem resize is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_check (-const gchar *type, -gchar **required_utility, -GError **error);
Searches for the required utility to check the given filesystem and returns whether -it is installed. -Unknown filesystems or filesystems which do not support checking result in errors.
-type |
-the filesystem type to be tested for installed consistency check support |
-- |
required_utility |
-the utility binary which is required for checking (if missing i.e. returns FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether filesystem check is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_repair (-const gchar *type, -gchar **required_utility, -GError **error);
Searches for the required utility to repair the given filesystem and returns whether -it is installed. -Unknown filesystems or filesystems which do not support reparing result in errors.
-type |
-the filesystem type to be tested for installed repair support |
-- |
required_utility |
-the utility binary which is required for repairing (if missing i.e. return FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether filesystem repair is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_set_label (-const gchar *type, -gchar **required_utility, -GError **error);
Searches for the required utility to set the label of the given filesystem and returns whether -it is installed. -Unknown filesystems or filesystems which do not support setting the label result in errors.
-type |
-the filesystem type to be tested for installed label support |
-- |
required_utility |
-the utility binary which is required for relabeling (if missing i.e. return FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether setting filesystem label is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_get_size (-const gchar *type, -gchar **required_utility, -GError **error);
Searches for the required utility to get size of the given filesystem and -returns whether it is installed. -Unknown filesystems or filesystems which do not support size querying result in errors.
-type |
-the filesystem type to be tested for installed size querying support |
-- |
required_utility |
-the utility binary which is required -for size querying (if missing i.e. return FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether getting filesystem size is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_get_free_space (-const gchar *type, -gchar **required_utility, -GError **error);
Searches for the required utility to get free space of the given filesystem and -returns whether it is installed. -Unknown filesystems or filesystems which do not support free space querying result in errors.
-type |
-the filesystem type to be tested for installed free space querying support |
-- |
required_utility |
-the utility binary which is required -for free space querying (if missing i.e. return FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether getting filesystem free space is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_can_set_uuid (-const gchar *type, -gchar **required_utility, -GError **error);
Searches for the required utility to set the UUID of the given filesystem and returns whether -it is installed. -Unknown filesystems or filesystems which do not support setting the UUID result in errors.
-type |
-the filesystem type to be tested for installed UUID support |
-- |
required_utility |
-the utility binary which is required for setting UUID (if missing i.e. return FALSE but no error). |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether setting filesystem UUID is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_set_uuid (-const gchar *device, -const gchar *uuid, -const gchar *fstype, -GError **error);
Set UUID for filesystem on device
-. This calls other fs UUID functions from this
-plugin based on detected filesystem (e.g. bd_fs_xfs_set_uuid for XFS). This
-function will return an error for unknown/unsupported filesystems.
whether the UUID on the file system on device
-was successfully changed or not
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_check_uuid (-const gchar *fstype, -const gchar *uuid, -GError **error);
This calls other fs check uuid functions from this plugin based on the provided -filesystem (e.g. bd_fs_xfs_check_uuid for XFS). This function will return -an error for unknown/unsupported filesystems.
- - -const BDFSFeatures * -bd_fs_features (-const gchar *fstype, -GError **error);
Returns (transfer-none): features supported by fstype
-, see BDFSFeatures for more information.
Tech category: always available
- -BDFSFeatures *
-bd_fs_features_copy (BDFSFeatures *data);
-Creates a new copy of data
-.
[skip]
- -gboolean -bd_fs_can_mkfs (-const gchar *type, -BDFSMkfsOptionsFlags *options, -gchar **required_utility, -GError **error);
Searches for the required utility to create the given filesystem and returns whether
-it is installed. The options flags indicate what additional options can be specified for type
-.
-Unknown filesystems result in errors.
type |
-the filesystem type to be tested for installed mkfs support |
-- |
options |
-flags for allowed mkfs options (i.e. support for setting label or UUID when creating the filesystem). |
-[out] | -
required_utility |
-the utility binary which is required for creating (if missing returns |
-[out][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether filesystem mkfs tool is available
-Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY
gboolean -bd_fs_mkfs (-const gchar *device, -const gchar *fstype, -BDFSMkfsOptions *options, -const BDExtraArg **extra, -GError **error);
This is a helper function for creating filesystems with extra options.
-This is the same as running a filesystem-specific function like bd_fs_ext4_mkfs
-and manually specifying the extra command line options. BDFSMkfsOptions
-removes the need to specify supported options for selected filesystems,
-make sure to check whether fstype
- supports these options (see bd_fs_can_mkfs)
-for details.
When specifying additional mkfs options using extra
-, it's caller's
-responsibility to make sure these options do not conflict with options
-specified using options
-. Extra options are added after the options
- and
-there are no additional checks for duplicate and/or conflicting options.
device |
-the device to create the new filesystem on |
-- |
fstype |
-name of the filesystem to create (e.g. "ext4") |
-- |
options |
-additional options like label or UUID for the filesystem |
-- |
extra |
-extra mkfs options not provided in |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether fstype
-was successfully created on device
-or not.
Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_MKFS
BDFSMkfsOptions *
-bd_fs_mkfs_options_copy (BDFSMkfsOptions *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_mkfs_options_free (BDFSMkfsOptions *data);
-Frees data
-.
[skip]
- -const gchar **
-bd_fs_supported_filesystems (GError **error);
-
-list of filesystems supported by this plugin
-Note: This returns filesystems supported by libblockdev, but not necessarily
-by the systems this is running on, for this information you need to
-run one of the bd_fs_can_ functions.
Tech category: always available.
-[transfer container][array zero-terminated=1]
-gboolean -bd_fs_ext2_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system on which to check |
-- |
extra |
-extra options for the check (right now -passed to the 'e2fsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an ext2 file system on the device
-is clean or not
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_CHECK
BDFSExt2Info * -bd_fs_ext2_get_info (-const gchar *device, -GError **error);
device |
-the device the file system of which to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSExt2Info *
-bd_fs_ext2_info_copy (BDFSExt2Info *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_ext2_info_free (BDFSExt2Info *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_ext2_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new ext2 fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mke2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new ext2 fs was successfully created on device
-or not
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_ext2_repair (-const gchar *device, -gboolean unsafe, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system on which to repair |
-- |
unsafe |
-whether to do unsafe operations too |
-- |
extra |
-extra options for the repair (right now -passed to the 'e2fsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an ext2 file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_ext2_resize (-const gchar *device, -guint64 new_size, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system (if 0, the file system is -adapted to the underlying block device) |
-- |
extra |
-extra options for the resize (right now -passed to the 'resize2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_ext2_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device the file system on which to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of ext2 file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_ext2_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_ext2_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device the file system on which to set UUID for |
-- |
uuid |
-UUID to set |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of ext2 file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_ext2_check_uuid (- - -const gchar *uuid, -GError **error);
gboolean -bd_fs_ext3_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system on which to check |
-- |
extra |
-extra options for the check (right now -passed to the 'e2fsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an ext3 file system on the device
-is clean or not
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_CHECK
BDFSExt3Info * -bd_fs_ext3_get_info (-const gchar *device, -GError **error);
device |
-the device the file system of which to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSExt3Info *
-bd_fs_ext3_info_copy (BDFSExt3Info *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_ext3_info_free (BDFSExt3Info *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_ext3_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new ext3 fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mke2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new ext3 fs was successfully created on device
-or not
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_ext3_repair (-const gchar *device, -gboolean unsafe, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system on which to repair |
-- |
unsafe |
-whether to do unsafe operations too |
-- |
extra |
-extra options for the repair (right now -passed to the 'e2fsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an ext3 file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_ext3_resize (-const gchar *device, -guint64 new_size, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system (if 0, the file system is -adapted to the underlying block device) |
-- |
extra |
-extra options for the resize (right now -passed to the 'resize2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_ext3_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device the file system on which to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of ext3 file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_ext3_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_ext3_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device the file system on which to set UUID for |
-- |
uuid |
-UUID to set |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of ext3 file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_ext3_check_uuid (- - -const gchar *uuid, -GError **error);
gboolean -bd_fs_ext4_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system on which to check |
-- |
extra |
-extra options for the check (right now -passed to the 'e2fsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an ext4 file system on the device
-is clean or not
Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_CHECK
BDFSExt4Info * -bd_fs_ext4_get_info (-const gchar *device, -GError **error);
device |
-the device the file system of which to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSExt4Info *
-bd_fs_ext4_info_copy (BDFSExt4Info *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_ext4_info_free (BDFSExt4Info *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_ext4_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new ext4 fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkfs.ext4' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new ext4 fs was successfully created on device
-or not
Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_ext4_repair (-const gchar *device, -gboolean unsafe, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system on which to repair |
-- |
unsafe |
-whether to do unsafe operations too |
-- |
extra |
-extra options for the repair (right now -passed to the 'e2fsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an ext4 file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_ext4_resize (-const gchar *device, -guint64 new_size, -const BDExtraArg **extra, -GError **error);
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system (if 0, the file system is -adapted to the underlying block device) |
-- |
extra |
-extra options for the resize (right now -passed to the 'resize2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_ext4_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device the file system on which to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of ext4 file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_ext4_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_ext4_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device the file system on which to set UUID for |
-- |
uuid |
-UUID to set |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of ext4 file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_ext4_check_uuid (- - -const gchar *uuid, -GError **error);
gboolean -bd_fs_xfs_check (-const gchar *device, -GError **error);
device |
-the device containing the file system to check |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether an xfs file system on the device
-is clean or not
Note: If the file system is mounted RW, it will always be reported as not -clean!
-Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_CHECK
BDFSXfsInfo * -bd_fs_xfs_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for (device must -be mounted, trying to get info for an unmounted device will result -in an error) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSXfsInfo *
-bd_fs_xfs_info_copy (BDFSXfsInfo *data);
-Creates a new copy of data
-.
[skip]
- -gboolean -bd_fs_xfs_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new xfs fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkfs.xfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new xfs fs was successfully created on device
-or not
Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_xfs_repair (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to repair |
-- |
extra |
-extra options for the repair (right now -passed to the 'xfs_repair' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an xfs file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_xfs_resize (-const gchar *mpoint, -guint64 new_size, -const BDExtraArg **extra, -GError **error);
mpoint |
-the mount point of the file system to resize |
-- |
new_size |
-new requested size for the file system *in file system blocks* (see |
-- |
extra |
-extra options for the resize (right now -passed to the 'xfs_growfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system mounted on mpoint
-was successfully resized or not
Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_xfs_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device containing the file system to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of xfs file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_xfs_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_xfs_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device containing the file system to set uuid for |
-- |
uuid |
-UUID to set |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of xfs file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_xfs_check_uuid (- - -const gchar *uuid, -GError **error);
gboolean -bd_fs_vfat_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to check |
-- |
extra |
-extra options for the repair (right now -passed to the 'fsck.vfat' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an vfat file system on the device
-is clean or not
Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_CHECK
BDFSVfatInfo * -bd_fs_vfat_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSVfatInfo *
-bd_fs_vfat_info_copy (BDFSVfatInfo *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_vfat_info_free (BDFSVfatInfo *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_vfat_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
Please remember that FAT labels should always be uppercase.
-device |
-the device to create a new vfat fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkfs.vfat' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new vfat fs was successfully created on device
-or not
Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_vfat_repair (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to repair |
-- |
extra |
-extra options for the repair (right now -passed to the 'fsck.vfat' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an vfat file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_vfat_resize (-const gchar *device, -guint64 new_size, -GError **error);
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system (if 0, the file system is -adapted to the underlying block device) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_vfat_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device containing the file system to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of vfat file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_vfat_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_is_tech_avail (-BDFSTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDFSTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
gboolean -bd_fs_ntfs_check (-const gchar *device, -GError **error);
device |
-the device containing the file system to check |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether an ntfs file system on the device
-is clean or not
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_CHECK
BDFSNtfsInfo * -bd_fs_ntfs_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for (device must -not be mounted, trying to get info for a mounted device will result -in an error) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_fs_ntfs_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new ntfs fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkntfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new NTFS fs was successfully created on device
-or not
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_ntfs_repair (-const gchar *device, -GError **error);
device |
-the device containing the file system to repair |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether an NTFS file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_ntfs_resize (-const gchar *device, -guint64 new_size, -GError **error);
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system in bytes (if 0, the file system -is adapted to the underlying block device) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_ntfs_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device containing the file system to set the label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of the NTFS file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_ntfs_check_label (- - -const gchar *label, -GError **error);
BDFSNtfsInfo *
-bd_fs_ntfs_info_copy (BDFSNtfsInfo *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_ntfs_info_free (BDFSNtfsInfo *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_ntfs_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device containing the file system to set the UUID (serial number) for |
-- |
uuid |
-UUID to set or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of the NTFS file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_ntfs_check_uuid (- - -const gchar *uuid, -GError **error);
BDFSF2FSInfo *
-bd_fs_f2fs_info_copy (BDFSF2FSInfo *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_f2fs_info_free (BDFSF2FSInfo *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_f2fs_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new f2fs fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkfs.f2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new f2fs fs was successfully created on device
-or not
Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_f2fs_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to check |
-- |
extra |
-extra options for the repair (right now -passed to the 'fsck.f2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an f2fs file system on the device
-is clean or not
Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_CHECK
gboolean -bd_fs_f2fs_repair (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to repair |
-- |
extra |
-extra options for the repair (right now -passed to the 'fsck.f2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an f2fs file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_REPAIR
BDFSF2FSInfo * -bd_fs_f2fs_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_fs_f2fs_resize (-const gchar *device, -guint64 new_size, -gboolean safe, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to resize |
-- |
new_size |
-new requested size for the file system *in file system sectors* (see |
-- |
safe |
-whether to perform safe resize or not (does not resize metadata) |
-- |
extra |
-extra options for the resize (right now -passed to the 'resize.f2fs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_RESIZE
BDFSNILFS2Info * -bd_fs_nilfs2_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSNILFS2Info *
-bd_fs_nilfs2_info_copy (BDFSNILFS2Info *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_nilfs2_info_free (BDFSNILFS2Info *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_nilfs2_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new nilfs fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkfs.nilfs2' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new nilfs fs was successfully created on device
-or not
Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_nilfs2_resize (-const gchar *device, -guint64 new_size, -GError **error);
device |
-the device the file system of which to resize |
-- |
new_size |
-new requested size for the file system (if 0, the file system is -adapted to the underlying block device) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the file system on device
-was successfully resized or not
Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_RESIZE
gboolean -bd_fs_nilfs2_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device containing the file system to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of nilfs file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_nilfs2_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_nilfs2_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device containing the file system to set UUID for |
-- |
uuid |
-UUID to set or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the uuid of nilfs file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_nilfs2_check_uuid (- - -const gchar *uuid, -GError **error);
gboolean -bd_fs_exfat_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to check |
-- |
extra |
-extra options for the repair (right now -passed to the 'exfatfsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the exfat file system on the device
-is clean or not
Tech category: BD_FS_TECH_EXFAT-BD_FS_TECH_MODE_CHECK
BDFSExfatInfo * -bd_fs_exfat_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
-Tech category: BD_FS_TECH_EXFAT-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSExfatInfo *
-bd_fs_exfat_info_copy (BDFSExfatInfo *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_exfat_info_free (BDFSExfatInfo *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_exfat_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new exfat fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkexfatfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new exfat fs was successfully created on device
-or not
Tech category: BD_FS_TECH_EXFAT-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_exfat_repair (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to repair |
-- |
extra |
-extra options for the repair (right now -passed to the 'exfatfsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the exfat file system on the device
-was successfully repaired
-(if needed) or not (error is set in that case)
Tech category: BD_FS_TECH_EXFAT-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_exfat_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-the device containing the file system to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of exfat file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_EXFAT-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_exfat_check_label (- - -const gchar *label, -GError **error);
BDFSBtrfsInfo * -bd_fs_btrfs_get_info (-const gchar *mpoint, -GError **error);
mpoint |
-a mountpoint of the btrfs filesystem to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Note: This function WON'T WORK for multi device btrfs filesystems, -for more complicated setups use the btrfs plugin instead.
-Tech category: BD_FS_TECH_BTRFS-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSBtrfsInfo *
-bd_fs_btrfs_info_copy (BDFSBtrfsInfo *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_fs_btrfs_info_free (BDFSBtrfsInfo *data);
-Frees data
-.
[skip]
- -gboolean -bd_fs_btrfs_mkfs (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new btrfs fs on |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkfs.btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new btrfs fs was successfully created on device
-or not
Tech category: BD_FS_TECH_BTRFS-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_btrfs_check (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to check |
-- |
extra |
-extra options for the check (right now -passed to the 'btrfsck' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the filesystem was successfully checked or not
-Tech category: BD_FS_TECH_BTRFS-BD_FS_TECH_MODE_CHECK
gboolean -bd_fs_btrfs_repair (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the device containing the file system to repair |
-- |
extra |
-extra options for the repair (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the filesystem was successfully checked and repaired or not
-Tech category: BD_FS_TECH_BTRFS-BD_FS_TECH_MODE_REPAIR
gboolean -bd_fs_btrfs_set_label (-const gchar *mpoint, -const gchar *label, -GError **error);
mpoint |
-the mount point of the file system to resize |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of Btrfs file system on the mpoint
-was
-successfully set or not
Note: This function is intended to be used for btrfs filesystem on a single device, -for more complicated setups use the btrfs plugin instead.
-Tech category: BD_FS_TECH_BTRFS-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_btrfs_check_label (- - -const gchar *label, -GError **error);
gboolean -bd_fs_btrfs_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device containing the file system to set the UUID (serial number) for |
-- |
uuid |
-UUID to set or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of the Btrfs file system on the device
-was
-successfully set or not
Note: This function is intended to be used for btrfs filesystem on a single device, -for more complicated setups use the btrfs plugin instead.
-Tech category: BD_FS_TECH_BTRFS-BD_FS_TECH_MODE_SET_UUID
gboolean -bd_fs_btrfs_check_uuid (- - -const gchar *uuid, -GError **error);
gboolean -bd_fs_btrfs_resize (-const gchar *mpoint, -guint64 new_size, -const BDExtraArg **extra, -GError **error);
mpoint |
-a mountpoint of the to be resized btrfs filesystem |
-- |
new_size |
-requested new size |
-- |
extra |
-extra options for the volume resize (right now -passed to the 'btrfs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the mpoint
-filesystem was successfully resized to new_size
-or not
Note: This function WON'T WORK for multi device btrfs filesystems, -for more complicated setups use the btrfs plugin instead.
-Tech category: BD_BTRFS_TECH_FS-BD_BTRFS_TECH_MODE_MODIFY
BDFSUdfInfo * -bd_fs_udf_get_info (-const gchar *device, -GError **error);
device |
-the device containing the file system to get info for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the file system on device
-or
-NULL in case of error
Tech category: BD_FS_TECH_UDF-BD_FS_TECH_MODE_QUERY.
[transfer full]
-BDFSUdfInfo *
-bd_fs_udf_info_copy (BDFSUdfInfo *data);
-Creates a new copy of data
-.
[skip]
- -gboolean -bd_fs_udf_mkfs (-const gchar *device, -const gchar *media_type, -gchar *revision, -guint64 block_size, -const BDExtraArg **extra, -GError **error);
device |
-the device to create a new UDF fs on |
-- |
media_type |
-specify the media type or |
-[nullable] | -
revision |
-UDF revision to use or |
-[nullable] | -
block_size |
-block size in bytes or 0 for auto detection (device logical block size) |
-- |
extra |
-extra options for the creation (right now -passed to the 'mkudffs' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new UDF fs was successfully created on device
-or not
Tech category: BD_FS_TECH_UDF-BD_FS_TECH_MODE_MKFS
gboolean -bd_fs_udf_set_label (-const gchar *device, -const gchar *label, -GError **error);
Note: This sets both Volume Identifier and Logical Volume Identifier. Volume Identifier - is truncated to 30 or 15 characters to accommodate to the different length limits - of these labels.
-device |
-the device containing the file system to set label for |
-- |
label |
-label to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label of UDF file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_UDF-BD_FS_TECH_MODE_SET_LABEL
gboolean -bd_fs_udf_check_label (-const gchar *label, -GError **error);
Note: This checks only whether label
- adheres the length limits for Logical Volume Identifier,
- not the stricter limits for Volume Identifier.
gboolean -bd_fs_udf_set_uuid (-const gchar *device, -const gchar *uuid, -GError **error);
device |
-the device containing the file system to set the UUID (serial number) for |
-- |
uuid |
-UUID to set or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the UUID of the UDF file system on the device
-was
-successfully set or not
Tech category: BD_FS_TECH_UDF-BD_FS_TECH_MODE_SET_UUID
typedef struct {
- BDFsResizeFlags resize;
- BDFSMkfsOptionsFlags mkfs;
- BDFSFsckFlags fsck;
- BDFSConfigureFlags configure;
- BDFSFeatureFlags features;
- const gchar *partition_id;
- const gchar *partition_type;
-} BDFSFeatures;
-
-BDFsResizeFlags |
-supported resizes modes |
-- |
BDFSMkfsOptionsFlags |
-supported options for mkfs |
-- |
BDFSFsckFlags |
-support for fsck operations (check and repair) |
-- |
BDFSConfigureFlags |
-support for changing properties of an existing filesystem |
-- |
BDFSFeatureFlags |
-other supported features |
-- |
const gchar * |
-partition ID used for this filesystem on MSDOS partitions |
-- |
const gchar * |
-partition type/GUID used for this filesystem GPT partitions |
-- |
typedef struct {
- const gchar *label;
- const gchar *uuid;
- gboolean dry_run;
- gboolean no_discard;
- gboolean force;
- gboolean no_pt;
- guint8 reserve[32];
-} BDFSMkfsOptions;
-
-const gchar * |
-label of the filesystem |
-- |
const gchar * |
-uuid of the filesystem |
-- |
gboolean |
-whether to run mkfs in dry run mode (no changes written to the device) |
-- |
gboolean |
-whether to avoid discarding blocks at mkfs time |
-- |
gboolean |
-whether to run mkfs with the |
-- |
gboolean |
-whether to disable (protective) partition table creation during mkfs |
-- |
guint8 |
-reserve for future expansion |
-- |
typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 block_size;
- guint64 block_count;
-} BDFSXfsInfo;
-
-
-typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 cluster_size;
- guint64 cluster_count;
- guint64 free_cluster_count;
-} BDFSVfatInfo;
-
-gchar * |
-label of the filesystem |
-- |
gchar * |
-uuid of the filesystem |
-- |
guint64 |
-cluster size used by the filesystem |
-- |
guint64 |
-number of clusters in the filesystem |
-- |
guint64 |
-number of free clusters in the filesystem |
-- |
typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 size;
- guint64 free_space;
-} BDFSNtfsInfo;
-
-
-typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 sector_size;
- guint64 sector_count;
- guint64 features;
-} BDFSF2FSInfo;
-
-gchar * |
-label of the filesystem |
-- |
gchar * |
-uuid of the filesystem |
-- |
guint64 |
-sector size used by the filesystem |
-- |
guint64 |
-number of sectors in the filesystem |
-- |
guint64 |
-features enabled for this filesystem, see BDFSF2FSFeature |
-- |
typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 size;
- guint64 block_size;
- guint64 free_blocks;
-} BDFSNILFS2Info;
-
-
-typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 sector_size;
- guint64 sector_count;
- guint64 cluster_count;
-} BDFSExfatInfo;
-
-gchar * |
-label of the filesystem |
-- |
gchar * |
-uuid of the filesystem |
-- |
guint64 |
-sector size used by the filesystem |
-- |
guint64 |
-number of sectors in the filesystem |
-- |
guint64 |
-number of clusters in the filesystem |
-- |
typedef struct {
- gchar *label;
- gchar *uuid;
- guint64 size;
- guint64 free_space;
-} BDFSBtrfsInfo;
-
-
-typedef struct {
- gchar *label;
- gchar *uuid;
- gchar *revision;
- gchar *lvid;
- gchar *vid;
- guint64 block_size;
- guint64 block_count;
- guint64 free_blocks;
-} BDFSUdfInfo;
-
-gchar * |
-label of the filesystem |
-- |
gchar * |
-uuid of the filesystem |
-- |
gchar * |
-UDF revision |
-- |
gchar * |
-Logical Volume Identifier (most UDF implementations use this identifier as a disk label) |
-- |
gchar * |
-Volume Identifier |
-- |
guint64 |
-block size used by the filesystem |
-- |
guint64 |
-number of blocks in the filesystem |
-- |
guint64 |
-number of free blocks in the filesystem |
-- |
| -Top - | -
| enum | -BDKBDBcacheMode | -
| - | BDKBDBcacheStats | -
| enum | -BDKBDError | -
| - | BDKBDZramStats | -
| #define | -BD_KBD_ERROR | -
| enum | -BDKBDTech | -
| enum | -BDKBDTechMode | -
gboolean
-bd_kbd_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_kbd_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean -bd_kbd_bcache_attach (-const gchar *c_set_uuid, -const gchar *bcache_device, -GError **error);
c_set_uuid |
-cache set UUID of the cache to attach |
-- |
bcache_device |
-bcache device to attach |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the c_set_uuid
-cache was successfully attached to bcache_device
-or not
Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_MODIFY
gboolean -bd_kbd_bcache_create (-const gchar *backing_device, -const gchar *cache_device, -const BDExtraArg **extra, -const gchar **bcache_device, -GError **error);
backing_device |
-backing (slow) device of the cache |
-- |
cache_device |
-cache (fast) device of the cache |
-- |
extra |
-extra options for the creation (right now -passed to the 'make-bcache' utility). |
-[nullable][array zero-terminated=1] | -
bcache_device |
-place to store the name of the new bcache device (if any). |
-[out][optional][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the bcache device was successfully created or not
-Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_CREATE
gboolean -bd_kbd_bcache_destroy (-const gchar *bcache_device, -GError **error);
bcache_device |
-bcache device to destroy |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the bcache device bcache_device
-was successfully destroyed or not
Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_DESTROY
gboolean -bd_kbd_bcache_detach (-const gchar *bcache_device, -gchar **c_set_uuid, -GError **error);
bcache_device |
-bcache device to detach the cache from |
-- |
c_set_uuid |
-cache set UUID of the detached cache. |
-[out][optional][transfer full] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the bcache device bcache_device
-was successfully destroyed or not
Note: Flushes the cache first.
-Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_MODIFY
gchar * -bd_kbd_bcache_get_backing_device (-const gchar *bcache_device, -GError **error);
bcache_device |
-Bcache device to get the backing device for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
name of the backing device of the bcache_device
-or NULL if failed to determine (error
-is populated)
Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_QUERY.
[transfer full]
-gchar * -bd_kbd_bcache_get_cache_device (-const gchar *bcache_device, -GError **error);
bcache_device |
-Bcache device to get the cache device for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
name of the cache device of the bcache_device
-or NULL if failed to determine (error
-is populated)
Note: returns the name of the first cache device of bcache_device
-(in case
-there are more)
Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_QUERY.
[transfer full]
-BDKBDBcacheMode -bd_kbd_bcache_get_mode (-const gchar *bcache_device, -GError **error);
bcache_device |
-device to get mode of |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
current mode of the bcache_device
-
Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_QUERY
BDKBDBcacheMode -bd_kbd_bcache_get_mode_from_str (- - -const gchar *mode_str, -GError **error);
const gchar * -bd_kbd_bcache_get_mode_str (-BDKBDBcacheMode mode, -GError **error);
mode |
-mode to get string representation of |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of mode
-or NULL in case of error
Tech category: always available.
-[transfer none]
-gboolean -bd_kbd_bcache_set_mode (-const gchar *bcache_device, -BDKBDBcacheMode mode, -GError **error);
bcache_device |
-bcache device to set mode of |
-- |
mode |
-mode to set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the mode was successfully set or not
-Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_MODIFY
BDKBDBcacheStats *
-bd_kbd_bcache_stats_copy (BDKBDBcacheStats *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_kbd_bcache_stats_free (BDKBDBcacheStats *data);
-Frees data
-.
[skip]
- -BDKBDBcacheStats * -bd_kbd_bcache_status (-const gchar *bcache_device, -GError **error);
bcache_device |
-bcache device to get status for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
status of the bcache_device
-or NULL in case of
-error (error
-is set)
Tech category: BD_KBD_TECH_BCACHE-BD_KBD_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_kbd_zram_create_devices (-guint64 num_devices, -const guint64 *sizes, -const guint64 *nstreams, -GError **error);
num_devices |
-number of devices to create |
-- |
sizes |
-requested sizes (in bytes) for created zRAM -devices. |
-[array zero-terminated=1] | -
nstreams |
-numbers of streams for created -zRAM devices. |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether num_devices
-zRAM devices were successfully created or not
**Lengths of size
-and nstreams
-(if given) have to be >= num_devices
-!**
Tech category: BD_KBD_TECH_ZRAM-BD_KBD_TECH_MODE_CREATE
gboolean
-bd_kbd_zram_destroy_devices (GError **error);
-
-whether zRAM devices were successfully destroyed or not
-The only way how to destroy zRAM device right now is to unload the 'zram' -module and thus destroy all of them. That's why this function doesn't allow -specification of which devices should be destroyed.
-Tech category: BD_KBD_TECH_ZRAM-BD_KBD_TECH_MODE_DESTROY
gboolean -bd_kbd_zram_add_device (-guint64 size, -guint64 nstreams, -gchar **device, -GError **error);
size |
-size of the zRAM device to add |
-- |
nstreams |
-number of streams to use for the new device (or 0 to use the defaults) |
-- |
device |
-place to store the name of the newly added device. |
-[optional][out] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether a new zRAM device was added or not
-Tech category: BD_KBD_TECH_ZRAM-BD_KBD_TECH_MODE_MODIFY
gboolean -bd_kbd_zram_remove_device (-const gchar *device, -GError **error);
device |
-zRAM device to remove |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully removed or not
Tech category: BD_KBD_TECH_ZRAM-BD_KBD_TECH_MODE_MODIFY
BDKBDZramStats * -bd_kbd_zram_get_stats (-const gchar *device, -GError **error);
device |
-zRAM device to get stats for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
statistics for the zRAM device
-Tech category: BD_KBD_TECH_ZRAM-BD_KBD_TECH_MODE_QUERY.
[transfer full]
-BDKBDZramStats *
-bd_kbd_zram_stats_copy (BDKBDZramStats *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_kbd_zram_stats_free (BDKBDZramStats *data);
-Frees data
-.
[skip]
- -gboolean -bd_kbd_is_tech_avail (-BDKBDTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDKBDTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
typedef struct {
- gchar *state;
- guint64 block_size;
- guint64 cache_size;
- guint64 cache_used;
- guint64 hits;
- guint64 misses;
- guint64 bypass_hits;
- guint64 bypass_misses;
-} BDKBDBcacheStats;
-
-gchar * |
-state of the cache |
-- |
guint64 |
-block size used by the cache |
-- |
guint64 |
-size of the cache |
-- |
guint64 |
-size of the used space in the cache |
-- |
guint64 |
-number of hits |
-- |
guint64 |
-number of misses |
-- |
guint64 |
-number of bypass hits |
-- |
guint64 |
-number of bypass misses |
-- |
typedef struct {
- guint64 disksize;
- guint64 num_reads;
- guint64 num_writes;
- guint64 invalid_io;
- guint64 zero_pages;
- guint64 max_comp_streams;
- gchar* comp_algorithm;
- guint64 orig_data_size;
- guint64 compr_data_size;
- guint64 mem_used_total;
-} BDKBDZramStats;
-
-see zRAM kernel documentation for details -(https://www.kernel.org/doc/Documentation/blockdev/zram.txt)
-| -Top - | -
| #define | -BD_LVM_DEFAULT_PE_SIZE | -
| #define | -BD_LVM_DEFAULT_PE_START | -
| #define | -BD_LVM_MIN_PE_SIZE | -
| #define | -BD_LVM_MAX_PE_SIZE | -
| #define | -BD_LVM_MIN_THPOOL_MD_SIZE | -
| #define | -BD_LVM_MAX_THPOOL_MD_SIZE | -
| #define | -BD_LVM_MIN_THPOOL_CHUNK_SIZE | -
| #define | -BD_LVM_MAX_THPOOL_CHUNK_SIZE | -
| #define | -BD_LVM_MIN_CACHE_MD_SIZE | -
| #define | -BD_LVM_DEFAULT_CHUNK_SIZE | -
| #define | -BD_LVM_ERROR | -
| enum | -BDLVMError | -
| - | BDLVMPVdata | -
| - | BDLVMVGdata | -
| - | BDLVMSEGdata | -
| - | BDLVMLVdata | -
| enum | -BDLVMCacheMode | -
| enum | -BDLVMCachePoolFlags | -
| - | BDLVMCacheStats | -
| - | BDLVMVDOStats | -
| enum | -BDLVMVDOCompressionState | -
| enum | -BDLVMVDOIndexState | -
| enum | -BDLVMVDOOperatingMode | -
| - | BDLVMVDOPooldata | -
| enum | -BDLVMVDOWritePolicy | -
| enum | -BDLVMTech | -
| enum | -BDLVMTechMode | -
A plugin for operations with LVM. All sizes passed in/out to/from -the functions are in bytes.
-void
-bd_lvm_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean
-bd_lvm_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-BDLVMPVdata *
-bd_lvm_pvdata_copy (BDLVMPVdata *data);
-Creates a new copy of data
-.
[skip]
- -BDLVMVGdata *
-bd_lvm_vgdata_copy (BDLVMVGdata *data);
-Creates a new copy of data
-.
[skip]
- -BDLVMSEGdata *
-bd_lvm_segdata_copy (BDLVMSEGdata *data);
-Creates a new copy of data
-.
[skip]
- -BDLVMLVdata *
-bd_lvm_lvdata_copy (BDLVMLVdata *data);
-Creates a new copy of data
-.
[skip]
- -BDLVMCacheStats *
-bd_lvm_cache_stats_copy (BDLVMCacheStats *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_lvm_cache_stats_free (BDLVMCacheStats *data);
-Frees data
-.
[skip]
- -void
-bd_lvm_vdo_stats_free (BDLVMVDOStats *stats);
-Frees stats
-.
[skip]
- -BDLVMVDOStats *
-bd_lvm_vdo_stats_copy (BDLVMVDOStats *stats);
-Creates a new copy of stats
-.
[skip]
- -gboolean -bd_lvm_is_supported_pe_size (-guint64 size, -GError **error);
size |
-size (in bytes) to test |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given size is supported physical extent size or not
-Tech category: BD_LVM_TECH_CALCS no mode (it is ignored)
guint64 *
-bd_lvm_get_supported_pe_sizes (GError **error);
-
-list of supported PE sizes
-Tech category: BD_LVM_TECH_CALCS no mode (it is ignored).
[transfer full][array fixed-size=25]
-guint64 -bd_lvm_round_size_to_pe (-guint64 size, -guint64 pe_size, -gboolean roundup, -GError **error);
size |
-size to be rounded |
-- |
pe_size |
-physical extent (PE) size or 0 to use the default |
-- |
roundup |
-whether to round up or down (ceil or floor) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
size
-rounded to pe_size
-according to the roundup
-
Rounds given size
-up/down to a multiple of pe_size
-according to the value
-of the roundup
-parameter. If the rounded value is too big to fit in the
-return type, the result is rounded down (floored) regardless of the roundup
-parameter.
Tech category: BD_LVM_TECH_CALCS no mode (it is ignored)
guint64 -bd_lvm_get_lv_physical_size (-guint64 lv_size, -guint64 pe_size, -GError **error);
lv_size |
-LV size |
-- |
pe_size |
-PE size |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
space taken on disk(s) by the LV with given size
-
Gives number of bytes needed for an LV with the size lv_size
-on an LVM stack
-using given pe_size
-.
Tech category: BD_LVM_TECH_CALCS no mode (it is ignored)
guint64 -bd_lvm_get_thpool_padding (-guint64 size, -guint64 pe_size, -gboolean included, -GError **error);
size |
-size of the thin pool |
-- |
pe_size |
-PE size or 0 if the default value should be used |
-- |
included |
-if padding is already included in the size |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
size of the padding needed for a thin pool with the given size
-according to the pe_size
-and included
-
Tech category: BD_LVM_TECH_THIN_CALCS no mode (it is ignored)
guint64 -bd_lvm_get_thpool_meta_size (-guint64 size, -guint64 chunk_size, -guint64 n_snapshots, -GError **error);
Note: This function will be changed in 3.0: the n_snapshots
- parameter
- is currently not used and will be removed.
size |
-size of the thin pool |
-- |
chunk_size |
-chunk size of the thin pool or 0 to use the default ( |
-- |
n_snapshots |
-ignored |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
recommended size of the metadata space for the specified pool
-Tech category: BD_LVM_TECH_THIN_CALCS no mode (it is ignored)
gboolean -bd_lvm_is_valid_thpool_md_size (-guint64 size, -GError **error);
size |
-the size to be tested |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given size is a valid thin pool metadata size or not
-Tech category: BD_LVM_TECH_THIN_CALCS no mode (it is ignored)
gboolean -bd_lvm_is_valid_thpool_chunk_size (-guint64 size, -gboolean discard, -GError **error);
size |
-the size to be tested |
-- |
discard |
-whether discard/TRIM is required to be supported or not |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the given size is a valid thin pool chunk size or not
-Tech category: BD_LVM_TECH_THIN_CALCS no mode (it is ignored)
gboolean -bd_lvm_pvcreate (-const gchar *device, -guint64 data_alignment, -guint64 metadata_size, -const BDExtraArg **extra, -GError **error);
device |
-the device to make PV from |
-- |
data_alignment |
-data (first PE) alignment or 0 to use the default |
-- |
metadata_size |
-size of the area reserved for metadata or 0 to use the default |
-- |
extra |
-extra options for the PV creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the PV was successfully created or not
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_pvresize (-const gchar *device, -guint64 size, -const BDExtraArg **extra, -GError **error);
device |
-the device to resize |
-- |
size |
-the new requested size of the PV or 0 if it should be adjusted to device's size |
-- |
extra |
-extra options for the PV resize -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the PV's size was successfully changed or not
-If given size
-different from 0, sets the PV's size to the given value (see
-pvresize(8)). If given size
-0, adjusts the PV's size to the underlying
-block device's size.
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_pvremove (-const gchar *device, -const BDExtraArg **extra, -GError **error);
device |
-the PV device to be removed/destroyed |
-- |
extra |
-extra options for the PV removal -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the PV was successfully removed/destroyed or not
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_REMOVE
gboolean -bd_lvm_pvmove (-const gchar *src, -const gchar *dest, -const BDExtraArg **extra, -GError **error);
src |
-the PV device to move extents off of |
-- |
dest |
-the PV device to move extents onto or |
-[nullable] | -
extra |
-extra options for the PV move -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the extents from the src
-PV where successfully moved or not
If dest
-is NULL, VG allocation rules are used for the extents from the src
-PV (see pvmove(8)).
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_pvscan (-const gchar *device, -gboolean update_cache, -const BDExtraArg **extra, -GError **error);
device |
-the device to scan for PVs or |
-[nullable] | -
update_cache |
-whether to update the lvmetad cache or not |
-- |
extra |
-extra options for the PV scan -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the system or device
-was successfully scanned for PVs or not
The device
-argument is used only if update_cache
-is TRUE. Otherwise the
-whole system is scanned for PVs.
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
gboolean -bd_lvm_add_pv_tags (-const gchar *device, -const gchar **tags, -GError **error);
device |
-the device to set PV tags for |
-- |
tags |
-list of tags to add. |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the tags were successfully added to device
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
gboolean -bd_lvm_delete_pv_tags (-const gchar *device, -const gchar **tags, -GError **error);
device |
-the device to set PV tags for |
-- |
tags |
-list of tags to remove. |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the tags were successfully removed from device
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
BDLVMPVdata * -bd_lvm_pvinfo (-const gchar *device, -GError **error);
device |
-a PV to get information about or |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the PV on the given device
-or
-NULL in case of error (the error
-) gets populated in those cases)
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-BDLVMPVdata **
-bd_lvm_pvs (GError **error);
-
-information about PVs found in the system
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[array zero-terminated=1]
-gboolean -bd_lvm_vgcreate (-const gchar *name, -const gchar **pv_list, -guint64 pe_size, -const BDExtraArg **extra, -GError **error);
name |
-name of the newly created VG |
-- |
pv_list |
-list of PVs the newly created VG should use. |
-[array zero-terminated=1] | -
pe_size |
-PE size or 0 if the default value should be used |
-- |
extra |
-extra options for the VG creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG name
-was successfully created or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_vgremove (-const gchar *vg_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the to be removed VG |
-- |
extra |
-extra options for the VG removal -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG was successfully removed or not
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_REMOVE
gboolean -bd_lvm_vgrename (-const gchar *old_vg_name, -const gchar *new_vg_name, -const BDExtraArg **extra, -GError **error);
old_vg_name |
-old name of the VG to rename |
-- |
new_vg_name |
-new name for the |
-- |
extra |
-extra options for the VG rename -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG was successfully renamed or not
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vgactivate (-const gchar *vg_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the to be activated VG |
-- |
extra |
-extra options for the VG activation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG was successfully activated or not
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vgdeactivate (-const gchar *vg_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the to be deactivated VG |
-- |
extra |
-extra options for the VG deactivation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG was successfully deactivated or not
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vgextend (-const gchar *vg_name, -const gchar *device, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the to be extended VG |
-- |
device |
-PV device to extend the |
-- |
extra |
-extra options for the VG extension -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG vg_name
-was successfully extended with the given device
-or not.
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vgreduce (-const gchar *vg_name, -const gchar *device, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the to be reduced VG |
-- |
device |
-PV device the |
-[nullable] | -
extra |
-extra options for the VG reduction -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the VG vg_name
-was successfully reduced of the given device
-or not
Note: This function does not move extents off of the PV before removing -it from the VG. You must do that first by calling bd_lvm_pvmove.
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_add_vg_tags (-const gchar *vg_name, -const gchar **tags, -GError **error);
vg_name |
-the VG to set tags on |
-- |
tags |
-list of tags to add. |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the tags were successfully added to vg_name
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
gboolean -bd_lvm_delete_vg_tags (-const gchar *vg_name, -const gchar **tags, -GError **error);
vg_name |
-the VG to set tags on |
-- |
tags |
-list of tags to remove. |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the tags were successfully removed from vg_name
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
BDLVMVGdata * -bd_lvm_vginfo (-const gchar *vg_name, -GError **error);
vg_name |
-a VG to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the vg_name
-VG or NULL in case
-of error (the error
-) gets populated in those cases)
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-BDLVMVGdata **
-bd_lvm_vgs (GError **error);
-
-information about VGs found in the system
-Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[array zero-terminated=1]
-gchar * -bd_lvm_lvorigin (-const gchar *vg_name, -const gchar *lv_name, -GError **error);
vg_name |
-name of the VG containing the queried LV |
-- |
lv_name |
-name of the queried LV |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
the origin volume for the vg_name
-/lv_name
-LV or
-NULL if failed to determine (error
-) is set in those cases)
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_lvm_lvcreate (-const gchar *vg_name, -const gchar *lv_name, -guint64 size, -const gchar *type, -const gchar **pv_list, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG to create a new LV in |
-- |
lv_name |
-name of the to-be-created LV |
-- |
size |
-requested size of the new LV |
-- |
type |
-type of the new LV ("striped", "raid1",..., see lvcreate (8)). |
-[nullable] | -
pv_list |
-list of PVs the newly created LV should use or |
-[nullable][array zero-terminated=1] | -
extra |
-extra options for the LV creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given vg_name
-/lv_name
-LV was successfully created or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_lvremove (-const gchar *vg_name, -const gchar *lv_name, -gboolean force, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-removed LV |
-- |
lv_name |
-name of the to-be-removed LV |
-- |
force |
-whether to force removal or not |
-- |
extra |
-extra options for the LV removal -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-LV was successfully removed or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_REMOVE
gboolean -bd_lvm_lvrename (-const gchar *vg_name, -const gchar *lv_name, -const gchar *new_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-renamed LV |
-- |
lv_name |
-name of the to-be-renamed LV |
-- |
new_name |
-new name for the |
-- |
extra |
-extra options for the LV rename -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-LV was successfully renamed to
-vg_name
-/new_name
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_lvresize (-const gchar *vg_name, -const gchar *lv_name, -guint64 size, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-resized LV |
-- |
lv_name |
-name of the to-be-resized LV |
-- |
size |
-the requested new size of the LV |
-- |
extra |
-extra options for the LV resize -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-LV was successfully resized or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_lvrepair (-const gchar *vg_name, -const gchar *lv_name, -const gchar **pv_list, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-repaired LV |
-- |
lv_name |
-name of the to-be-repaired LV |
-- |
pv_list |
-list of PVs to be used for the repair. |
-[array zero-terminated=1] | -
extra |
-extra options for the LV repair -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-LV was successfully repaired or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_lvactivate (-const gchar *vg_name, -const gchar *lv_name, -gboolean ignore_skip, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-activated LV |
-- |
lv_name |
-name of the to-be-activated LV |
-- |
ignore_skip |
-whether to ignore the skip flag or not |
-- |
extra |
-extra options for the LV activation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-LV was successfully activated or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_lvdeactivate (-const gchar *vg_name, -const gchar *lv_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-deactivated LV |
-- |
lv_name |
-name of the to-be-deactivated LV |
-- |
extra |
-extra options for the LV deactivation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-LV was successfully deactivated or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_lvsnapshotcreate (-const gchar *vg_name, -const gchar *origin_name, -const gchar *snapshot_name, -guint64 size, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the LV a new snapshot should be created of |
-- |
origin_name |
-name of the LV a new snapshot should be created of |
-- |
snapshot_name |
-name fo the to-be-created snapshot |
-- |
size |
-requested size for the snapshot |
-- |
extra |
-extra options for the LV snapshot creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the snapshot_name
-snapshot of the vg_name
-/origin_name
-LV
-was successfully created or not.
Tech category: BD_LVM_TECH_BASIC_SNAP-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_lvsnapshotmerge (-const gchar *vg_name, -const gchar *snapshot_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-merged LV snapshot |
-- |
snapshot_name |
-name of the to-be-merged LV snapshot |
-- |
extra |
-extra options for the LV snapshot merge -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/snapshot_name
-LV snapshot was successfully merged or not
Tech category: BD_LVM_TECH_BASIC_SNAP-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_add_lv_tags (-const gchar *vg_name, -const gchar *lv_name, -const gchar **tags, -GError **error);
vg_name |
-name of the VG that contains the LV to set tags on |
-- |
lv_name |
-name of the LV to set tags on |
-- |
tags |
-list of tags to add. |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the tags were successfully added to device
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
gboolean -bd_lvm_delete_lv_tags (-const gchar *vg_name, -const gchar *lv_name, -const gchar **tags, -GError **error);
vg_name |
-name of the VG that contains the LV to set tags on |
-- |
lv_name |
-name of the LV to set tags on |
-- |
tags |
-list of tags to remove. |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the tags were successfully removed from device
-or not
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY
BDLVMLVdata * -bd_lvm_lvinfo (-const gchar *vg_name, -const gchar *lv_name, -GError **error);
vg_name |
-name of the VG that contains the LV to get information about |
-- |
lv_name |
-name of the LV to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the vg_name
-/lv_name
-LV or NULL in case
-of error (the error
-) gets populated in those cases)
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-BDLVMLVdata * -bd_lvm_lvinfo_tree (-const gchar *vg_name, -const gchar *lv_name, -GError **error);
This function will fill out the data_lvs, metadata_lvs, and segs fields as well.
-vg_name |
-name of the VG that contains the LV to get information about |
-- |
lv_name |
-name of the LV to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the vg_name
-/lv_name
-LV or NULL in case
-of error (the error
-) gets populated in those cases)
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-BDLVMLVdata ** -bd_lvm_lvs (-const gchar *vg_name, -GError **error);
vg_name |
-name of the VG to get information about LVs from. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
information about LVs found in the given
-vg_name
-VG or in system if vg_name
-is NULL
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[array zero-terminated=1]
-BDLVMLVdata ** -bd_lvm_lvs_tree (-const gchar *vg_name, -GError **error);
This function will fill out the data_lvs, metadata_lvs, and segs fields as well.
-vg_name |
-name of the VG to get information about LVs from. |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
information about LVs found in the given
-vg_name
-VG or in system if vg_name
-is NULL.
Tech category: BD_LVM_TECH_BASIC-BD_LVM_TECH_MODE_QUERY.
[array zero-terminated=1]
-gboolean -bd_lvm_thpoolcreate (-const gchar *vg_name, -const gchar *lv_name, -guint64 size, -guint64 md_size, -guint64 chunk_size, -const gchar *profile, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG to create a thin pool in |
-- |
lv_name |
-name of the to-be-created pool LV |
-- |
size |
-requested size of the to-be-created pool |
-- |
md_size |
-requested metadata size or 0 to use the default |
-- |
chunk_size |
-requested chunk size or 0 to use the default |
-- |
profile |
-profile to use (see lvm(8) for more information) or |
-[nullable] | -
extra |
-extra options for the thin pool creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-thin pool was successfully created or not
Tech category: BD_LVM_TECH_THIN-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_thpool_convert (-const gchar *vg_name, -const gchar *data_lv, -const gchar *metadata_lv, -const gchar *name, -const BDExtraArg **extra, -GError **error);
Converts the data_lv
- and metadata_lv
- into a new thin pool in the vg_name
-
-VG.
vg_name |
-name of the VG to create the new thin pool in |
-- |
data_lv |
-name of the LV that should become the data part of the new pool |
-- |
metadata_lv |
-name of the LV that should become the metadata part of the new pool |
-- |
name |
-name for the thin pool (if |
-[nullable] | -
extra |
-extra options for the thin pool creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new thin pool was successfully created from data_lv
-and
-metadata_lv
-or not
Tech category: BD_LVM_TECH_THIN-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_thlvcreate (-const gchar *vg_name, -const gchar *pool_name, -const gchar *lv_name, -guint64 size, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the thin pool providing extents for the to-be-created thin LV |
-- |
pool_name |
-name of the pool LV providing extents for the to-be-created thin LV |
-- |
lv_name |
-name of the to-be-created thin LV |
-- |
size |
-requested virtual size of the to-be-created thin LV |
-- |
extra |
-extra options for the thin LV creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-thin LV was successfully created or not
Tech category: BD_LVM_TECH_THIN-BD_LVM_TECH_MODE_CREATE
gchar * -bd_lvm_thlvpoolname (-const gchar *vg_name, -const gchar *lv_name, -GError **error);
vg_name |
-name of the VG containing the queried thin LV |
-- |
lv_name |
-name of the queried thin LV |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
the name of the pool volume for the vg_name
-/lv_name
-thin LV or NULL if failed to determine (error
-) is set in those cases)
Tech category: BD_LVM_TECH_THIN-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_lvm_thsnapshotcreate (-const gchar *vg_name, -const gchar *origin_name, -const gchar *snapshot_name, -const gchar *pool_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the thin LV a new snapshot should be created of |
-- |
origin_name |
-name of the thin LV a new snapshot should be created of |
-- |
snapshot_name |
-name fo the to-be-created snapshot |
-- |
pool_name |
-name of the thin pool to create the snapshot in or |
-[nullable] | -
extra |
-extra options for the thin LV snapshot creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the snapshot_name
-snapshot of the vg_name
-/origin_name
-thin LV was successfully created or not.
Tech category: BD_LVM_TECH_THIN-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_set_global_config (-const gchar *new_config, -GError **error);
new_config |
-string representation of the new global LVM
-configuration to set or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new requested global config new_config
-was successfully
-set or not
Tech category: BD_LVM_TECH_GLOB_CONF no mode (it is ignored)
gchar *
-bd_lvm_get_global_config (GError **error);
-
-a copy of a string representation of the currently set LVM global -configuration
-Tech category: BD_LVM_TECH_GLOB_CONF no mode (it is ignored)
gboolean -bd_lvm_cache_attach (-const gchar *vg_name, -const gchar *data_lv, -const gchar *cache_pool_lv, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the |
-- |
data_lv |
-data LV to attache the |
-- |
cache_pool_lv |
-cache pool LV to attach to the |
-- |
extra |
-extra options for the cache attachment -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cache_pool_lv
-was successfully attached to the data_lv
-or not
Note: Both data_lv
-and cache_lv
-will be deactivated before the operation.
Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_cache_create_cached_lv (-const gchar *vg_name, -const gchar *lv_name, -guint64 data_size, -guint64 cache_size, -guint64 md_size, -BDLVMCacheMode mode, -BDLVMCachePoolFlags flags, -const gchar **slow_pvs, -const gchar **fast_pvs, -GError **error);
vg_name |
-name of the VG to create a cached LV in |
-- |
lv_name |
-name of the cached LV to create |
-- |
data_size |
-size of the data LV |
-- |
cache_size |
-size of the cache (or cached LV more precisely) |
-- |
md_size |
-size of the cache metadata LV or 0 to use the default |
-- |
mode |
-cache mode for the cached LV |
-- |
flags |
-a combination of (ORed) BDLVMCachePoolFlags |
-- |
slow_pvs |
-list of slow PVs (used for the data LV). |
-[array zero-terminated=1] | -
fast_pvs |
-list of fast PVs (used for the cache LV). |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cached LV lv_name
-was successfully created or not
Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_cache_create_pool (-const gchar *vg_name, -const gchar *pool_name, -guint64 pool_size, -guint64 md_size, -BDLVMCacheMode mode, -BDLVMCachePoolFlags flags, -const gchar **fast_pvs, -GError **error);
vg_name |
-name of the VG to create |
-- |
pool_name |
-name of the cache pool LV to create |
-- |
pool_size |
-desired size of the cache pool |
-- |
md_size |
-desired size of the |
-- |
mode |
-cache mode of the |
-- |
flags |
-a combination of (ORed) BDLVMCachePoolFlags |
-- |
fast_pvs |
-list of (fast) PVs to create the |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cache pool vg_name
-/pool_name
-was successfully created or not
Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_cache_pool_convert (-const gchar *vg_name, -const gchar *data_lv, -const gchar *metadata_lv, -const gchar *name, -const BDExtraArg **extra, -GError **error);
Converts the data_lv
- and metadata_lv
- into a new cache pool in the vg_name
-
-VG.
vg_name |
-name of the VG to create the new thin pool in |
-- |
data_lv |
-name of the LV that should become the data part of the new pool |
-- |
metadata_lv |
-name of the LV that should become the metadata part of the new pool |
-- |
name |
-name for the thin pool (if |
-[nullable] | -
extra |
-extra options for the thin pool creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new cache pool was successfully created from data_lv
-and
-metadata_lv
-or not
Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_cache_detach (-const gchar *vg_name, -const gchar *cached_lv, -gboolean destroy, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the |
-- |
cached_lv |
-name of the cached LV to detach its cache from |
-- |
destroy |
-whether to destroy the cache after detach or not |
-- |
extra |
-extra options for the cache detachment -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cache was successfully detached from the cached_lv
-or not
Note: synces the cache first
-Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_MODIFY
guint64 -bd_lvm_cache_get_default_md_size (-guint64 cache_size, -GError **error);
cache_size |
-size of the cache to determine MD size for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
recommended default size of the cache metadata LV or 0 in case of error
-Tech category: BD_LVM_TECH_CACHE_CALCS no mode (it is ignored)
BDLVMCacheMode -bd_lvm_cache_get_mode_from_str (-const gchar *mode_str, -GError **error);
mode_str |
-string representation of a cache mode |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
cache mode for the mode_str
-or BD_LVM_CACHE_MODE_UNKNOWN if
-failed to determine
Tech category: always provided/supported
-const gchar * -bd_lvm_cache_get_mode_str (-BDLVMCacheMode mode, -GError **error);
mode |
-mode to get the string representation for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of mode
-or NULL in case of error
Tech category: always provided/supported
-gchar * -bd_lvm_cache_pool_name (-const gchar *vg_name, -const gchar *cached_lv, -GError **error);
vg_name |
-name of the VG containing the |
-- |
cached_lv |
-cached LV to get the name of the its pool LV for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
name of the cache pool LV used by the cached_lv
-or NULL in case of error
Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_QUERY
BDLVMCacheStats * -bd_lvm_cache_stats (-const gchar *vg_name, -const gchar *cached_lv, -GError **error);
vg_name |
-name of the VG containing the |
-- |
cached_lv |
-cached LV to get stats for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
stats for the cached_lv
-or NULL in case of error
Tech category: BD_LVM_TECH_CACHE-BD_LVM_TECH_MODE_QUERY
gchar * -bd_lvm_vdolvpoolname (-const gchar *vg_name, -const gchar *lv_name, -GError **error);
vg_name |
-name of the VG containing the queried VDO LV |
-- |
lv_name |
-name of the queried VDO LV |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
the name of the pool volume for the vg_name
-/lv_name
-VDO LV or NULL if failed to determine (error
-) is set in those cases)
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-const gchar * -bd_lvm_get_vdo_operating_mode_str (-BDLVMVDOOperatingMode mode, -GError **error);
mode |
-mode to get the string representation for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of mode
-or NULL in case of error
Tech category: always provided/supported
-const gchar * -bd_lvm_get_vdo_compression_state_str (-BDLVMVDOCompressionState state, -GError **error);
state |
-state to get the string representation for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of state
-or NULL in case of error
Tech category: always provided/supported
-const gchar * -bd_lvm_get_vdo_index_state_str (-BDLVMVDOIndexState state, -GError **error);
state |
-state to get the string representation for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of state
-or NULL in case of error
Tech category: always provided/supported
-BDLVMVDOWritePolicy -bd_lvm_get_vdo_write_policy_from_str (-const gchar *policy_str, -GError **error);
policy_str |
-string representation of a policy |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
write policy for the policy_str
-or BD_LVM_VDO_WRITE_POLICY_UNKNOWN if
-failed to determine
Tech category: always provided/supported
-BDLVMVDOStats * -bd_lvm_vdo_get_stats (-const gchar *vg_name, -const gchar *pool_name, -GError **error);
vg_name |
-name of the VG that contains |
-- |
pool_name |
-name of the VDO pool to get statistics for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
a structure containing selected statistics or NULL in case of error
-(error
-gets populated in those cases)
In contrast to bd_lvm_vdo_get_stats_full
-this function will only return selected statistics
-in a fixed structure. In case a value is not available, -1 would be returned.
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-GHashTable * -bd_lvm_vdo_get_stats_full (-const gchar *vg_name, -const gchar *pool_name, -GError **error);
vg_name |
-name of the VG that contains |
-- |
pool_name |
-name of the VDO pool to get statistics for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
hashtable of type string - string of available
-statistics or NULL in case of error
-(error
-gets populated in those cases)
Statistics are collected from the values exposed by the kernel kvdo module
-at the /sys/kvdo/<VDO_NAME>/statistics/ path.
-Some of the keys are computed to mimic the information produced by the vdo tools.
-Please note the contents of the hashtable may vary depending on the actual kvdo module version.
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_QUERY.
[transfer full][element-type utf8 utf8]
-gboolean -bd_lvm_vdo_disable_compression (-const gchar *vg_name, -const gchar *pool_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-changed VDO pool LV |
-- |
pool_name |
-name of the VDO pool LV to disable compression on |
-- |
extra |
-extra options for the VDO change -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether compression was successfully disabled on vg_name
-/pool_name
-LV or not
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vdo_disable_deduplication (-const gchar *vg_name, -const gchar *pool_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-changed VDO pool LV |
-- |
pool_name |
-name of the VDO pool LV to disable deduplication on |
-- |
extra |
-extra options for the VDO change -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether deduplication was successfully disabled on vg_name
-/pool_name
-LV or not
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vdo_enable_compression (-const gchar *vg_name, -const gchar *pool_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-changed VDO pool LV |
-- |
pool_name |
-name of the VDO pool LV to enable compression on |
-- |
extra |
-extra options for the VDO change -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether compression was successfully enabled on vg_name
-/pool_name
-LV or not
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vdo_enable_deduplication (-const gchar *vg_name, -const gchar *pool_name, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-changed VDO pool LV |
-- |
pool_name |
-name of the VDO pool LV to enable deduplication on |
-- |
extra |
-extra options for the VDO change -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether deduplication was successfully enabled on vg_name
-/pool_name
-LV or not
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_MODIFY
BDLVMVDOPooldata * -bd_lvm_vdo_info (-const gchar *vg_name, -const gchar *lv_name, -GError **error);
vg_name |
-name of the VG that contains the LV to get information about |
-- |
lv_name |
-name of the LV to get information about |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the vg_name
-/lv_name
-LV or NULL in case
-of error (the error
-) gets populated in those cases)
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_lvm_vdo_pool_convert (-const gchar *vg_name, -const gchar *pool_lv, -const gchar *name, -guint64 virtual_size, -guint64 index_memory, -gboolean compression, -gboolean deduplication, -BDLVMVDOWritePolicy write_policy, -const BDExtraArg **extra, -GError **error);
Converts the pool_lv
- into a new VDO pool LV in the vg_name
- VG and creates a new
-name
- VDO LV with size virtual_size
-.
Note: All data on pool_lv
- will be irreversibly destroyed.
vg_name |
-name of the VG that contains |
-- |
pool_lv |
-name of the LV that should become the new VDO pool LV |
-- |
name |
-name for the VDO LV or |
-[nullable] | -
virtual_size |
-virtual size for the new VDO LV |
-- |
index_memory |
-amount of index memory (in bytes) or 0 for default |
-- |
compression |
-whether to enable compression or not |
-- |
deduplication |
-whether to enable deduplication or not |
-- |
write_policy |
-write policy for the volume |
-- |
extra |
-extra options for the VDO pool creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new VDO pool LV was successfully created from pool_lv
-and or not
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_CREATE&BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vdo_pool_create (-const gchar *vg_name, -const gchar *lv_name, -const gchar *pool_name, -guint64 data_size, -guint64 virtual_size, -guint64 index_memory, -gboolean compression, -gboolean deduplication, -BDLVMVDOWritePolicy write_policy, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG to create a new LV in |
-- |
lv_name |
-name of the to-be-created VDO LV |
-- |
pool_name |
-name of the to-be-created VDO pool LV or |
-[nullable] | -
data_size |
-requested size of the data VDO LV (physical size of the |
-- |
virtual_size |
-requested virtual_size of the |
-- |
index_memory |
-amount of index memory (in bytes) or 0 for default |
-- |
compression |
-whether to enable compression or not |
-- |
deduplication |
-whether to enable deduplication or not |
-- |
write_policy |
-write policy for the volume |
-- |
extra |
-extra options for the VDO LV creation -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the given vg_name
-/lv_name
-VDO LV was successfully created or not
Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_vdo_pool_resize (-const gchar *vg_name, -const gchar *pool_name, -guint64 size, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-resized VDO pool LV |
-- |
pool_name |
-name of the to-be-resized VDO pool LV |
-- |
size |
-the requested new size of the VDO pool LV |
-- |
extra |
-extra options for the VDO pool LV resize -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/pool_name
-VDO pool LV was successfully resized or not
Note: Size of the VDO pool LV can be only extended, not reduced.
-Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_vdo_resize (-const gchar *vg_name, -const gchar *lv_name, -guint64 size, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the to-be-resized VDO LV |
-- |
lv_name |
-name of the to-be-resized VDO LV |
-- |
size |
-the requested new size of the VDO LV |
-- |
extra |
-extra options for the VDO LV resize -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the vg_name
-/lv_name
-VDO LV was successfully resized or not
Note: Reduction needs to process TRIM for reduced disk area to unmap used data blocks -from the VDO pool LV and it may take a long time.
-Tech category: BD_LVM_TECH_VDO-BD_LVM_TECH_MODE_MODIFY
BDLVMVDOPooldata *
-bd_lvm_vdopooldata_copy (BDLVMVDOPooldata *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_lvm_vdopooldata_free (BDLVMVDOPooldata *data);
-Frees data
-.
[skip]
- -gboolean -bd_lvm_devices_add (-const gchar *device, -const gchar *devices_file, -const BDExtraArg **extra, -GError **error);
device |
-device (PV) to add to the devices file |
-- |
devices_file |
-LVM devices file or |
-[nullable] | -
extra |
-extra options for the lvmdevices command. |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully added to devices_file
-or not
Tech category: BD_LVM_TECH_DEVICES no mode (it is ignored)
gboolean -bd_lvm_devices_delete (-const gchar *device, -const gchar *devices_file, -const BDExtraArg **extra, -GError **error);
device |
-device (PV) to delete from the devices file |
-- |
devices_file |
-LVM devices file or |
-[nullable] | -
extra |
-extra options for the lvmdevices command. |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully removed from devices_file
-or not
Tech category: BD_LVM_TECH_DEVICES no mode (it is ignored)
gchar **
-bd_lvm_get_devices_filter (GError **error);
-
-a copy of a string representation of -the currently set LVM devices filter
-Tech category: BD_LVM_TECH_DEVICES no mode (it is ignored).
[transfer full][array zero-terminated=1]
-const gchar * -bd_lvm_get_vdo_write_policy_str (-BDLVMVDOWritePolicy policy, -GError **error);
policy |
-policy to get the string representation for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of policy
-or NULL in case of error
Tech category: always provided/supported
-gboolean -bd_lvm_set_devices_filter (-const gchar **devices, -GError **error);
devices |
-list of devices for lvm commands to work on. |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the devices filter was successfully set or not
-Tech category: BD_LVM_TECH_DEVICES no mode (it is ignored)
gboolean -bd_lvm_writecache_attach (-const gchar *vg_name, -const gchar *data_lv, -const gchar *cache_lv, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the |
-- |
data_lv |
-data LV to attach the |
-- |
cache_lv |
-cache (fast) LV to attach to the |
-- |
extra |
-extra options for the cache attachment -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cache_lv
-was successfully attached to the data_lv
-or not
Tech category: BD_LVM_TECH_WRITECACHE-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_writecache_create_cached_lv (-const gchar *vg_name, -const gchar *lv_name, -guint64 data_size, -guint64 cache_size, -const gchar **slow_pvs, -const gchar **fast_pvs, -GError **error);
vg_name |
-name of the VG to create a cached LV in |
-- |
lv_name |
-name of the cached LV to create |
-- |
data_size |
-size of the data LV |
-- |
cache_size |
-size of the cache (or cached LV more precisely) |
-- |
slow_pvs |
-list of slow PVs (used for the data LV). |
-[array zero-terminated=1] | -
fast_pvs |
-list of fast PVs (used for the cache LV). |
-[array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cached LV lv_name
-was successfully created or not
Tech category: BD_LVM_TECH_WRITECACHE-BD_LVM_TECH_MODE_CREATE
gboolean -bd_lvm_writecache_detach (-const gchar *vg_name, -const gchar *cached_lv, -gboolean destroy, -const BDExtraArg **extra, -GError **error);
vg_name |
-name of the VG containing the |
-- |
cached_lv |
-name of the cached LV to detach its cache from |
-- |
destroy |
-whether to destroy the cache after detach or not |
-- |
extra |
-extra options for the cache detachment -(just passed to LVM as is). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the cache was successfully detached from the cached_lv
-or not
Note: synces the cache first
-Tech category: BD_LVM_TECH_WRITECACHE-BD_LVM_TECH_MODE_MODIFY
gboolean -bd_lvm_is_tech_avail (-BDLVMTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDLVMTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
typedef struct {
- gchar *pv_name;
- gchar *pv_uuid;
- guint64 pv_free;
- guint64 pv_size;
- guint64 pe_start;
- gchar *vg_name;
- gchar *vg_uuid;
- guint64 vg_size;
- guint64 vg_free;
- guint64 vg_extent_size;
- guint64 vg_extent_count;
- guint64 vg_free_count;
- guint64 vg_pv_count;
- gchar **pv_tags;
- gboolean missing;
-} BDLVMPVdata;
-
-gchar * |
-name of the PV |
-- |
gchar * |
-UUID of the PV |
-- |
guint64 |
-size of the free space in the PV |
-- |
guint64 |
-size of the PV |
-- |
guint64 |
-start of the physical extents area (i.e. offset of the first PE) |
-- |
gchar * |
-name of the VG the PV belongs to |
-- |
gchar * |
-UUID of the VG the PV belongs to |
-- |
guint64 |
-size of the VG the PV belongs to |
-- |
guint64 |
-size of the free space in the PV's VG |
-- |
guint64 |
-extent size used by the PV's VG |
-- |
guint64 |
-number of extents in the PV's VG |
-- |
guint64 |
-number of free extents in the PV's VG |
-- |
guint64 |
-number of PVs that belong to this PV's VG |
-- |
gchar ** |
-list of LVM tags for this PV. |
-[array zero-terminated=1] | -
gboolean |
-whether this PV is missing from the system or not |
-- |
typedef struct {
- gchar *name;
- gchar *uuid;
- guint64 size;
- guint64 free;
- guint64 extent_size;
- guint64 extent_count;
- guint64 free_count;
- guint64 pv_count;
- gboolean exported;
- gchar **vg_tags;
-} BDLVMVGdata;
-
-gchar * |
-name of the VG |
-- |
gchar * |
-UUID of the VG |
-- |
guint64 |
-size of the VG |
-- |
guint64 |
-size of the free space in the VG |
-- |
guint64 |
-extent size used by the VG |
-- |
guint64 |
-number of extents in the VG |
-- |
guint64 |
-number of free extents in the VG |
-- |
guint64 |
-number of PVs that belong to the VG |
-- |
gboolean |
-whether the VG is exported or not |
-- |
gchar ** |
-list of LVM tags for this VG. |
-[array zero-terminated=1] | -
typedef struct {
- guint64 size_pe;
- guint64 pv_start_pe;
- gchar *pvdev;
-} BDLVMSEGdata;
-
-
-typedef struct {
- gchar *lv_name;
- gchar *vg_name;
- gchar *uuid;
- guint64 size;
- gchar *attr;
- gchar *segtype;
- gchar *origin;
- gchar *pool_lv;
- gchar *data_lv;
- gchar *metadata_lv;
- gchar *roles;
- gchar *move_pv;
- guint64 data_percent;
- guint64 metadata_percent;
- guint64 copy_percent;
- gchar **lv_tags;
- gchar **data_lvs;
- gchar **metadata_lvs;
- BDLVMSEGdata **segs;
-} BDLVMLVdata;
-
-The segs
-, data_lvs
-, and metadata_lvs
- fields are only filled by a
-call to bd_lvm_lvinfo_tree or bd_lvm_lvs_tree. They are all NULL
-normally. If they are filled, they follow these rules:
A LV is either stored directly on physical volumes, or is made up
-of sub-LVs. If it is stored on PVs, the segs
- list is non-empty
-and the data_lvs
- and metadata_lvs
- fields are both NULL. If it is
-made up of sub-LVs, then segs
- is NULL, data_lvs
- is non-empty and
-metadata_lvs
- might or might not be empty but is non-NULL. The
-sub-LVs contained in data_lv
- and metadata_lv
- are always included
-in data_lvs
- and metadata_lvs
-, respectively.
For a partial LV, the segs
- list might not be complete; i.e., the
-sum of the sizes of the listed segments might not be equal to the
-size reported for the LV itself.
Also, the order of entries in segs
- must be assumed to be random;
-it does not correspond to the order of segements in the logical
-volume itself.
gchar * |
-name of the LV |
-- |
gchar * |
-name of the VG the LV belongs to |
-- |
gchar * |
-UUID of the LV |
-- |
guint64 |
-size of the LV |
-- |
gchar * |
-attributes of the LV |
-- |
gchar * |
-segment type of the LV |
-- |
gchar * |
-origin of the LV (for snapshots, etc.) |
-- |
gchar * |
-pool LV of the LV (for thin and cached LVs) |
-- |
gchar * |
-data LV of the LV (for thin and cache pools) |
-- |
gchar * |
-metadata LV of the LV (for thin and cache pools) |
-- |
gchar * |
-comma separated list of this LV's roles |
-- |
gchar * |
-source physical volume of a temporary logical volume created with the pvmove command |
-- |
guint64 |
-available data space in a thin pool |
-- |
guint64 |
-available metadata space in a thin pool |
-- |
guint64 |
-synchronization percentage of a mirrored logical volume |
-- |
gchar ** |
-list of LVM tags for this LV. |
-[array zero-terminated=1] | -
gchar ** |
-list of data sub-LVs this LV (for raids, etc). |
-[nullable][array zero-terminated=1] | -
gchar ** |
-list of metadata sub-LVS for this LV (for raids, etc). |
-[nullable][array zero-terminated=1] | -
BDLVMSEGdata ** |
-The segments of this LV. |
-[nullable][array zero-terminated=1] | -
typedef struct {
- guint64 block_size;
- guint64 cache_size;
- guint64 cache_used;
- guint64 md_block_size;
- guint64 md_size;
- guint64 md_used;
- guint64 read_hits;
- guint64 read_misses;
- guint64 write_hits;
- guint64 write_misses;
- BDLVMCacheMode mode;
-} BDLVMCacheStats;
-
-guint64 |
-block size used by the cache |
-- |
guint64 |
-size of the cache |
-- |
guint64 |
-size of the used space in the cache |
-- |
guint64 |
-block size used for cache metadata |
-- |
guint64 |
-size of the metadata space of the cache |
-- |
guint64 |
-size of the used metadata space in the cache |
-- |
guint64 |
-number of read hits |
-- |
guint64 |
-number of read misses |
-- |
guint64 |
-number of write hits |
-- |
guint64 |
-number of write misses |
-- |
BDLVMCacheMode |
-mode the cache is operating in |
-- |
typedef struct {
- gint64 block_size;
- gint64 logical_block_size;
- gint64 physical_blocks;
- gint64 data_blocks_used;
- gint64 overhead_blocks_used;
- gint64 logical_blocks_used;
- gint64 used_percent;
- gint64 saving_percent;
- gdouble write_amplification_ratio;
-} BDLVMVDOStats;
-
-gint64 |
-The block size of a VDO volume, in bytes. |
-- |
gint64 |
-The logical block size, in bytes. |
-- |
gint64 |
-The total number of physical blocks allocated for a VDO volume. |
-- |
gint64 |
-The number of physical blocks currently in use by a VDO volume -to store data. |
-- |
gint64 |
-The number of physical blocks currently in use by a VDO volume -to store VDO metadata. |
-- |
gint64 |
-The number of logical blocks currently mapped. |
-- |
gint64 |
-The percentage of physical blocks used on a VDO volume -(= used blocks / allocated blocks * 100). |
-- |
gint64 |
-The percentage of physical blocks saved on a VDO volume -(= [logical blocks used - physical blocks used] / logical blocks used). |
-- |
gdouble |
-The average number of block writes to the underlying storage -per block written to the VDO device. |
-- |
typedef struct {
- BDLVMVDOOperatingMode operating_mode;
- BDLVMVDOCompressionState compression_state;
- BDLVMVDOIndexState index_state;
- BDLVMVDOWritePolicy write_policy;
- guint64 used_size;
- gint32 saving_percent;
- guint64 index_memory_size;
- gboolean deduplication;
- gboolean compression;
-} BDLVMVDOPooldata;
-
-BDLVMVDOOperatingMode |
-operating mode of the VDO pool (e.g. |
-- |
BDLVMVDOCompressionState |
-state of the compression |
-- |
BDLVMVDOIndexState |
-state of the VDO index |
-- |
BDLVMVDOWritePolicy |
-write policy of the VDO LV |
-- |
guint64 |
-currently used space |
-- |
gint32 |
-percentage of physical blocks saved |
-- |
guint64 |
-index memory size of the VDO volume |
-- |
gboolean |
-whether deduplication is enabled |
-- |
gboolean |
-whether compression is enabled |
-- |
| -Top - | -
| -gboolean - | --bd_loop_check_deps () - | -
| -gboolean - | --bd_loop_init () - | -
| -void - | --bd_loop_close () - | -
| -GQuark - | --bd_loop_error_quark () - | -
| -gchar * - | --bd_loop_get_backing_file () - | -
| -gchar * - | --bd_loop_get_loop_name () - | -
| -gboolean - | --bd_loop_setup () - | -
| -gboolean - | --bd_loop_setup_from_fd () - | -
| -gboolean - | --bd_loop_teardown () - | -
| -gboolean - | --bd_loop_get_autoclear () - | -
| -gboolean - | --bd_loop_set_autoclear () - | -
| -gboolean - | --bd_loop_is_tech_avail () - | -
| #define | -BD_LOOP_ERROR | -
| enum | -BDLoopError | -
| enum | -BDLoopTech | -
| enum | -BDLoopTechMode | -
A plugin for operations with loop devices. All sizes passed -in/out to/from the functions are in bytes.
-gboolean
-bd_loop_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_loop_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gchar * -bd_loop_get_backing_file (-const gchar *dev_name, -GError **error);
dev_name |
-name of the loop device to get backing file for (e.g. "loop0") |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
path of the device's backing file or NULL if none
-is found
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_QUERY.
[transfer full]
-gchar * -bd_loop_get_loop_name (-const gchar *file, -GError **error);
file |
-path of the backing file to get loop name for |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
name of the loop device associated with the given file
-
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_loop_setup (-const gchar *file, -guint64 offset, -guint64 size, -gboolean read_only, -gboolean part_scan, -const gchar **loop_name, -GError **error);
file |
-file to setup as a loop device |
-- |
offset |
-offset of the start of the device (in |
-- |
size |
-maximum size of the device (or 0 to leave unspecified) |
-- |
read_only |
-- | - |
part_scan |
-whether to enforce partition scan on the newly created device or not |
-- |
loop_name |
-if not |
-[optional][out] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the file
-was successfully setup as a loop device or not
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_CREATE
gboolean -bd_loop_setup_from_fd (-gint fd, -guint64 offset, -guint64 size, -gboolean read_only, -gboolean part_scan, -const gchar **loop_name, -GError **error);
fd |
-file descriptor for a file to setup as a new loop device |
-- |
offset |
-offset of the start of the device (in file given by |
-- |
size |
-maximum size of the device (or 0 to leave unspecified) |
-- |
read_only |
-- | - |
part_scan |
-whether to enforce partition scan on the newly created device or not |
-- |
loop_name |
-if not |
-[optional][out] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether an new loop device was successfully setup for fd
-or not
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_CREATE
gboolean -bd_loop_teardown (-const gchar *loop, -GError **error);
loop |
-path or name of the loop device to tear down |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the loop
-device was successfully torn down or not
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_DESTROY
gboolean -bd_loop_get_autoclear (-const gchar *loop, -GError **error);
loop |
-path or name of the loop device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the autoclear flag is set on the loop
-device or not (if FALSE, error
-may be set)
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_QUERY
gboolean -bd_loop_set_autoclear (-const gchar *loop, -gboolean autoclear, -GError **error);
loop |
-path or name of the loop device |
-- |
autoclear |
-whether to set or unset the autoclear flag |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the autoclear flag was successfully set on the loop
-device or not
Tech category: BD_LOOP_TECH_LOOP-BD_LOOP_TECH_MODE_MODIFY
gboolean -bd_loop_is_tech_avail (-BDLoopTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDLoopTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
| -Top - | -
| #define | -BD_MD_SUPERBLOCK_SIZE | -
| #define | -BD_MD_CHUNK_SIZE | -
| #define | -BD_MD_ERROR | -
| enum | -BDMDError | -
| - | BDMDExamineData | -
| - | BDMDDetailData | -
| enum | -BDMDTech | -
| enum | -BDMDTechMode | -
A plugin for basic operations with MD RAID. Also sizes are in -bytes unless specified otherwise.
-gboolean
-bd_md_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_md_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-BDMDExamineData *
-bd_md_examine_data_copy (BDMDExamineData *data);
-Creates a new copy of data
-.
[skip]
- -void
-bd_md_examine_data_free (BDMDExamineData *data);
-Frees data
-.
[skip]
- -void
-bd_md_detail_data_free (BDMDDetailData *data);
-Frees data
-.
[skip]
- -BDMDDetailData *
-bd_md_detail_data_copy (BDMDDetailData *data);
-Creates a new copy of data
-.
[skip]
- -guint64 -bd_md_get_superblock_size (-guint64 member_size, -const gchar *version, -GError **error);
member_size |
-size of an array member |
-- |
version |
-metadata version or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
gboolean -bd_md_create (-const gchar *device_name, -const gchar *level, -const gchar **disks, -guint64 spares, -const gchar *version, -gboolean bitmap, -guint64 chunk_size, -const BDExtraArg **extra, -GError **error);
device_name |
-name of the device to create |
-- |
level |
-RAID level (as understood by mdadm, see mdadm(8)) |
-- |
disks |
-disks to use for the new RAID (including spares). |
-[array zero-terminated=1] | -
spares |
-number of spare devices |
-- |
version |
-metadata version. |
-[nullable] | -
bitmap |
-whether to create an internal bitmap on the device or not |
-- |
chunk_size |
-chunk size of the device to create |
-- |
extra |
-extra options for the creation (right now -passed to the 'mdadm' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the new MD RAID device device_name
-was successfully created or not
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_CREATE
gboolean -bd_md_destroy (-const gchar *device, -GError **error);
device |
-device to destroy MD RAID metadata on |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the MD RAID metadata was successfully destroyed on device
-or not
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_DELETE
gboolean -bd_md_deactivate (-const gchar *raid_spec, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the RAID device raid_spec
-was successfully deactivated or not
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_activate (-const gchar *raid_spec, -const gchar **members, -const gchar *uuid, -gboolean start_degraded, -const BDExtraArg **extra, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to activate (if not given "--scan" is implied and |
-[nullable] | -
members |
-member devices to be considered for |
-[nullable][array zero-terminated=1] | -
uuid |
-UUID (in the MD RAID format!) of the MD RAID to activate. |
-[nullable] | -
start_degraded |
-whether to start the array even if it's degraded |
-- |
extra |
-extra options for the activation (right now -passed to the 'mdadm' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the MD RAID device
-was successfully activated or not
Note: either members
-or uuid
-(or both) have to be specified.
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_run (-const gchar *raid_spec, -GError **error);
raid_spec |
-specification of the (possibly degraded) RAID device (name, node or path) to be started |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the raid_spec
-was successfully started or not
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_nominate (-const gchar *device, -GError **error);
device |
-device to nominate (add to its appropriate RAID) as a MD RAID device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully nominated (added to its
-appropriate RAID) or not
Note: may start the MD RAID if it becomes ready by adding device
-.
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_denominate (-const gchar *device, -GError **error);
device |
-device to denominate (remove from its appropriate RAID) as a MD RAID device |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully denominated (added to its
-appropriate RAID) or not
Note: may start the MD RAID if it becomes ready by adding device
-.
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_add (-const gchar *raid_spec, -const gchar *device, -guint64 raid_devs, -const BDExtraArg **extra, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to add |
-- |
device |
-name of the device to add to the |
-- |
raid_devs |
-number of devices the |
-- |
extra |
-extra options for the addition (right now -passed to the 'mdadm' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully added to the raid_spec
-RAID or
-not
The raid_devs
-parameter is used when adding devices to a raid array that has
-no actual redundancy. In this case it is necessary to explicitly grow the
-array all at once rather than manage it in the sense of adding spares.
Whether the new device will be added as a spare or an active member is -decided by mdadm.
-Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_remove (-const gchar *raid_spec, -const gchar *device, -gboolean fail, -const BDExtraArg **extra, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to remove |
-- |
device |
-device to remove from the |
-- |
fail |
-whether to mark the |
-- |
extra |
-extra options for the removal (right now -passed to the 'mdadm' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the device
-was successfully removed from the raid_spec
-RAID or not.
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
BDMDExamineData * -bd_md_examine (-const gchar *device, -GError **error);
device |
-name of the device (a member of an MD RAID) to examine |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the MD RAID extracted from the device
-
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_QUERY
gchar * -bd_md_canonicalize_uuid (- - -const gchar *uuid, -GError **error);
gchar * -bd_md_get_md_uuid (-const gchar *uuid, -GError **error);
uuid |
-UUID to transform into format used by MD RAID |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
transformed form of uuid
-
This function expects a UUID in the canonical (traditional format) and
-returns a UUID in the format used by MD RAID and is thus reverse to
-bd_md_canonicalize_uuid(). The change is as follows:
-3386ff85-f501-2621-4a43-5f061eb47236 -> 3386ff85:f5012621:4a435f06:1eb47236
Tech category: always available.
-[transfer full]
-BDMDDetailData * -bd_md_detail (-const gchar *raid_spec, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to examine |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
information about the MD RAID raid_spec
-
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_QUERY
gchar * -bd_md_node_from_name (-const gchar *name, -GError **error);
name |
-name of the MD RAID |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
device node of the name
-MD RAID or NULL in case of error
Tech category: always available
-gchar * -bd_md_name_from_node (-const gchar *node, -GError **error);
node |
-path of the MD RAID's device node |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
name
-of the MD RAID the device node belongs to or NULL in case of error
Tech category: always available
-gchar * -bd_md_get_status (-const gchar *raid_spec, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to get status |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
status of the raid_spec
-RAID.
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_md_set_bitmap_location (-const gchar *raid_spec, -const gchar *location, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to set the bitmap location |
-- |
location |
-bitmap location (none, internal or path) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether location
-was successfully set for raid_spec
-
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gchar * -bd_md_get_bitmap_location (-const gchar *raid_spec, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to get the bitmap location |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
bitmap location for raid_spec
-
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_md_request_sync_action (-const gchar *raid_spec, -const gchar *action, -GError **error);
raid_spec |
-specification of the RAID device (name, node or path) to request sync action on |
-- |
action |
-requested sync action (resync, recovery, check, repair or idle) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the action
-was successfully requested for the raid_spec
-RAID or not.
Tech category: BD_MD_TECH_MDRAID-BD_MD_TECH_MODE_MODIFY
gboolean -bd_md_is_tech_avail (- - -BDMDTech tech, -guint64 mode, -GError **error);
typedef struct {
- gchar *device;
- gchar *level;
- guint64 num_devices;
- gchar *name;
- guint64 size;
- gchar *uuid;
- guint64 update_time;
- gchar *dev_uuid;
- guint64 events;
- gchar *metadata;
- guint64 chunk_size;
-} BDMDExamineData;
-
-gchar * |
-path of the MD device |
-- |
gchar * |
-RAID level of the device |
-- |
guint64 |
-number of devices used by the MD device |
-- |
gchar * |
-name of the MD device |
-- |
guint64 |
-size of the MD device |
-- |
gchar * |
-array UUID |
-- |
guint64 |
-update time of the MD device |
-- |
gchar * |
-UUID of the member device |
-- |
guint64 |
-number of events on the MD device |
-- |
gchar * |
-version of the metadata used by the MD device |
-- |
guint64 |
-chunk size used by the MD device |
-- |
typedef struct {
- gchar *device;
- gchar *metadata;
- gchar *creation_time;
- gchar *level;
- gchar *name;
- guint64 array_size;
- guint64 use_dev_size;
- guint64 raid_devices;
- guint64 total_devices;
- guint64 active_devices;
- guint64 working_devices;
- guint64 failed_devices;
- guint64 spare_devices;
- gboolean clean;
- gchar *uuid;
- gchar *container;
-} BDMDDetailData;
-
-gchar * |
-path of the device |
-- |
gchar * |
-version of the metadata used by the device |
-- |
gchar * |
-creation time |
-- |
gchar * |
-level of the MD RAID |
-- |
gchar * |
-name of the MD device |
-- |
guint64 |
-size of the MD array |
-- |
guint64 |
-size of the used space |
-- |
guint64 |
-number of devices in the MD array |
-- |
guint64 |
-total number of devices in the MD array |
-- |
guint64 |
-number of active devices in the MD array |
-- |
guint64 |
-number of working devices in the MD array |
-- |
guint64 |
-number of failed devices in the MD array |
-- |
guint64 |
-number of spare devices in the MD array |
-- |
gboolean |
-whether the MD array is clean or not |
-- |
gchar * |
-uuid of the MD array |
-- |
gchar * |
-path of the MD container this device belongs to |
-- |
| -Top - | -
| -gboolean - | --bd_mpath_check_deps () - | -
| -gboolean - | --bd_mpath_init () - | -
| -void - | --bd_mpath_close () - | -
| -GQuark - | --bd_mpath_error_quark () - | -
| -gboolean - | --bd_mpath_flush_mpaths () - | -
| -gboolean - | --bd_mpath_is_mpath_member () - | -
| -gchar ** - | --bd_mpath_get_mpath_members () - | -
| -gboolean - | --bd_mpath_set_friendly_names () - | -
| -gboolean - | --bd_mpath_is_tech_avail () - | -
| #define | -BD_MPATH_ERROR | -
| enum | -BDMpathError | -
| enum | -BDMpathTech | -
| enum | -BDMpathTechMode | -
gboolean
-bd_mpath_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_mpath_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean
-bd_mpath_flush_mpaths (GError **error);
-
-whether multipath device maps were successfully flushed or not
-Flushes all unused multipath device maps.
-Tech category: BD_MPATH_TECH_BASE-BD_MPATH_TECH_MODE_MODIFY
gboolean -bd_mpath_is_mpath_member (-const gchar *device, -GError **error);
device |
-device to test |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
TRUE if the device is a multipath member, FALSE if not or an error
-appeared when queried (error
-is set in those cases)
Tech category: BD_MPATH_TECH_BASE-BD_MPATH_TECH_MODE_QUERY
gchar **
-bd_mpath_get_mpath_members (GError **error);
-
-list of names of all devices that are
-members of the mpath mappings (or NULL
-in case of error)
Tech category: BD_MPATH_TECH_BASE-BD_MPATH_TECH_MODE_QUERY.
[transfer full][array zero-terminated=1]
-gboolean -bd_mpath_set_friendly_names (-gboolean enabled, -GError **error);
enabled |
-whether friendly names should be enabled or not |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
if successfully set or not
-Tech category: BD_MPATH_TECH_FRIENDLY_NAMES-BD_MPATH_TECH_MODE_MODIFY
gboolean -bd_mpath_is_tech_avail (- - -BDMpathTech tech, -guint64 mode, -GError **error);
| -Top - | -
| -gboolean - | --bd_nvdimm_check_deps () - | -
| -void - | --bd_nvdimm_close () - | -
| -gboolean - | --bd_nvdimm_init () - | -
| -GQuark - | --bd_nvdimm_error_quark () - | -
| -BDNVDIMMNamespaceMode - | --bd_nvdimm_namespace_get_mode_from_str () - | -
| const gchar * - | --bd_nvdimm_namespace_get_mode_str () - | -
| -gchar * - | --bd_nvdimm_namespace_get_devname () - | -
| -gboolean - | --bd_nvdimm_namespace_enable () - | -
| -gboolean - | --bd_nvdimm_namespace_disable () - | -
| -BDNVDIMMNamespaceInfo * - | --bd_nvdimm_namespace_info () - | -
| -BDNVDIMMNamespaceInfo ** - | --bd_nvdimm_list_namespaces () - | -
| -gboolean - | --bd_nvdimm_namespace_reconfigure () - | -
| const guint64 * - | --bd_nvdimm_namespace_get_supported_sector_sizes () - | -
| -BDNVDIMMNamespaceInfo * - | --bd_nvdimm_namespace_info_copy () - | -
| -void - | --bd_nvdimm_namespace_info_free () - | -
| -gboolean - | --bd_nvdimm_is_tech_avail () - | -
| #define | -BD_NVDIMM_ERROR | -
| enum | -BDNVDIMMError | -
| enum | -BDNVDIMMNamespaceMode | -
| - | BDNVDIMMNamespaceInfo | -
| enum | -BDNVDIMMTech | -
| enum | -BDNVDIMMTechMode | -
void
-bd_nvdimm_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean
-bd_nvdimm_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-BDNVDIMMNamespaceMode -bd_nvdimm_namespace_get_mode_from_str (-const gchar *mode_str, -GError **error);
mode_str |
-string representation of mode |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
mode matching the mode_str
-given or BD_NVDIMM_NAMESPACE_MODE_UNKNOWN in case of no match
Tech category: always available
-const gchar * -bd_nvdimm_namespace_get_mode_str (-BDNVDIMMNamespaceMode mode, -GError **error);
mode |
-mode to get string representation of |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
string representation of mode
-or NULL in case of error
Tech category: always available.
-[transfer none]
-gchar * -bd_nvdimm_namespace_get_devname (-const gchar *device, -GError **error);
device |
-name or path of a block device (e.g. "/dev/pmem0") |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
namespace device name (e.g. "namespaceX.Y") for device
-or NULL if device
-is not a NVDIMM namespace
-(error
-may be set to indicate error)
Tech category: BD_NVDIMM_TECH_NAMESPACE-BD_NVDIMM_TECH_MODE_QUERY.
[transfer full]
-gboolean -bd_nvdimm_namespace_enable (-const gchar *namespace, -const BDExtraArg **extra, -GError **error);
namespace |
-name of the namespace to enable |
-- |
extra |
-extra options (currently unused). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the namespace
-was successfully enabled or not
Tech category: BD_NVDIMM_TECH_NAMESPACE-BD_NVDIMM_TECH_MODE_ACTIVATE_DEACTIVATE
gboolean -bd_nvdimm_namespace_disable (-const gchar *namespace, -const BDExtraArg **extra, -GError **error);
namespace |
-name of the namespace to disable |
-- |
extra |
-extra options (currently unused). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the namespace
-was successfully disabled or not
Tech category: BD_NVDIMM_TECH_NAMESPACE-BD_NVDIMM_TECH_MODE_ACTIVATE_DEACTIVATE
BDNVDIMMNamespaceInfo * -bd_nvdimm_namespace_info (-const gchar *namespace, -const BDExtraArg **extra, -GError **error);
namespace |
-namespace to get information about |
-- |
extra |
-extra options (currently unused). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
information about given namespace or NULL if no such
-namespace was found (error
-may be set to indicate error)
Tech category: BD_NVDIMM_TECH_NAMESPACE-BD_NVDIMM_TECH_MODE_QUERY.
[transfer full]
-BDNVDIMMNamespaceInfo ** -bd_nvdimm_list_namespaces (-const gchar *bus, -const gchar *region, -gboolean idle, -const BDExtraArg **extra, -GError **error);
bus |
-return only namespaces on given bus (specified by name),
- |
-[nullable] | -
region |
-return only namespaces on given region (specified by regionX name or region id),
- |
-[nullable] | -
idle |
-whether to list idle (not enabled) namespaces too |
-- |
extra |
-extra options for the creation (right now -passed to the 'ndctl' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
information about the namespaces on bus
-and region
-or
-NULL if no namespaces were found (error
-may be set to indicate error)
Tech category: BD_NVDIMM_TECH_NAMESPACE-BD_NVDIMM_TECH_MODE_QUERY.
[array zero-terminated=1]
-gboolean -bd_nvdimm_namespace_reconfigure (-const gchar *namespace, -BDNVDIMMNamespaceMode mode, -gboolean force, -const BDExtraArg **extra, -GError **error);
namespace |
-name of the namespace to reconfigure |
-- |
mode |
-mode type to set (memory/sector/raw/dax) |
-- |
force |
-whether to use force to reconfigure an active namespace |
-- |
error |
-place to store error if any. |
-[out][optional] | -
extra |
-extra options for the creation (right now -passed to the 'ndctl' utility). |
-[nullable][array zero-terminated=1] | -
const guint64 * -bd_nvdimm_namespace_get_supported_sector_sizes - (-BDNVDIMMNamespaceMode mode, -GError **error);
mode |
-namespace mode |
-- |
error |
-place to store error if any. |
-[out][optional] | -
list of supported sector sizes for mode
-
Tech category: BD_NVDIMM_TECH_NAMESPACE-BD_NVDIMM_TECH_MODE_QUERY.
[transfer none][array zero-terminated=1]
-BDNVDIMMNamespaceInfo *
-bd_nvdimm_namespace_info_copy (BDNVDIMMNamespaceInfo *info);
-Creates a new copy of info
-.
[skip]
- -void
-bd_nvdimm_namespace_info_free (BDNVDIMMNamespaceInfo *info);
-Frees info
-.
[skip]
- -gboolean -bd_nvdimm_is_tech_avail (-BDNVDIMMTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDNVDIMMTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
typedef struct {
- gchar *dev;
- guint64 mode;
- guint64 size;
- gchar *uuid;
- guint64 sector_size;
- gchar *blockdev;
- gboolean enabled;
-} BDNVDIMMNamespaceInfo;
-
-gchar * |
-namespace device name ("namespaceX.Y") |
-- |
guint64 |
-mode of the namespace (BDNVDIMMNamespaceMode) |
-- |
guint64 |
-size of the namespace |
-- |
gchar * |
-UUID of the namespace |
-- |
guint64 |
-sector size of the namespace (0 for non-sector namespaces) |
-- |
gchar * |
-name of the block device for the namespace |
-- |
gboolean |
-whether the namespace is enabled or not |
-- |
| -Top - | -
| #define | -BD_NVME_ERROR | -
| enum | -BDNVMEError | -
| enum | -BDNVMETech | -
| enum | -BDNVMETechMode | -
| enum | -BDNVMEControllerFeature | -
| enum | -BDNVMEControllerType | -
| - | BDNVMEControllerInfo | -
| enum | -BDNVMELBAFormatRelativePerformance | -
| - | BDNVMELBAFormat | -
| enum | -BDNVMENamespaceFeature | -
| - | BDNVMENamespaceInfo | -
| enum | -BDNVMESmartCriticalWarning | -
| - | BDNVMESmartLog | -
| enum | -BDNVMETransportType | -
| - | BDNVMEErrorLogEntry | -
| - | BDNVMESelfTestLog | -
| - | BDNVMESelfTestLogEntry | -
| enum | -BDNVMESelfTestAction | -
| enum | -BDNVMESelfTestResult | -
| enum | -BDNVMEFormatSecureErase | -
| enum | -BDNVMESanitizeStatus | -
| - | BDNVMESanitizeLog | -
| enum | -BDNVMESanitizeAction | -
| - | BDNVMEDiscoveryLogEntry | -
| enum | -BDNVMEAddressFamily | -
| enum | -BDNVMETCPSecurity | -
void
-bd_nvme_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean
-bd_nvme_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-gboolean -bd_nvme_is_tech_avail (-BDNVMETech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDNVMETechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][nullable] | -
BDNVMEControllerInfo * -bd_nvme_get_controller_info (-const gchar *device, -GError **error);
Retrieves information about the NVMe controller (the Identify Controller command)
-as specified by the device
- block device path.
device |
-a NVMe controller device (e.g. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
information about given controller or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_INFO.
[transfer full]
-void
-bd_nvme_controller_info_free (BDNVMEControllerInfo *info);
-Frees info
-.
[skip]
- -BDNVMEControllerInfo *
-bd_nvme_controller_info_copy (BDNVMEControllerInfo *info);
-Creates a new copy of info
-.
[skip]
- -void
-bd_nvme_lba_format_free (BDNVMELBAFormat *fmt);
-Frees fmt
-.
[skip]
- -BDNVMELBAFormat *
-bd_nvme_lba_format_copy (BDNVMELBAFormat *fmt);
-Creates a new copy of fmt
-.
[skip]
- -BDNVMENamespaceInfo * -bd_nvme_get_namespace_info (-const gchar *device, -GError **error);
Retrieves information about the NVMe namespace (the Identify Namespace command)
-as specified by the device
- block device path.
device |
-a NVMe namespace device (e.g. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
information about given namespace or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_INFO.
[transfer full]
-void
-bd_nvme_namespace_info_free (BDNVMENamespaceInfo *info);
-Frees info
-.
[skip]
- -BDNVMENamespaceInfo *
-bd_nvme_namespace_info_copy (BDNVMENamespaceInfo *info);
-Creates a new copy of info
-.
[skip]
- -BDNVMESmartLog * -bd_nvme_get_smart_log (-const gchar *device, -GError **error);
Retrieves drive SMART and general health information (Log Identifier 02h).
-The information provided is over the life of the controller and is retained across power cycles.
device |
-a NVMe controller device (e.g. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
health log data or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_INFO.
[transfer full]
-void
-bd_nvme_smart_log_free (BDNVMESmartLog *log);
-Frees log
-.
[skip]
- -BDNVMESmartLog *
-bd_nvme_smart_log_copy (BDNVMESmartLog *log);
-Creates a new copy of log
-.
[skip]
- -BDNVMEErrorLogEntry ** -bd_nvme_get_error_log_entries (-const gchar *device, -GError **error);
Retrieves Error Information Log (Log Identifier 01h) entries, used to describe
-extended error information for a command that completed with error or to report
-an error that is not specific to a particular command. This log is global to the
-controller. The ordering of the entries is based on the time when the error
-occurred, with the most recent error being returned as the first log entry.
-As the number of entries is typically limited by the drive implementation, only
-most recent entries are provided.
device |
-a NVMe controller device (e.g. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
null-terminated list
-of error entries or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_INFO.
[transfer full][array zero-terminated=1]
-void
-bd_nvme_error_log_entry_free (BDNVMEErrorLogEntry *entry);
-Frees entry
-.
[skip]
- -BDNVMEErrorLogEntry *
-bd_nvme_error_log_entry_copy (BDNVMEErrorLogEntry *entry);
-Creates a new copy of entry
-.
[skip]
- -BDNVMESelfTestLog * -bd_nvme_get_self_test_log (-const gchar *device, -GError **error);
Retrieves drive self-test log (Log Identifier 06h). Provides the status of a self-test operation
-in progress and the percentage complete of that operation, along with the results of the last
-20 device self-test operations.
device |
-a NVMe controller device (e.g. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
self-test log data or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_INFO.
[transfer full]
-void
-bd_nvme_self_test_log_free (BDNVMESelfTestLog *log);
-Frees log
-.
[skip]
- -BDNVMESelfTestLog *
-bd_nvme_self_test_log_copy (BDNVMESelfTestLog *log);
-Creates a new copy of log
-.
[skip]
- -void
-bd_nvme_self_test_log_entry_free (BDNVMESelfTestLogEntry *entry);
-Frees entry
-.
[skip]
- -BDNVMESelfTestLogEntry *
-bd_nvme_self_test_log_entry_copy (BDNVMESelfTestLogEntry *entry);
-Creates a new copy of entry
-.
[skip]
- -const gchar * -bd_nvme_self_test_result_to_string (-BDNVMESelfTestResult result, -GError **error);
result |
-- | - |
error |
-place to store error (if any). |
-[out][optional] | -
A string representation of result
-for use as an identifier string
-or NULL when the code is unknown.
[transfer none]
-gboolean -bd_nvme_device_self_test (-const gchar *device, -BDNVMESelfTestAction action, -GError **error);
Initiates or aborts the Device Self-test operation on the controller or a namespace,
-distinguished by the device
- path specified. In case a controller device
-is specified then the self-test operation would include all active namespaces.
To abort a running operation, pass BD_NVME_SELF_TEST_ACTION_ABORT as action
-.
-To retrieve progress of a current running operation, check the self-test log using
-bd_nvme_get_self_test_log().
device |
-a NVMe controller or namespace device (e.g. |
-- |
action |
-self-test action to take. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
TRUE if the device self-test command was issued successfully,
-FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_MANAGE
gboolean -bd_nvme_format (-const gchar *device, -guint16 lba_data_size, -BDNVMEFormatSecureErase secure_erase, -GError **error);
Performs low level format of the NVM media, destroying all data and metadata for either -a specific namespace or all attached namespaces to the controller. Use this command -to change LBA sector size. Optional secure erase method can be specified as well.
-Supported LBA data sizes for a given namespace can be listed using the bd_nvme_get_namespace_info()
-call. In case of a special value 0 the current LBA format for a given namespace will be
-retained. When called on a controller device the first namespace is used as a reference.
Note that the NVMe controller may define a Format NVM attribute indicating that the format
-operation would apply to all namespaces and a format (excluding secure erase) of any
-namespace results in a format of all namespaces in the NVM subsystem. In such case and
-when device
- is a namespace block device the BD_NVME_ERROR_WOULD_FORMAT_ALL_NS error
-is returned to prevent further damage. This is then supposed to be handled by the caller
-and bd_nvme_format() is supposed to be called on a controller device instead.
This call blocks until the format operation has finished. To retrieve progress
-of a current running operation, check the namespace info using bd_nvme_get_namespace_info().
device |
-NVMe namespace or controller device to format (e.g. |
-- |
lba_data_size |
-desired LBA data size (i.e. a sector size) in bytes or |
-- |
secure_erase |
-optional secure erase action to take. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
TRUE if the format command finished successfully, FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_MANAGE
BDNVMESanitizeLog * -bd_nvme_get_sanitize_log (-const gchar *device, -GError **error);
Retrieves the drive sanitize status log (Log Identifier 81h) that includes information
-about the most recent sanitize operation and the sanitize operation time estimates.
As advised in the NVMe specification whitepaper the host should limit polling -to retrieve progress of a running sanitize operations (e.g. to at most once every -several minutes) to avoid interfering with the progress of the sanitize operation itself.
-device |
-a NVMe controller device (e.g. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
sanitize log data or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_INFO.
[transfer full]
-void
-bd_nvme_sanitize_log_free (BDNVMESanitizeLog *log);
-Frees log
-.
[skip]
- -BDNVMESanitizeLog *
-bd_nvme_sanitize_log_copy (BDNVMESanitizeLog *log);
-Creates a new copy of log
-.
[skip]
- -gboolean -bd_nvme_sanitize (-const gchar *device, -BDNVMESanitizeAction action, -gboolean no_dealloc, -gint overwrite_pass_count, -guint32 overwrite_pattern, -gboolean overwrite_invert_pattern, -GError **error);
Starts a sanitize operation or recovers from a previously failed sanitize operation. -By definition, a sanitize operation alters all user data in the NVM subsystem such -that recovery of any previous user data from any cache, the non-volatile media, -or any Controller Memory Buffer is not possible. The scope of a sanitize operation -is all locations in the NVM subsystem that are able to contain user data, including -caches, Persistent Memory Regions, and unallocated or deallocated areas of the media.
-Once started, a sanitize operation is not able to be aborted and continues after
-a Controller Level Reset including across power cycles. Once the sanitize operation
-has run the media affected may not be immediately ready for use unless additional
-media modification mechanism is run. This is often vendor specific and also depends
-on the sanitize method (action
-) used. Callers to this sanitize operation should
-set no_dealloc
- to TRUE for the added convenience.
The controller also ignores Critical Warning(s) in the SMART / Health Information -log page (e.g., read only mode) and attempts to complete the sanitize operation requested.
-This call returns immediately and the actual sanitize operation is performed
-in the background. Use bd_nvme_get_sanitize_log() to retrieve status and progress
-of a running sanitize operation. In case a sanitize operation fails the controller
-may restrict its operation until a subsequent sanitize operation is started
-(i.e. retried) or an BD_NVME_SANITIZE_ACTION_EXIT_FAILURE action is used
-to acknowledge the failure explicitly.
The overwrite_pass_count
-, overwrite_pattern
- and overwrite_invert_pattern
-
-arguments are only valid when action
- is BD_NVME_SANITIZE_ACTION_OVERWRITE.
The sanitize operation is set to run under the Allow Unrestricted Sanitize Exit -mode.
-device |
-NVMe namespace or controller device to format (e.g. |
-- |
action |
-the sanitize action to perform. |
-- |
no_dealloc |
-instruct the controller to not deallocate the affected media area. |
-- |
overwrite_pass_count |
-number of overwrite passes [1-15] or 0 for the default (16 passes). |
-- |
overwrite_pattern |
-a 32-bit pattern used for the Overwrite sanitize operation. |
-- |
overwrite_invert_pattern |
-invert the overwrite pattern between passes. |
-- |
error |
-place to store error (if any). |
-[out][nullable] | -
TRUE if the format command finished successfully, FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_NVME-BD_NVME_TECH_MODE_MANAGE
gchar *
-bd_nvme_get_host_nqn (GError **error);
-Reads the Host NQN (NVM Qualified Name) value from the global /etc/nvme/hostnqn
-file. An empty string is an indication that no Host NQN has been set.
the Host NQN string or an empty string if none set.
-Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR.
[transfer full]
-gchar *
-bd_nvme_get_host_id (GError **error);
-Reads the Host ID value from the global /etc/nvme/hostid file. An empty
-string is an indication that no Host ID has been set.
the Host ID string or an empty string if none set.
-Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR.
[transfer full]
-gchar *
-bd_nvme_generate_host_nqn (GError **error);
-Compute new Host NQN (NVM Qualified Name) value for the current system. This -takes in account various system identifiers (DMI, device tree) with the goal -of a stable unique identifier whenever feasible.
- -the Host NQN string or NULL with error
-set.
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR.
[transfer full]
-gboolean -bd_nvme_set_host_nqn (-const gchar *host_nqn, -GError **error);
Writes the Host NQN (NVM Qualified Name) value to the system /etc/nvme/hostnqn file.
-No validation of the string is performed.
host_nqn |
-The Host NVM Qualified Name. |
-- |
error |
-Place to store error (if any). |
-[out][nullable] | -
TRUE if the value was set successfully or FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR
gboolean -bd_nvme_set_host_id (-const gchar *host_id, -GError **error);
Writes the Host ID value to the system /etc/nvme/hostid file.
-No validation of the string is performed.
host_id |
-The Host ID. |
-- |
error |
-Place to store error (if any). |
-[out][nullable] | -
TRUE if the value was set successfully or FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR
gboolean -bd_nvme_connect (-const gchar *subsysnqn, -const gchar *transport, -const gchar *transport_addr, -const gchar *transport_svcid, -const gchar *host_traddr, -const gchar *host_iface, -const gchar *host_nqn, -const gchar *host_id, -const BDExtraArg **extra, -GError **error);
Creates a transport connection to a remote system (specified by transport_addr
- and transport_svcid
-)
-and creates a NVMe over Fabrics controller for the NVMe subsystem specified by the subsysnqn
- option.
Valid values for transport
- include:
"rdma": An rdma network (RoCE, iWARP, Infiniband, basic rdma, etc.)
"fc": A Fibre Channel network.
"tcp": A TCP/IP network.
"loop": A NVMe over Fabrics target on the local host.
In addition to the primary options it's possible to supply extra
- arguments:
"config": Use the specified JSON configuration file instead of the default file (see below) or
- specify "none" to avoid reading any configuration file.
"dhchap_key": NVMe In-band authentication secret in ASCII format as described
- in the NVMe 2.0 specification. When not specified, the secret is by default read
- from /etc/nvme/hostkey. In case that file does not exist no in-band authentication
- is attempted.
"dhchap_ctrl_key": NVMe In-band authentication controller secret for bi-directional authentication.
- When not specified, no bi-directional authentication is attempted.
"nr_io_queues": The number of I/O queues.
"nr_write_queues": Number of additional queues that will be used for write I/O.
"nr_poll_queues": Number of additional queues that will be used for polling latency sensitive I/O.
"queue_size": Number of elements in the I/O queues.
"keep_alive_tmo": The keep alive timeout (in seconds).
"reconnect_delay": The delay (in seconds) before reconnect is attempted after a connect loss.
"ctrl_loss_tmo": The controller loss timeout period (in seconds). A special value of -1 will cause reconnecting forever.
"fast_io_fail_tmo": Fast I/O Fail timeout (in seconds).
"tos": Type of service.
"duplicate_connect": Allow duplicated connections between same transport host and subsystem port. Boolean value.
"disable_sqflow": Disables SQ flow control to omit head doorbell update for submission queues when sending nvme completions. Boolean value.
"hdr_digest": Generates/verifies header digest (TCP). Boolean value.
"data_digest": Generates/verifies data digest (TCP). Boolean value.
"tls": Enable TLS encryption (TCP). Boolean value.
"hostsymname": TP8010: NVMe host symbolic name.
Boolean values can be expressed by "0"/"1", "on"/"off" or "True"/"False" case-insensitive -strings. Failed numerical or boolean string conversions will result in the option being ignored.
-By default additional options are read from the default configuration file /etc/nvme/config.json.
-This follows the default behaviour of nvme-cli. Use the extra
- "config" argument
-to either specify a different config file or disable use of it. The JSON configuration
-file format is documented in https://raw.githubusercontent.com/linux-nvme/libnvme/master/doc/config-schema.json.
-As a rule extra
- key names are kept consistent with the JSON config file schema.
-Any extra
- option generally overrides particular option specified in a configuration file.
subsysnqn |
-The name for the NVMe subsystem to connect to. |
-- |
transport |
-The network fabric used for a NVMe-over-Fabrics network. |
-- |
transport_addr |
-The network address of the Controller. For transports using IP addressing (e.g. |
-[nullable] | -
transport_svcid |
-The transport service id. For transports using IP addressing (e.g. |
-[nullable] | -
host_traddr |
-The network address used on the host to connect to the Controller. For TCP, this sets the source address on the socket. |
-[nullable] | -
host_iface |
-The network interface used on the host to connect to the Controller (e.g. IP |
-[nullable] | -
host_nqn |
-Overrides the default Host NQN that identifies the NVMe Host. If this option is |
-[nullable] | -
host_id |
-User-defined host UUID or |
-[nullable] | -
extra |
-Additional arguments. |
-[nullable][array zero-terminated=1] | -
error |
-Place to store error (if any). |
-[out][nullable] | -
TRUE if the subsystem was connected successfully, FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR
gboolean -bd_nvme_disconnect (-const gchar *subsysnqn, -GError **error);
Disconnects and removes one or more existing NVMe over Fabrics controllers.
-This may disconnect multiple controllers with matching subsysnqn
- and TRUE
-is only returned when all controllers were disconnected successfully.
subsysnqn |
-The name of the NVMe subsystem to disconnect. |
-- |
error |
-Place to store error (if any). |
-[out][nullable] | -
TRUE if all matching controllers were disconnected successfully, FALSE with error
-set in case of a disconnect error or when no matching controllers were found.
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR
gboolean -bd_nvme_disconnect_by_path (-const gchar *path, -GError **error);
Disconnects and removes a NVMe over Fabrics controller represented -by a block device path.
-path |
-NVMe controller device to disconnect (e.g. |
-- |
error |
-Place to store error (if any). |
-[out][nullable] | -
TRUE if the controller was disconnected successfully,
-FALSE otherwise with error
-set.
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR
BDNVMEDiscoveryLogEntry *
-bd_nvme_discovery_log_entry_copy (BDNVMEDiscoveryLogEntry *entry);
-Creates a new copy of entry
-.
[skip]
- -void
-bd_nvme_discovery_log_entry_free (BDNVMEDiscoveryLogEntry *entry);
-Frees entry
-.
[skip]
- -BDNVMEDiscoveryLogEntry ** -bd_nvme_discover (-const gchar *discovery_ctrl, -gboolean persistent, -const gchar *transport, -const gchar *transport_addr, -const gchar *transport_svcid, -const gchar *host_traddr, -const gchar *host_iface, -const gchar *host_nqn, -const gchar *host_id, -const BDExtraArg **extra, -GError **error);
Performs Discovery request on a Discovery Controller. If no connection to a Discovery Controller
-exists (i.e. discovery_ctrl
- is NULL) a new connection is established as specified by the transport
-,
-transport_addr
- and optionally transport_svcid
- arguments.
Note that the nvme-cli's /etc/nvme/discovery.conf config file is not used at the moment.
Valid values for transport
- include:
"rdma": An rdma network (RoCE, iWARP, Infiniband, basic rdma, etc.)
"fc": A Fibre Channel network.
"tcp": A TCP/IP network.
"loop": A NVMe over Fabrics target on the local host.
In addition to the primary options it's possible to supply extra
- arguments:
"config": Use the specified JSON configuration file instead of the default file (see below) or
- specify "none" to avoid reading any configuration file.
"dhchap_key": NVMe In-band authentication secret in ASCII format as described
- in the NVMe 2.0 specification. When not specified, the secret is by default read
- from /etc/nvme/hostkey. In case that file does not exist no in-band authentication
- is attempted.
"dhchap_ctrl_key": NVMe In-band authentication controller secret for bi-directional authentication.
- When not specified, no bi-directional authentication is attempted.
"nr_io_queues": The number of I/O queues.
"nr_write_queues": Number of additional queues that will be used for write I/O.
"nr_poll_queues": Number of additional queues that will be used for polling latency sensitive I/O.
"queue_size": Number of elements in the I/O queues.
"keep_alive_tmo": The keep alive timeout (in seconds).
"reconnect_delay": The delay (in seconds) before reconnect is attempted after a connect loss.
"ctrl_loss_tmo": The controller loss timeout period (in seconds). A special value of -1 will cause reconnecting forever.
"fast_io_fail_tmo": Fast I/O Fail timeout (in seconds).
"tos": Type of service.
"duplicate_connect": Allow duplicated connections between same transport host and subsystem port. Boolean value.
"disable_sqflow": Disables SQ flow control to omit head doorbell update for submission queues when sending nvme completions. Boolean value.
"hdr_digest": Generates/verifies header digest (TCP). Boolean value.
"data_digest": Generates/verifies data digest (TCP). Boolean value.
"tls": Enable TLS encryption (TCP). Boolean value.
"hostsymname": TP8010: NVMe host symbolic name.
Boolean values can be expressed by "0"/"1", "on"/"off" or "True"/"False" case-insensitive -strings. Failed numerical or boolean string conversions will result in the option being ignored.
-By default additional options are read from the default configuration file /etc/nvme/config.json.
-This follows the default behaviour of nvme-cli. Use the extra
- "config" argument
-to either specify a different config file or disable use of it. The JSON configuration
-file format is documented in https://raw.githubusercontent.com/linux-nvme/libnvme/master/doc/config-schema.json.
-As a rule extra
- key names are kept consistent with the JSON config file schema.
-Any extra
- option generally overrides particular option specified in a configuration file.
discovery_ctrl |
-Use existing discovery controller device or |
-[nullable] | -
persistent |
-Persistent discovery connection. |
-- |
transport |
-The network fabric used for a NVMe-over-Fabrics network. |
-- |
transport_addr |
-The network address of the Controller. For transports using IP addressing (e.g. |
-[nullable] | -
transport_svcid |
-The transport service id. For transports using IP addressing (e.g. |
-[nullable] | -
host_traddr |
-The network address used on the host to connect to the Controller. For TCP, this sets the source address on the socket. |
-[nullable] | -
host_iface |
-The network interface used on the host to connect to the Controller (e.g. IP |
-[nullable] | -
host_nqn |
-Overrides the default Host NQN that identifies the NVMe Host. If this option is |
-[nullable] | -
host_id |
-User-defined host UUID or |
-[nullable] | -
extra |
-Additional arguments. |
-[nullable][array zero-terminated=1] | -
error |
-Place to store error (if any). |
-[out][nullable] | -
null-terminated list
-of discovery log entries or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR.
[transfer full][array zero-terminated=1]
-gchar ** -bd_nvme_find_ctrls_for_ns (-const gchar *ns_sysfs_path, -const gchar *subsysnqn, -const gchar *host_nqn, -const gchar *host_id, -GError **error);
A convenient utility function to look up all controllers associated - with a NVMe subsystem the specified namespace is part of.
-ns_sysfs_path |
-NVMe namespace device file. |
-- |
subsysnqn |
-Limit matching to the specified subsystem NQN. |
-[nullable] | -
host_nqn |
-Limit matching to the specified host NQN. |
-[nullable] | -
host_id |
-Limit matching to the specified host ID. |
-[nullable] | -
error |
-Place to store error (if any). |
-[out][nullable] | -
list of controller sysfs paths
-or NULL in case of an error (with error
-set).
Tech category: BD_NVME_TECH_FABRICS-BD_NVME_TECH_MODE_INITIATOR.
[transfer full][array zero-terminated=1]
-| - |
- NVMe support not available. - |
-- |
| - |
- General error. - |
-- |
| - |
- The device is temporarily unavailable or in an inconsistent state. - |
-- |
| - |
- Invalid argument. - |
-- |
| - |
- The NVMe controller indicates that it would format all namespaces in the NVM subsystem. - |
-- |
| - |
- Generic NVMe Command Status Code. - |
-- |
| - |
- NVMe Command Specific error. - |
-- |
| - |
- Media and Data Integrity Errors: media specific errors that occur in the NVM or data integrity type errors. - |
-- |
| - |
- Path related error. - |
-- |
| - |
- NVMe Vendor specific error. - |
-- |
| - |
- No matching resource found (e.g. a Fabrics Controller). - |
-- |
| - |
- General connection error. - |
-- |
| - |
- Already connected. - |
-- |
| - |
- Invalid argument specified. - |
-- |
| - |
- HostNQN already in use. - |
-- |
| - |
- Invalid interface. - |
-- |
| - |
- Operation not supported. - |
-- |
| - |
- if set, then the NVM subsystem may contain more than one NVM subsystem port, otherwise it's single-port only. - |
-- |
| - |
- if set, then the NVM subsystem may contain two or more controllers, otherwise contains only single controller. - |
-- |
| - |
- if set, then the controller is associated with an SR-IOV Virtual Function, otherwise it's associated with a PCI Function or a Fabrics connection. - |
-- |
| - |
- indicates that the NVM subsystem supports Asymmetric Namespace Access (ANA) Reporting. - |
-- |
| - |
- indicates that the controller supports the Format NVM command. - |
-- |
| - |
- if set, then a format (excluding secure erase) of any namespace results in a format of all namespaces -in an NVM subsystem with all namespaces in an NVM subsystem configured with the same attributes. -If not set, then the controller supports format on a per namespace basis. - |
-- |
| - |
- indicates that the controller supports the Namespace Management and Attachment capability. - |
-- |
| - |
- indicates that the controller supports the Device Self-test command. - |
-- |
| - |
- indicates that the NVM subsystem supports only one device self-test operation in progress at a time. - |
-- |
| - |
- indicates that the controller supports the Crypto Erase sanitize operation. - |
-- |
| - |
- indicates that the controller supports the Block Erase sanitize operation. - |
-- |
| - |
- indicates that the controller supports the Overwrite sanitize operation. - |
-- |
| - |
- if set, then any secure erase performed as part of a format operation -results in a secure erase of all namespaces in the NVM subsystem. If not set, -then any secure erase performed as part of a format results in a secure erase -of the particular namespace specified. - |
-- |
| - |
- indicates that the cryptographic erase is supported. - |
-- |
| - |
- indicates that the NVM subsystem is part of an NVMe Storage Device. - |
-- |
| - |
- indicates that the NVM subsystem is part of an NVMe Enclosure. - |
-- |
| - |
- indicates that the NVM subsystem contains a Management Endpoint on a PCIe port. - |
-- |
| - |
- indicates that the NVM subsystem contains a Management Endpoint on an SMBus/I2C port. - |
-- |
typedef struct {
- guint16 pci_vendor_id;
- guint16 pci_subsys_vendor_id;
- guint16 ctrl_id;
- gchar *fguid;
- gchar *model_number;
- gchar *serial_number;
- gchar *firmware_ver;
- gchar *nvme_ver;
- guint64 features;
- BDNVMEControllerType controller_type;
- gint selftest_ext_time;
- guint64 hmb_pref_size;
- guint64 hmb_min_size;
- guint64 size_total;
- guint64 size_unalloc;
- guint num_namespaces;
- gchar *subsysnqn;
-} BDNVMEControllerInfo;
-
-guint16 |
-The PCI Vendor ID. |
-- |
guint16 |
-The PCI Subsystem Vendor ID. |
-- |
guint16 |
-Controller ID, the NVM subsystem unique controller identifier associated with the controller. |
-- |
gchar * |
-FRU GUID, a 128-bit value that is globally unique for a given Field Replaceable Unit. |
-- |
gchar * |
-The model number. |
-- |
gchar * |
-The serial number. |
-- |
gchar * |
-The currently active firmware revision. |
-- |
gchar * |
-The NVM Express base specification that the controller implementation supports. |
-- |
guint64 |
-features and capabilities present for this controller, see BDNVMEControllerFeature. |
-- |
BDNVMEControllerType |
-The controller type. |
-- |
gint |
-Extended Device Self-test Time, if BD_NVME_CTRL_FEAT_SELFTEST is supported then this field -indicates the nominal amount of time in one minute units that the controller takes -to complete an extended device self-test operation when in power state 0. |
-- |
guint64 |
-Host Memory Buffer Preferred Size indicates the preferred size that the host -is requested to allocate for the Host Memory Buffer feature in bytes. |
-- |
guint64 |
-Host Memory Buffer Minimum Size indicates the minimum size that the host -is requested to allocate for the Host Memory Buffer feature in bytes. |
-- |
guint64 |
-Total NVM Capacity in the NVM subsystem in bytes. |
-- |
guint64 |
-Unallocated NVM Capacity in the NVM subsystem in bytes. |
-- |
guint |
-Maximum Number of Allowed Namespaces supported by the NVM subsystem. |
-- |
gchar * |
-NVM Subsystem NVMe Qualified Name, UTF-8 null terminated string. |
-- |
typedef struct {
- guint16 data_size;
- BDNVMELBAFormatRelativePerformance relative_performance;
-} BDNVMELBAFormat;
-
-guint16 |
-LBA data size (i.e. a sector size) in bytes. |
-- |
BDNVMELBAFormatRelativePerformance |
-Relative Performance index, see BDNVMELBAFormatRelativePerformance. |
-- |
| - |
- indicates that the namespace supports thin provisioning. Specifically, the Namespace Capacity -reported may be less than the Namespace Size. - |
-- |
| - |
- indicates the capability to attach the namespace to two or more controllers -in the NVM subsystem concurrently. - |
-- |
| - |
- indicates the capability to report the percentage of the namespace -that remains to be formatted. - |
-- |
typedef struct {
- guint32 nsid;
- gchar *eui64;
- gchar *uuid;
- gchar *nguid;
- guint64 nsize;
- guint64 ncap;
- guint64 nuse;
- guint64 features;
- guint8 format_progress_remaining;
- gboolean write_protected;
- BDNVMELBAFormat **lba_formats;
- BDNVMELBAFormat current_lba_format;
-} BDNVMENamespaceInfo;
-
-guint32 |
-The Namespace Identifier (NSID). |
-- |
gchar * |
-IEEE Extended Unique Identifier: a 64-bit IEEE Extended Unique Identifier (EUI-64) -that is globally unique and assigned to the namespace when the namespace is created. -Remains fixed throughout the life of the namespace and is preserved across namespace -and controller operations. |
-- |
gchar * |
-Namespace 128-bit Universally Unique Identifier (UUID) as specified in RFC 4122. |
-- |
gchar * |
-Namespace Globally Unique Identifier: a 128-bit value that is globally unique and -assigned to the namespace when the namespace is created. Remains fixed throughout -the life of the namespace and is preserved across namespace and controller operations. |
-- |
guint64 |
-Namespace Size: total size of the namespace in logical blocks. The number of logical blocks
-is based on the formatted LBA size (see |
-- |
guint64 |
-Namespace Capacity: maximum number of logical blocks that may be allocated in the namespace
-at any point in time. The number of logical blocks is based on the formatted LBA size (see |
-- |
guint64 |
-Namespace Utilization: current number of logical blocks allocated in the namespace.
-This field is smaller than or equal to the Namespace Capacity. The number of logical
-blocks is based on the formatted LBA size (see |
-- |
guint64 |
-features and capabilities present for this namespace, see BDNVMENamespaceFeature. |
-- |
guint8 |
-The percentage value remaining of a format operation in progress. |
-- |
gboolean |
-
|
-- |
BDNVMELBAFormat ** |
-A list of supported LBA Formats. |
-[array zero-terminated=1][element-type BDNVMELBAFormat] | -
BDNVMELBAFormat |
-A LBA Format currently used for the namespace. Contains zeroes in case of -an invalid or no supported LBA Format reported. |
-- |
| - |
- the available spare capacity has fallen below the threshold. - |
-- |
| - |
- a temperature is either greater than or equal to an over temperature threshold; -or less than or equal to an under temperature threshold. - |
-- |
| - |
- the NVM subsystem reliability has been degraded due to significant media -related errors or any internal error that degrades NVM subsystem reliability. - |
-- |
| - |
- all of the media has been placed in read only mode. Unrelated to the write -protection state of a namespace. - |
-- |
| - |
- the volatile memory backup device has failed. Valid only if the controller -has a volatile memory backup solution. - |
-- |
| - |
- Persistent Memory Region has become read-only or unreliable. - |
-- |
typedef struct {
- guint critical_warning;
- guint8 avail_spare;
- guint8 spare_thresh;
- guint8 percent_used;
- guint64 total_data_read;
- guint64 total_data_written;
- guint64 ctrl_busy_time;
- guint64 power_cycles;
- guint64 power_on_hours;
- guint64 unsafe_shutdowns;
- guint64 media_errors;
- guint64 num_err_log_entries;
- guint16 temperature;
- guint16 temp_sensors[8];
- guint16 wctemp;
- guint16 cctemp;
- guint warning_temp_time;
- guint critical_temp_time;
-} BDNVMESmartLog;
-
-guint |
-critical warnings for the state of the controller, see BDNVMESmartCriticalWarning. |
-- |
guint8 |
-Available Spare: a normalized percentage (0% to 100%) of the remaining spare capacity available. |
-- |
guint8 |
-Available Spare Threshold: a normalized percentage (0% to 100%) of the available spare threshold. |
-- |
guint8 |
-Percentage Used: a vendor specific estimate of the percentage drive life used based on the -actual usage and the manufacturer's prediction. A value of 100 indicates that the estimated -endurance has been consumed, but may not indicate an NVM subsystem failure. -The value is allowed to exceed 100. |
-- |
guint64 |
-An estimated calculation of total data read in bytes based on calculation of data -units read from the host. A value of 0 indicates that the number of Data Units Read -is not reported. |
-- |
guint64 |
-An estimated calculation of total data written in bytes based on calculation -of data units written by the host. A value of 0 indicates that the number -of Data Units Written is not reported. |
-- |
guint64 |
-Amount of time the controller is busy with I/O commands, reported in minutes. |
-- |
guint64 |
-The number of power cycles. |
-- |
guint64 |
-The number of power-on hours, excluding a non-operational power state. |
-- |
guint64 |
-The number of unsafe shutdowns as a result of a Shutdown Notification not received prior to loss of power. |
-- |
guint64 |
-Media and Data Integrity Errors: the number of occurrences where the controller detected -an unrecovered data integrity error (e.g. uncorrectable ECC, CRC checksum failure, or LBA tag mismatch). |
-- |
guint64 |
-Number of Error Information Log Entries: the number of Error Information log -entries over the life of the controller. |
-- |
guint16 |
-Composite Temperature: temperature in Kelvins that represents the current composite -temperature of the controller and associated namespaces or 0 when not applicable. |
-- |
guint16 |
-Temperature Sensor 1-8: array of the current temperature reported by temperature sensors -1-8 in Kelvins or 0 when the particular sensor is not available. |
-- |
guint16 |
-Warning Composite Temperature Threshold (WCTEMP): indicates the minimum Composite Temperature ( |
-- |
guint16 |
-Critical Composite Temperature Threshold (CCTEMP): indicates the minimum Composite Temperature ( |
-- |
guint |
-Warning Composite Temperature Time: the amount of time in minutes that the Composite Temperature ( |
-- |
guint |
-Critical Composite Temperature Time: the amount of time in minutes that the Composite Temperature ( |
-- |
typedef struct {
- guint64 error_count;
- guint16 command_id;
- guint64 command_specific;
- guint16 command_status;
- GError *command_error;
- guint64 lba;
- guint32 nsid;
- BDNVMETransportType transport_type;
-} BDNVMEErrorLogEntry;
-
-guint64 |
-internal error counter, a unique identifier for the error. |
-- |
guint16 |
-the Command Identifier of the command that the error is associated with or |
-- |
guint64 |
-Command Specific Information specific to |
-- |
guint16 |
-the Status code for the command that completed. |
-- |
GError * |
-translated command error in the BD_NVME_ERROR domain or |
-- |
guint64 |
-the first LBA that experienced the error condition. |
-- |
guint32 |
-the NSID of the namespace that the error is associated with. |
-- |
BDNVMETransportType |
-type of the transport associated with the error. |
-- |
typedef struct {
- BDNVMESelfTestAction current_operation;
- guint8 current_operation_completion;
- BDNVMESelfTestLogEntry **entries;
-} BDNVMESelfTestLog;
-
-BDNVMESelfTestAction |
-Current running device self-test operation. There's no corresponding record in |
-- |
guint8 |
-Percentage of the currently running device self-test operation. Only valid when |
-- |
BDNVMESelfTestLogEntry ** |
-Self-test log entries for the last 20 operations, sorted from newest (first element) to oldest. |
-[array zero-terminated=1][element-type BDNVMESelfTestLogEntry] | -
typedef struct {
- BDNVMESelfTestResult result;
- BDNVMESelfTestAction action;
- guint8 segment;
- guint64 power_on_hours;
- guint32 nsid;
- guint64 failing_lba;
- GError *status_code_error;
-} BDNVMESelfTestLogEntry;
-
-BDNVMESelfTestResult |
-Result of the device self-test operation. |
-- |
BDNVMESelfTestAction |
-The Self-test Code value (action) that was specified in the Device Self-test command that started this device self-test operation. |
-- |
guint8 |
-Segment number where the first self-test failure occurred. Valid only when |
-- |
guint64 |
-Number of power-on hours at the time the device self-test operation was completed or aborted. Does not include time that the controller was powered and in a low power state condition. |
-- |
guint32 |
-Namespace ID that the Failing LBA occurred on. |
-- |
guint64 |
-LBA of the logical block that caused the test to fail. If the device encountered more than one failed logical block during the test, then this field only indicates one of those failed logical blocks. |
-- |
GError * |
-Translated NVMe Command Status Code representing additional information related to errors or conditions. |
-- |
| - |
- No device self-test operation in progress. Not a valid argument for |
-- |
| - |
- Start a short device self-test operation. - |
-- |
| - |
- Start an extended device self-test operation. - |
-- |
| - |
- Start a vendor specific device self-test operation. - |
-- |
| - |
- Abort the device self-test operation. Only valid for |
-- |
| - |
- Operation completed without error. - |
-- |
| - |
- Operation was aborted by a Device Self-test command. - |
-- |
| - |
- Operation was aborted by a Controller Level Reset. - |
-- |
| - |
- Operation was aborted due to a removal of a namespace from the namespace inventory. - |
-- |
| - |
- Operation was aborted due to the processing of a Format NVM command. - |
-- |
| - |
- A fatal error or unknown test error occurred while the controller was executing the device self-test operation and the operation did not complete. - |
-- |
| - |
- Operation completed with a segment that failed and the segment that failed is not known. - |
-- |
| - |
- Operation completed with one or more failed segments and the first segment that failed is indicated in the Segment Number field. - |
-- |
| - |
- Operation was aborted for unknown reason. - |
-- |
| - |
- Operation was aborted due to a sanitize operation. - |
-- |
| - |
- No secure erase operation requested. - |
-- |
| - |
- User Data Erase: All user data shall be erased, contents of the user data after the erase is indeterminate -(e.g., the user data may be zero filled, one filled, etc.). If a User Data Erase is requested and all affected -user data is encrypted, then the controller is allowed to use a cryptographic erase to perform the requested User Data Erase. - |
-- |
| - |
- Cryptographic Erase: All user data shall be erased cryptographically. This is accomplished by deleting the encryption key. - |
-- |
| - |
- The NVM subsystem has never been sanitized. - |
-- |
| - |
- A sanitize operation is currently in progress. - |
-- |
| - |
- The most recent sanitize operation completed successfully including any additional media modification. - |
-- |
| - |
- The most recent sanitize operation for which No-Deallocate After Sanitize was requested has completed successfully with deallocation of all user data. - |
-- |
| - |
- The most recent sanitize operation failed. - |
-- |
typedef struct {
- gdouble sanitize_progress;
- BDNVMESanitizeStatus sanitize_status;
- gboolean global_data_erased;
- guint8 overwrite_passes;
- gint64 time_for_overwrite;
- gint64 time_for_block_erase;
- gint64 time_for_crypto_erase;
- gint64 time_for_overwrite_nd;
- gint64 time_for_block_erase_nd;
- gint64 time_for_crypto_erase_nd;
-} BDNVMESanitizeLog;
-
-gdouble |
-The percentage complete of the sanitize operation. |
-- |
BDNVMESanitizeStatus |
-The status of the most recent sanitize operation. |
-- |
gboolean |
-Indicates that no user data has been written either since the drive was manufactured and -has never been sanitized or since the most recent successful sanitize operation. |
-- |
guint8 |
-Number of completed passes if the most recent sanitize operation was an Overwrite. |
-- |
gint64 |
-Estimated time in seconds needed to complete an Overwrite sanitize operation with 16 passes in the background. -A value of -1 means that no time estimate is reported. A value of 0 means that the operation is expected -to be completed in the background when the Sanitize command is completed. |
-- |
gint64 |
-Estimated time in seconds needed to complete a Block Erase sanitize operation in the background. -A value of -1 means that no time estimate is reported. A value of 0 means that the operation is expected -to be completed in the background when the Sanitize command is completed. |
-- |
gint64 |
-Estimated time in seconds needed to complete a Crypto Erase sanitize operation in the background. -A value of -1 means that no time estimate is reported. A value of 0 means that the operation is expected -to be completed in the background when the Sanitize command is completed. |
-- |
gint64 |
-Estimated time in seconds needed to complete an Overwrite sanitize operation and the associated -additional media modification in the background when the No-Deallocate After Sanitize or -the No-Deallocate Modifies Media After Sanitize features have been requested. |
-- |
gint64 |
-Estimated time in seconds needed to complete a Block Erase sanitize operation and the associated -additional media modification in the background when the No-Deallocate After Sanitize or -the No-Deallocate Modifies Media After Sanitize features have been requested. |
-- |
gint64 |
-Estimated time in seconds needed to complete a Crypto Erase sanitize operation and the associated -additional media modification in the background when the No-Deallocate After Sanitize or -the No-Deallocate Modifies Media After Sanitize features have been requested. |
-- |
| - |
- Exit Failure Mode. - |
-- |
| - |
- Start a Block Erase sanitize operation - a low-level block erase method that is specific to the media. - |
-- |
| - |
- Start an Overwrite sanitize operation - writing a fixed data pattern or related patterns in multiple passes. - |
-- |
| - |
- Start a Crypto Erase sanitize operation - changing the media encryption keys for all locations on the media. - |
-- |
typedef struct {
- BDNVMETransportType transport_type;
- BDNVMEAddressFamily address_family;
- gboolean sq_flow_control_disable;
- gboolean sq_flow_control_required;
- guint16 port_id;
- guint16 ctrl_id;
- gchar *transport_addr;
- gchar *transport_svcid;
- gchar *subsys_nqn;
- BDNVMETCPSecurity tcp_security;
-} BDNVMEDiscoveryLogEntry;
-
-BDNVMETransportType |
-The NVMe Transport type. |
-- |
BDNVMEAddressFamily |
-The address family. |
-- |
gboolean |
-Indicates that the controller is capable of disabling SQ flow control. |
-- |
gboolean |
-Indicates that the controller requires use of SQ flow control. |
-- |
guint16 |
-A NVM subsystem port. Different NVMe Transports or address families may utilize the same Port ID value (eg. a Port ID may support both iWARP and RoCE). |
-- |
guint16 |
-A Controller ID. Special value of |
-- |
gchar * |
-Transport Address. |
-- |
gchar * |
-Transport Service Identifier. |
-- |
gchar * |
-Subsystem Qualified Name. For a Discovery Service the value should be the well-known Discovery Service NQN ( |
-- |
BDNVMETCPSecurity |
-NVMe/TCP transport port security. |
-- |
| -Top - | -
| #define | -BD_PART_ERROR | -
| #define | -BD_PART_TYPE_SPEC | -
| enum | -BDPartAlign | -
| enum | -BDPartFlag | -
| - | BDPartSpec | -
| enum | -BDPartType | -
| enum | -BDPartTypeReq | -
| enum | -BDPartError | -
| enum | -BDPartTableType | -
| enum | -BDPartDiskFlag | -
| - | BDPartDiskSpec | -
| enum | -BDPartTech | -
| enum | -BDPartTechMode | -
A plugin for operations with partition tables. Currently supported table -(disk label) types are MBR and GPT. See the functions below to get an -overview of which operations are supported. If there's anything missing, -please don't hesitate to report it as this plugin (just like all the others) -is subject to future development and enhancements.
-This particular implementation of the part plugin uses libfdisk for -manipulations of both the MBR and GPT disk label types.
-gboolean
-bd_part_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_part_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean -bd_part_create_table (-const gchar *disk, -BDPartTableType type, -gboolean ignore_existing, -GError **error);
disk |
-path of the disk block device to create partition table on |
-- |
type |
-type of the partition table to create |
-- |
ignore_existing |
-whether to ignore/overwrite the existing table or not
-(reports an error if |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the partition table was successfully created or not
-Tech category: BD_PART_TECH_MODE_CREATE_TABLE + the tech according to type
-
BDPartSpec * -bd_part_create_part (-const gchar *disk, -BDPartTypeReq type, -guint64 start, -guint64 size, -BDPartAlign align, -GError **error);
disk |
-disk to create partition on |
-- |
type |
-type of the partition to create (if |
-- |
start |
-where the partition should start (i.e. offset from the disk start) |
-- |
size |
-desired size of the partition (if 0, a max-sized partition is created) |
-- |
align |
-alignment to use for the partition |
-- |
error |
-place to store error (if any). |
-[out] | -
specification of the created partition or NULL in case of error
NOTE: The resulting partition may start at a different position than given by
-start
-and can have different size than size
-due to alignment.
Tech category: BD_PART_TECH_MODE_MODIFY_TABLE + the tech according to the partition table type.
[transfer full]
-gboolean -bd_part_delete_part (-const gchar *disk, -const gchar *part, -GError **error);
disk |
-disk to remove the partition from |
-- |
part |
-partition to remove |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the part
-partition was successfully deleted from disk
-
Tech category: BD_PART_TECH_MODE_MODIFY_TABLE + the tech according to the partition table type
gboolean -bd_part_resize_part (-const gchar *disk, -const gchar *part, -guint64 size, -BDPartAlign align, -GError **error);
disk |
-disk containing the partition |
-- |
part |
-partition to resize |
-- |
size |
-new partition size, 0 for maximal size |
-- |
align |
-alignment to use for the partition end |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the part
-partition was successfully resized on disk
-to size
-
NOTE: The resulting partition may be slightly bigger than requested due to alignment.
-Tech category: BD_PART_TECH_MODE_MODIFY_TABLE + the tech according to the partition table type
BDPartSpec ** -bd_part_get_disk_parts (-const gchar *disk, -GError **error);
disk |
-disk to get information about partitions for |
-- |
error |
-place to store error (if any). |
-[out] | -
specs of the partitions from disk
-or NULL in case of error
Tech category: BD_PART_TECH_MODE_QUERY_TABLE + the tech according to the partition table type.
[transfer full][array zero-terminated=1]
-BDPartSpec * -bd_part_get_part_spec (-const gchar *disk, -const gchar *part, -GError **error);
disk |
-disk to remove the partition from |
-- |
part |
-partition to get spec for |
-- |
error |
-place to store error (if any). |
-[out] | -
spec of the part
-partition from disk
-or NULL in case of error
Tech category: BD_PART_TECH_MODE_QUERY_PART + the tech according to the partition table type.
[transfer full]
-gboolean -bd_part_set_part_flag (-const gchar *disk, -const gchar *part, -BDPartFlag flag, -gboolean state, -GError **error);
disk |
-disk the partition belongs to |
-- |
part |
-partition to set the flag on |
-- |
flag |
-flag to set |
-- |
state |
-state to set for the |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the flag flag
-was successfully set on the part
-partition
-or not.
Tech category: BD_PART_TECH_MODE_MODIFY_PART + the tech according to the partition table type
const gchar * -bd_part_get_flag_str (- - -BDPartFlag flag, -GError **error);
const gchar * -bd_part_get_part_table_type_str (- - -BDPartTableType type, -GError **error);
const gchar * -bd_part_get_type_str (- - -BDPartType type, -GError **error);
BDPartSpec * -bd_part_get_best_free_region (-const gchar *disk, -BDPartType type, -guint64 size, -GError **error);
disk |
-disk to get the best free region for |
-- |
type |
-type of the partition that is planned to be added |
-- |
size |
-size of the partition to be added |
-- |
error |
-place to store error (if any). |
-[out] | -
spec of the best free region on disk
-for a new partition of type type
-with the size of size
-or NULL if there is none such region or if
-there was an error (error
-gets populated)
Note: For the type
-BD_PART_TYPE_NORMAL, the smallest possible space that *is not* in an extended partition
-is found. For the type
-BD_PART_TYPE_LOGICAL, the smallest possible space that *is* in an extended
-partition is found. For BD_PART_TYPE_EXTENDED, the biggest possible space is found as long as there
-is no other extended partition (there can only be one).
Tech category: BD_PART_TECH_MODE_QUERY_TABLE + the tech according to the partition table type.
[transfer full]
-BDPartSpec ** -bd_part_get_disk_free_regions (-const gchar *disk, -GError **error);
disk |
-disk to get free regions for |
-- |
error |
-place to store error (if any). |
-[out] | -
specs of the free regions from disk
-or NULL in case of error
Tech category: BD_PART_TECH_MODE_QUERY_TABLE + the tech according to the partition table type.
[transfer full][array zero-terminated=1]
-BDPartDiskSpec * -bd_part_get_disk_spec (-const gchar *disk, -GError **error);
disk |
-disk to get information about |
-- |
error |
-place to store error (if any). |
-[out] | -
information about the given disk
-or NULL (in case of error)
Tech category: BD_PART_TECH_MODE_QUERY_TABLE + the tech according to the partition table type.
[transfer full]
-BDPartSpec * -bd_part_get_part_by_pos (-const gchar *disk, -guint64 position, -GError **error);
disk |
-disk to remove the partition from |
-- |
position |
-position (in bytes) determining the partition |
-- |
error |
-place to store error (if any). |
-[out] | -
spec of the partition from disk
-spanning over the position
-or NULL if no such
-partition exists or in case of error (error
-is set)
Tech category: BD_PART_TECH_MODE_QUERY_PART + the tech according to the partition table type.
[transfer full]
-gboolean -bd_part_set_disk_flag (-const gchar *disk, -BDPartDiskFlag flag, -gboolean state, -GError **error);
disk |
-disk the partition belongs to |
-- |
flag |
-flag to set |
-- |
state |
-state to set for the |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the flag flag
-was successfully set on the disk
-or not
Tech category: BD_PART_TECH_MODE_MODIFY_TABLE + the tech according to the partition table type
gboolean -bd_part_set_part_flags (-const gchar *disk, -const gchar *part, -guint64 flags, -GError **error);
disk |
-disk the partition belongs to |
-- |
part |
-partition to set the flag on |
-- |
flags |
-flags to set (mask combined from BDPartFlag numbers) |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the flags
-were successfully set on the part
-partition or
-not
Note: Unsets all the other flags on the partition. -Only GPT-specific flags and the legacy boot flag are supported on GPT -partition tables.
-Tech category: BD_PART_TECH_MODE_MODIFY_PART + the tech according to the partition table type
gboolean -bd_part_set_part_name (-const gchar *disk, -const gchar *part, -const gchar *name, -GError **error);
disk |
-device the partition belongs to |
-- |
part |
-partition the should be set for |
-- |
name |
-name to set |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the name was successfully set or not
-Tech category: BD_PART_TECH_GPT-BD_PART_TECH_MODE_MODIFY_PART
gboolean -bd_part_set_part_type (-const gchar *disk, -const gchar *part, -const gchar *type_guid, -GError **error);
disk |
-device the partition belongs to |
-- |
part |
-partition the should be set for |
-- |
type_guid |
-GUID of the type |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the type_guid
-type was successfully set for part
-or not
Tech category: BD_PART_TECH_GPT-BD_PART_TECH_MODE_MODIFY_PART
gboolean -bd_part_set_part_id (-const gchar *disk, -const gchar *part, -const gchar *part_id, -GError **error);
disk |
-device the partition belongs to |
-- |
part |
-partition the should be set for |
-- |
part_id |
-partition Id |
-- |
error |
-place to store error (if any). |
-[out] | -
whether the part_id
-type was successfully set for part
-or not
Tech category: BD_PART_TECH_MODE_MODIFY_PART + the tech according to the partition table type
gchar * -bd_part_get_part_id (-const gchar *disk, -const gchar *part, -GError **error);
Returns (transfer full): partition id type or NULL in case of error
Tech category: BD_PART_TECH_MODE_QUERY_PART + the tech according to the partition table type
gboolean -bd_part_is_tech_avail (-BDPartTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDPartTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out] | -
Partition flags supported by libblockdev. First part of the flags (up to
-BD_PART_FLAG_BASIC_LAST
-) corresponds to the flags supported by libparted
-(see https://www.gnu.org/software/parted/manual/parted.htmlset). Second
-part corresponds to the flags supported by sgdisk (GPT, see sgdisk -A=list).
The only exception from the above is BD_PART_FLAG_LEGACY_BOOT
- which is
-supported by libparted too but is GPT specific.
typedef struct {
- gchar *path;
- gchar *name;
- gchar *type_guid;
- guint64 type;
- guint64 start;
- guint64 size;
- guint64 flags;
-} BDPartSpec;
-
-gchar * |
-path of the partition (block device) |
-- |
gchar * |
-name of the partition (for GPT partitions) |
-- |
gchar * |
-GUID of the partition's type (GPT) |
-- |
guint64 |
-bit combination of partition's types (BDPartType) |
-- |
guint64 |
-start of the partition |
-- |
guint64 |
-size of the partition |
-- |
guint64 |
-bit combination of partition's flags (BDPartFlag) |
-- |
typedef struct {
- gchar *path;
- BDPartTableType table_type;
- guint64 size;
- guint64 sector_size;
- guint64 flags;
-} BDPartDiskSpec;
-
-gchar * |
-path of the disk (block device) |
-- |
BDPartTableType |
-type of the disk's partition table |
-- |
guint64 |
-size of the disk |
-- |
guint64 |
-disk's sector size |
-- |
guint64 |
-bit combination of the disk's flags (BDPartDiskFlag) |
-- |
| -Top - | -
| -BDPluginSpec * - | --bd_plugin_spec_copy () - | -
| -void - | --bd_plugin_spec_free () - | -
| -gboolean - | --bd_is_plugin_available () - | -
| -gchar ** - | --bd_get_available_plugin_names () - | -
| -gchar * - | --bd_get_plugin_soname () - | -
| -gchar * - | --bd_get_plugin_name () - | -
BDPluginSpec *
-bd_plugin_spec_copy (BDPluginSpec *spec);
-Creates a new copy of spec
-.
[skip]
- -gchar *
-bd_get_plugin_soname (BDPlugin plugin);
-
-name of the shared object loaded for the plugin or
-NULL if none is loaded.
[transfer full]
-| -Top - | -
| -gboolean - | --bd_swap_check_deps () - | -
| -gboolean - | --bd_swap_init () - | -
| -void - | --bd_swap_close () - | -
| -GQuark - | --bd_swap_error_quark () - | -
| -gboolean - | --bd_swap_mkswap () - | -
| -gboolean - | --bd_swap_swapon () - | -
| -gboolean - | --bd_swap_swapoff () - | -
| -gboolean - | --bd_swap_swapstatus () - | -
| -gboolean - | --bd_swap_set_label () - | -
| -gboolean - | --bd_swap_is_tech_avail () - | -
| #define | -BD_SWAP_ERROR | -
| enum | -BDSwapError | -
| enum | -BDSwapTech | -
| enum | -BDSwapTechMode | -
gboolean
-bd_swap_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_swap_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean -bd_swap_mkswap (-const gchar *device, -const gchar *label, -const BDExtraArg **extra, -GError **error);
device |
-a device to create swap space on |
-- |
label |
-a label for the swap space device. |
-[nullable] | -
extra |
-extra options for the creation (right now -passed to the 'mkswap' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether the swap space was successfully created or not
-Tech category: BD_SWAP_TECH_SWAP-BD_SWAP_TECH_MODE_CREATE
gboolean -bd_swap_swapon (-const gchar *device, -gint priority, -GError **error);
device |
-swap device to activate |
-- |
priority |
-priority of the activated device or -1 to use the default |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the swap device was successfully activated or not
-Tech category: BD_SWAP_TECH_SWAP-BD_SWAP_TECH_MODE_ACTIVATE_DEACTIVATE
gboolean -bd_swap_swapoff (-const gchar *device, -GError **error);
device |
-swap device to deactivate |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the swap device was successfully deactivated or not
-Tech category: BD_SWAP_TECH_SWAP-BD_SWAP_TECH_MODE_ACTIVATE_DEACTIVATE
gboolean -bd_swap_swapstatus (-const gchar *device, -GError **error);
device |
-swap device to get status of |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
TRUE if the swap device is active, FALSE if not active or failed
-to determine (error
-) is set not a non-NULL value in such case)
Tech category: BD_SWAP_TECH_SWAP-BD_SWAP_TECH_MODE_QUERY
gboolean -bd_swap_set_label (-const gchar *device, -const gchar *label, -GError **error);
device |
-a device to set label on |
-- |
label |
-label that will be set |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether the label was successfully set or not
-Tech category: BD_SWAP_TECH_SWAP-BD_SWAP_TECH_MODE_SET_LABEL
gboolean -bd_swap_is_tech_avail (-BDSwapTech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDSwapTechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -
| -Top - | -
-Utils-Utils — library providing utility functions used by the blockdev library and its plugins - |
-- |
| enum | -BDUtilsProgStatus | -
| #define | -BD_UTILS_EXEC_ERROR | -
| enum | -BDUtilsExecError | -
| enum | -BDUtilsDevUtilsError | -
| enum | -BDUtilsDBusError | -
| enum | -BDUtilsModuleError | -
| #define | -BD_UTILS_DEV_UTILS_ERROR | -
| #define | -BD_UTILS_DBUS_ERROR | -
| #define | -BD_UTILS_MODULE_ERROR | -
| - | BDUtilsLinuxVersion | -
| - | BDExtraArg | -
| #define | -EXBIBYTE | -
| #define | -EiB | -
| #define | -GIBIBYTE | -
| #define | -GiB | -
| #define | -KIBIBYTE | -
| #define | -KiB | -
| #define | -MEBIBYTE | -
| #define | -MiB | -
| #define | -PEBIBYTE | -
| #define | -PiB | -
| #define | -TEBIBYTE | -
| #define | -TiB | -
| #define | -EB | -
| #define | -EXABYTE | -
| #define | -GB | -
| #define | -GIGABYTE | -
| #define | -KB | -
| #define | -KILOBYTE | -
| #define | -MB | -
| #define | -MEGABYTE | -
| #define | -PB | -
| #define | -PETABYTE | -
| #define | -TB | -
| #define | -TERABYTE | -
| #define | -BD_UTILS_LOG_EMERG | -
| #define | -BD_UTILS_LOG_ALERT | -
| #define | -BD_UTILS_LOG_CRIT | -
| #define | -BD_UTILS_LOG_ERR | -
| #define | -BD_UTILS_LOG_WARNING | -
| #define | -BD_UTILS_LOG_NOTICE | -
| #define | -BD_UTILS_LOG_INFO | -
| #define | -BD_UTILS_LOG_DEBUG | -
gboolean -(*BDUtilsProgExtract) (-const gchar *line, -guint8 *completion);
Callback function used to process a line captured from spawned command's standard -output and standard error output. Typically used to extract completion percentage -of a long-running job.
-Note that both outputs are read simultaneously with no guarantees of message order -this function is called with.
-The value the completion
- points to may contain value previously returned from
-this callback or zero when called for the first time. This is useful for extractors
-where only some kind of a tick mark is printed out as a progress and previous value
-is needed to compute an incremented value. It's important to keep in mind that this
-function is only called over lines, i.e. progress reporting printing out tick marks
-(e.g. dots) without a newline character might not work properly.
The line
- string usually contains trailing newline character, which may be absent
-however in case the spawned command exits without printing one. It's guaranteed
-this function is called over remaining buffer no matter what the trailing
-character is.
void -(*BDUtilsProgFunc) (- -guint64 task_id, -BDUtilsProgStatus status, -guint8 completion, -gchar *msg);
void -(*BDUtilsLogFunc) (-gint level, -const gchar *msg);
Function type for logging function used by the libblockdev's exec utils to -log the information about program executing.
- -gboolean -bd_utils_exec_and_report_error (- - -const gchar **argv, -const BDExtraArg **extra, -GError **error);
gboolean -bd_utils_exec_and_report_status_error (- - -const gchar **argv, -const BDExtraArg **extra, -gint *status, -GError **error);
gboolean -bd_utils_exec_and_capture_output (-const gchar **argv, -const BDExtraArg **extra, -gchar **output, -GError **error);
Note that any NULL bytes read from standard output and standard error -output will be discarded.
- - -gboolean -bd_utils_exec_and_report_error_no_progress - (- - -const gchar **argv, -const BDExtraArg **extra, -GError **error);
gboolean -bd_utils_exec_and_report_progress (-const gchar **argv, -const BDExtraArg **extra, -BDUtilsProgExtract prog_extract, -gint *proc_status, -GError **error);
Note that any NULL bytes read from standard output and standard error
-output are treated as separators similar to newlines and prog_extract
-
-will be called with the respective chunk.
argv |
-the argv array for the call. |
-[array zero-terminated=1] | -
extra |
-extra arguments. |
-[nullable][array zero-terminated=1] | -
prog_extract |
-function for extracting progress information. |
-[scope notified][nullable] | -
proc_status |
-place to store the process exit status. |
-[out] | -
error |
-place to store error (if any). |
-[out][optional] | -
gboolean -bd_utils_exec_with_input (- - -const gchar **argv, -const gchar *input, -const BDExtraArg **extra, -GError **error);
gboolean -bd_utils_init_logging (-BDUtilsLogFunc new_log_func, -GError **error);
new_log_func |
-logging function to use or
- |
-[nullable][scope notified] | -
error |
-place to store error (if any). |
-[out][optional] | -
gboolean -bd_utils_init_prog_reporting (-BDUtilsProgFunc new_prog_func, -GError **error);
new_prog_func |
-progress reporting function to
-use or |
-[nullable][scope notified] | -
error |
-place to store error (if any). |
-[out][optional] | -
gboolean -bd_utils_init_prog_reporting_thread (-BDUtilsProgFunc new_prog_func, -GError **error);
new_prog_func |
-progress reporting function to
-use on current thread or |
-[nullable][scope notified] | -
error |
-place to store error (if any). |
-[out][optional] | -
gboolean
-bd_utils_mute_prog_reporting_thread (GError **error);
-
-
-void -bd_utils_report_finished (- -guint64 task_id, -const gchar *msg);
void -bd_utils_report_progress (- -guint64 task_id, -guint64 completion, -const gchar *msg);
void -bd_utils_log_task_status (- -guint64 task_id, -const gchar *msg);
void -bd_utils_log_stdout (-gint level, -const gchar *msg);
Convenient function for logging to stdout. Can be used as BDUtilsLogFunc.
- -gboolean -bd_utils_echo_str_to_file (- - -const gchar *str, -const gchar *file_path, -GError **error);
void
-bd_utils_set_log_level (gint level);
-Level of messages to log. Only messages with level <= level
- will be logged.
-For example using with BD_UTILS_LOG_WARNING (default value) only messages
-with log levels BD_UTILS_LOG_WARNING, BD_UTILS_LOG_ERR, ..., BD_UTILS_LOG_EMERG
-will be logged.
Note: BD_UTILS_LOG_DEBUG level messages are always skipped unless compiled
- with --enable-debug configure option.
gboolean -bd_utils_check_util_version (-const gchar *util, -const gchar *version, -const gchar *version_arg, -const gchar *version_regexp, -GError **error);
util |
-name of the utility to check |
-- |
version |
-minimum required version of the utility or |
-[nullable] | -
version_arg |
-argument to use with the |
-[nullable] | -
version_regexp |
-regexp to extract version from the version
-info or |
-[nullable] | -
error |
-place to store error (if any). |
-[out][optional] | -
gint -bd_utils_version_cmp (- - -const gchar *ver_string1, -const gchar *ver_string2, -GError **error);
BDExtraArg * -bd_extra_arg_new (-const gchar *opt, -const gchar *val);
Example of calling bd_fs_xfs_mkfs() with an extra argument.
-This will result in calling mkfs.xfs with -L label.
1 -2 -3 -4 |
- BDExtraArg label_arg = {"-L", "label"}; -const BDExtraArg *extra_args[2] = {&label_arg, NULL}; - -ret = bd_fs_xfs_mkfs ("/dev/sda", extra_args, error); |
-
[constructor]
- - -BDExtraArg *
-bd_extra_arg_copy (BDExtraArg *arg);
-Creates a new copy of arg
-.
gchar * -bd_utils_resolve_device (-const gchar *dev_spec, -GError **error);
dev_spec |
-specification of the device (e.g. "/dev/sda", any symlink, or the name of a file -under "/dev") |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
the full real path of the device (e.g. "/dev/md126"
-for "/dev/md/my_raid") or NULL in case of error.
[transfer full]
-gchar ** -bd_utils_get_device_symlinks (-const gchar *dev_spec, -GError **error);
dev_spec |
-specification of the device (e.g. "/dev/sda", any symlink, or the name of a file -under "/dev") |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
a list of all symlinks (known to udev) for the
-device specified with dev_spec
-or NULL in
-case of error.
[transfer full][array zero-terminated=1]
-gboolean -bd_utils_have_kernel_module (- - -const gchar *module_name, -GError **error);
gboolean -bd_utils_load_kernel_module (- - -const gchar *module_name, -const gchar *options, -GError **error);
gboolean -bd_utils_unload_kernel_module (- - -const gchar *module_name, -GError **error);
BDUtilsLinuxVersion *
-bd_utils_get_linux_version (GError **error);
-Retrieves version of currently running Linux kernel. Acts also as an initializer for statically cached data.
- -Detected Linux kernel version or NULL in case of an error. The returned value belongs to the library, do not free.
[transfer none]
-gint -bd_utils_check_linux_version (-guint major, -guint minor, -guint micro);
Checks whether the currently running linux kernel version is equal or higher
-than the specified required major
-.minor
-.micro
- version.
gboolean -bd_utils_dbus_service_available (-GDBusConnection *connection, -GBusType bus_type, -const gchar *bus_name, -const gchar *obj_prefix, -GError **error);
connection |
-existing GDBusConnection or |
-[nullable] | -
bus_type |
-bus type (system or session), ignored if |
-- |
bus_name |
-name of the service to check (e.g. "com.redhat.lvmdbus1") |
-- |
obj_prefix |
-object path prefix for the service (e.g. "/com/redhat/lvmdbus1") |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
typedef struct {
- guint major;
- guint minor;
- guint micro;
-} BDUtilsLinuxVersion;
-
-typedef struct {
- gchar *opt;
- gchar *val;
-} BDExtraArg;
-
-See bd_extra_arg_new() for an example on how to construct the extra args.
| -Top - | -
-blockdev library-blockdev library — a library for doing low-level operations with block devices - |
-- |
| -gboolean - | --bd_init () - | -
| -gboolean - | --bd_ensure_init () - | -
| -gboolean - | --bd_try_init () - | -
| -gboolean - | --bd_reinit () - | -
| -gboolean - | --bd_try_reinit () - | -
| -gboolean - | --bd_is_initialized () - | -
| -gboolean - | --bd_switch_init_checks () - | -
| -GQuark - | --bd_init_error_quark () - | -
gboolean -bd_init (-BDPluginSpec **require_plugins, -BDUtilsLogFunc log_func, -GError **error);
require_plugins |
-
|
-[nullable][array zero-terminated=1] | -
log_func |
-logging function to use. |
-[nullable][scope notified] | -
error |
-place to store error (if any). |
-[out] | -
whether the library was successfully initialized with all the
-required or default (see require_plugins
-) plugins or not
Example of libblockdev initialization with 'fs' and 'lvm' plugins. Specific -version of the lvm plugin is required:
-1 -2 -3 -4 -5 -6 |
- GError *error = NULL; -gboolean ret = FALSE; -BDPluginSpec fs_plugin = {BD_PLUGIN_FS, NULL}; -BDPluginSpec lvm_plugin = {BD_PLUGIN_LVM, "libbd_lvm.so.2"}; -BDPluginSpec *plugins[] = {&fs_plugin, &lvm_plugin, NULL}; -ret = bd_init (plugins, NULL, &error); |
-
gboolean -bd_ensure_init (-BDPluginSpec **require_plugins, -BDUtilsLogFunc log_func, -GError **error);
Checks the state of the library and if it is uninitialized or not all the
-require_plugins
- plugins are available, tries to (re)initialize it. Otherwise
-just returns early. The difference between:
1 -2 |
- if (!bd_is_initialized()) - bd_init(None, None, &error); |
-
and this function is that this function does the check and init in an atomic -way (holding the lock preventing other threads from doing changes in -between).
-require_plugins |
-
|
-[nullable][array zero-terminated=1] | -
log_func |
-logging function to use. |
-[nullable][scope notified] | -
error |
-place to store error (if any). |
-[out] | -
gboolean -bd_try_init (-BDPluginSpec **request_plugins, -BDUtilsLogFunc log_func, -gchar ***loaded_plugin_names, -GError **error);
request_plugins |
-
|
-[nullable][array zero-terminated=1] | -
log_func |
-logging function to use. |
-[nullable][scope notified] | -
loaded_plugin_names |
-names -of the successfully loaded plugins. |
-[optional][out][transfer container][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out] | -
whether the library was successfully initialized with all the
-required or default (see require_plugins
-) plugins or not
*UNLIKE IN CASE OF bd_init() AND bd_ensure_init(), FAILURE TO LOAD A PLUGIN
-IS NOT CONSIDERED ERROR*
gboolean -bd_reinit (-BDPluginSpec **require_plugins, -gboolean reload, -BDUtilsLogFunc log_func, -GError **error);
require_plugins |
-
|
-[nullable][array zero-terminated=1] | -
reload |
-whether to reload the already loaded plugins or not |
-- |
log_func |
-logging function to use or |
-[nullable][scope notified] | -
error |
-place to store error (if any). |
-[out] | -
whether the library was successfully initialized or not
-If reload
-is TRUE all the plugins are closed and reloaded otherwise only
-the missing plugins are loaded.
gboolean -bd_try_reinit (-BDPluginSpec **require_plugins, -gboolean reload, -BDUtilsLogFunc log_func, -gchar ***loaded_plugin_names, -GError **error);
require_plugins |
-
|
-[nullable][array zero-terminated=1] | -
reload |
-whether to reload the already loaded plugins or not |
-- |
log_func |
-logging function to use or |
-[nullable][scope notified] | -
loaded_plugin_names |
-names of the successfully -loaded plugins. |
-[optional][out][transfer container][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out] | -
whether the library was successfully initialized or not
-If reload
-is TRUE all the plugins are closed and reloaded otherwise only
-the missing plugins are loaded.
*UNLIKE IN CASE OF bd_init() AND bd_ensure_init(), FAILURE TO LOAD A PLUGIN
-IS NOT CONSIDERED ERROR*
gboolean -bd_switch_init_checks (-gboolean enable, -GError **error);
Enables or disables plugins' init checks based on enable
-.
Note: The current implementation (un)sets the LIBBLOCKDEV_SKIP_DEP_CHECKS - environment variable.
- -| -Top - | -
| -gboolean - | --bd_s390_check_deps () - | -
| -gboolean - | --bd_s390_init () - | -
| -void - | --bd_s390_close () - | -
| -GQuark - | --bd_s390_error_quark () - | -
| -gboolean - | --bd_s390_dasd_format () - | -
| -gboolean - | --bd_s390_dasd_needs_format () - | -
| -gchar * - | --bd_s390_sanitize_dev_input () - | -
| -gboolean - | --bd_s390_dasd_online () - | -
| -gboolean - | --bd_s390_dasd_is_ldl () - | -
| -gboolean - | --bd_s390_dasd_is_fba () - | -
| -gchar * - | --bd_s390_zfcp_sanitize_wwpn_input () - | -
| -gchar * - | --bd_s390_zfcp_sanitize_lun_input () - | -
| -gboolean - | --bd_s390_zfcp_online () - | -
| -gboolean - | --bd_s390_zfcp_scsi_offline () - | -
| -gboolean - | --bd_s390_zfcp_offline () - | -
| -gboolean - | --bd_s390_is_tech_avail () - | -
| enum | -BDS390Error | -
| #define | -BD_S390_ERROR | -
| enum | -BDS390Tech | -
| enum | -BDS390TechMode | -
gboolean
-bd_s390_init (void);
-Initializes the plugin. **This function is called automatically by the -library's initialization functions.**
-void
-bd_s390_close (void);
-Cleans up after the plugin. **This function is called automatically by the -library's functions that unload it.**
-gboolean -bd_s390_dasd_format (-const gchar *dasd, -const BDExtraArg **extra, -GError **error);
dasd |
-dasd to format |
-- |
extra |
-extra options for the formatting (right now -passed to the 'dasdfmt' utility). |
-[nullable][array zero-terminated=1] | -
error |
-place to store error (if any). |
-[out][optional] | -
whether dasdfmt was successful or not
-Tech category: BD_S390_TECH_DASD-BD_S390_TECH_MODE_MODIFY
gboolean -bd_s390_dasd_needs_format (-const gchar *dasd, -GError **error);
dasd |
-dasd to check, whether it needs dasdfmt run on it |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether a dasd needs dasdfmt run against it
-Tech category: BD_S390_TECH_DASD-BD_S390_TECH_MODE_QUERY
gchar * -bd_s390_sanitize_dev_input (- - -const gchar *dev, -GError **error);
gboolean -bd_s390_dasd_online (-const gchar *dasd, -GError **error);
dasd |
-dasd to switch online |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether a dasd was successfully switched online
-Tech category: BD_S390_TECH_DASD-BD_S390_TECH_MODE_MODIFY
gboolean -bd_s390_dasd_is_ldl (-const gchar *dasd, -GError **error);
dasd |
-dasd to check, whether it is LDL formatted |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether a dasd is LDL formatted
-Tech category: BD_S390_TECH_DASD-BD_S390_TECH_MODE_QUERY
gboolean -bd_s390_dasd_is_fba (- - -const gchar *dasd, -GError **error);
gchar * -bd_s390_zfcp_sanitize_wwpn_input (- - -const gchar *wwpn, -GError **error);
gchar * -bd_s390_zfcp_sanitize_lun_input (- - -const gchar *lun, -GError **error);
gboolean -bd_s390_zfcp_online (-const gchar *devno, -const gchar *wwpn, -const gchar *lun, -GError **error);
devno |
-a zFCP device number |
-- |
wwpn |
-a zFCP WWPN identifier |
-- |
lun |
-a zFCP LUN identifier |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether a zFCP device was successfully switched online
-Tech category: BD_S390_TECH_ZFCP-BD_S390_TECH_MODE_MODIFY
gboolean -bd_s390_zfcp_scsi_offline (-const gchar *devno, -const gchar *wwpn, -const gchar *lun, -GError **error);
devno |
-a zFCP device number |
-- |
wwpn |
-a zFCP WWPN identifier |
-- |
lun |
-a zFCP LUN identifier |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether a LUN was successfully removed from associated WWPN
-This function looks through /proc/scsi/scsi and manually removes LUNs from -associated WWPNs. zFCP devices are SCSI devices accessible over FCP protocol. -In z/OS the IODF (I/O definition file) contains basic information about the -I/O config, but WWPN and LUN configuration is done at the OS level, hence -this function becomes necessary when switching the device offline. This -particular sequence of actions is for some reason unnecessary when switching -the device online. Chalk it up to s390x being s390x.
-Tech category: BD_S390_TECH_ZFCP-BD_S390_TECH_MODE_MODIFY
gboolean -bd_s390_zfcp_offline (-const gchar *devno, -const gchar *wwpn, -const gchar *lun, -GError **error);
devno |
-zfcp device number |
-- |
wwpn |
-zfcp WWPN (World Wide Port Number) |
-- |
lun |
-zfcp LUN (Logical Unit Number) |
-- |
error |
-place to store error (if any). |
-[out][optional] | -
whether a zfcp device was successfully switched offline
-Tech category: BD_S390_TECH_ZFCP-BD_S390_TECH_MODE_MODIFY
gboolean -bd_s390_is_tech_avail (-BDS390Tech tech, -guint64 mode, -GError **error);
tech |
-the queried tech |
-- |
mode |
-a bit mask of queried modes of operation (BDS390TechMode) for |
-- |
error |
-place to store error (details about why the |
-[out][optional] | -