Top | ![]() |
![]() |
![]() |
![]() |
gboolean | bd_btrfs_check_deps () |
gboolean | bd_btrfs_init () |
void | bd_btrfs_close () |
GQuark | bd_btrfs_error_quark () |
void | bd_btrfs_device_info_free () |
BDBtrfsDeviceInfo * | bd_btrfs_device_info_copy () |
void | bd_btrfs_subvolume_info_free () |
BDBtrfsSubvolumeInfo * | bd_btrfs_subvolume_info_copy () |
void | bd_btrfs_filesystem_info_free () |
BDBtrfsFilesystemInfo * | bd_btrfs_filesystem_info_copy () |
gboolean | bd_btrfs_create_volume () |
gboolean | bd_btrfs_add_device () |
gboolean | bd_btrfs_remove_device () |
gboolean | bd_btrfs_create_subvolume () |
gboolean | bd_btrfs_delete_subvolume () |
guint64 | bd_btrfs_get_default_subvolume_id () |
gboolean | bd_btrfs_set_default_subvolume () |
gboolean | bd_btrfs_create_snapshot () |
BDBtrfsDeviceInfo ** | bd_btrfs_list_devices () |
BDBtrfsSubvolumeInfo ** | bd_btrfs_list_subvolumes () |
BDBtrfsFilesystemInfo * | bd_btrfs_filesystem_info () |
gboolean | bd_btrfs_mkfs () |
gboolean | bd_btrfs_resize () |
gboolean | bd_btrfs_check () |
gboolean | bd_btrfs_repair () |
gboolean | bd_btrfs_change_label () |
#define | BD_BTRFS_MAIN_VOLUME_ID |
#define | BD_BTRFS_MIN_MEMBER_SIZE |
#define | BD_BTRFS_ERROR |
enum | BDBtrfsError |
BDBtrfsDeviceInfo | |
BDBtrfsSubvolumeInfo | |
BDBtrfsFilesystemInfo |
gboolean
bd_btrfs_init ();
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
void
bd_btrfs_close ();
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. |
[allow-none] |
data_level |
RAID level for the data or |
[allow-none] |
md_level |
RAID level for the metadata or |
[allow-none] |
extra |
extra options for the volume creation (right now passed to the 'mkfs.btrfs' utility). |
[allow-none][array zero-terminated=1] |
error |
place to store error (if any). |
[out] |
gboolean bd_btrfs_add_device (const gchar *mountpoint
,const gchar *device
,const BDExtraArg **extra
,GError **error
);
gboolean bd_btrfs_remove_device (const gchar *mountpoint
,const gchar *device
,const BDExtraArg **extra
,GError **error
);
gboolean bd_btrfs_create_subvolume (const gchar *mountpoint
,const gchar *name
,const BDExtraArg **extra
,GError **error
);
gboolean bd_btrfs_delete_subvolume (const gchar *mountpoint
,const gchar *name
,const BDExtraArg **extra
,GError **error
);
guint64 bd_btrfs_get_default_subvolume_id (const gchar *mountpoint
,GError **error
);
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). |
[allow-none][array zero-terminated=1] |
error |
place to store error (if any). |
[out] |
gboolean bd_btrfs_create_snapshot (const gchar *source
,const gchar *dest
,gboolean ro
,const BDExtraArg **extra
,GError **error
);
BDBtrfsDeviceInfo ** bd_btrfs_list_devices (const gchar *device
,GError **error
);
BDBtrfsSubvolumeInfo ** bd_btrfs_list_subvolumes (const gchar *mountpoint
,gboolean snapshots_only
,GError **error
);
BDBtrfsFilesystemInfo * bd_btrfs_filesystem_info (const gchar *device
,GError **error
);
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. |
[allow-none] |
data_level |
RAID level for the data or |
[allow-none] |
md_level |
RAID level for the metadata or |
[allow-none] |
extra |
extra options for the volume creation (right now passed to the 'btrfs' utility). |
[allow-none][array zero-terminated=1] |
error |
place to store error (if any). |
[out] |
gboolean bd_btrfs_resize (const gchar *mountpoint
,guint64 size
,const BDExtraArg **extra
,GError **error
);
gboolean bd_btrfs_check (const gchar *device
,const BDExtraArg **extra
,GError **error
);
gboolean bd_btrfs_repair (const gchar *device
,const BDExtraArg **extra
,GError **error
);
gboolean bd_btrfs_change_label (const gchar *mountpoint
,const gchar *label
,GError **error
);
typedef struct { guint64 id; gchar *path; guint64 size; guint64 used; } BDBtrfsDeviceInfo;
typedef struct { guint64 id; guint64 parent_id; gchar *path; } BDBtrfsSubvolumeInfo;