| 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;