aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.h
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-11-06 09:08:53 -0500
committerChris Mason <chris.mason@fusionio.com>2012-12-16 20:46:06 -0500
commit3f6bcfbd4149875662773eb40a62294cddf215d4 (patch)
tree0a53729e4e0a2427370a7ab10e12c36b21b827fd /fs/btrfs/ioctl.h
parentad6d620e2a5704f6bf3a39c92a75aad962c51cb3 (diff)
Btrfs: add support for device replace ioctls
This is the commit that allows to start the device replace procedure. An ioctl() interface is added that supports starting and canceling the device replace procedure, and to retrieve the status and progress. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r--fs/btrfs/ioctl.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 62006ba02719..dabca9cc8c2e 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -30,6 +30,8 @@ struct btrfs_ioctl_vol_args {
30 char name[BTRFS_PATH_NAME_MAX + 1]; 30 char name[BTRFS_PATH_NAME_MAX + 1];
31}; 31};
32 32
33#define BTRFS_DEVICE_PATH_NAME_MAX 1024
34
33#define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) 35#define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
34#define BTRFS_SUBVOL_RDONLY (1ULL << 1) 36#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
35#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) 37#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2)
@@ -127,10 +129,10 @@ struct btrfs_ioctl_scrub_args {
127#define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID 1 129#define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID 1
128struct btrfs_ioctl_dev_replace_start_params { 130struct btrfs_ioctl_dev_replace_start_params {
129 __u64 srcdevid; /* in, if 0, use srcdev_name instead */ 131 __u64 srcdevid; /* in, if 0, use srcdev_name instead */
130 __u8 srcdev_name[BTRFS_PATH_NAME_MAX + 1]; /* in */
131 __u8 tgtdev_name[BTRFS_PATH_NAME_MAX + 1]; /* in */
132 __u64 cont_reading_from_srcdev_mode; /* in, see #define 132 __u64 cont_reading_from_srcdev_mode; /* in, see #define
133 * above */ 133 * above */
134 __u8 srcdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1]; /* in */
135 __u8 tgtdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1]; /* in */
134}; 136};
135 137
136#define BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED 0 138#define BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED 0
@@ -165,7 +167,6 @@ struct btrfs_ioctl_dev_replace_args {
165 __u64 spare[64]; 167 __u64 spare[64];
166}; 168};
167 169
168#define BTRFS_DEVICE_PATH_NAME_MAX 1024
169struct btrfs_ioctl_dev_info_args { 170struct btrfs_ioctl_dev_info_args {
170 __u64 devid; /* in/out */ 171 __u64 devid; /* in/out */
171 __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ 172 __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */