@@ -160,7 +160,7 @@ static int _cmd_device_remove(int argc, char **argv,
struct btrfs_ioctl_vol_args arg;
int res;
- struct btrfs_ioctl_vol_args_v2 argv2 = {0};
+ struct btrfs_ioctl_vol_args_v3 argv2 = {0};
int is_devid = 0;
if (string_is_numerical(argv[i])) {
@@ -92,6 +92,23 @@ struct btrfs_ioctl_vol_args_v2 {
};
};
+struct btrfs_ioctl_vol_args_v3 {
+ __s64 fd;
+ __u64 transid;
+ __u64 flags;
+ union {
+ struct {
+ __u64 size;
+ struct btrfs_qgroup_inherit __user *qgroup_inherit;
+ };
+ __u64 unused[4];
+ };
+ union {
+ char name[BTRFS_PATH_NAME_MAX + 1];
+ u64 devid;
+ };
+};
+
/*
* structure to report errors and progress to userspace, either as a
* result of a finished scrub, a canceled scrub or a progress inquiry
@@ -689,7 +706,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
struct btrfs_ioctl_feature_flags[3])
#define BTRFS_IOC_RM_DEV_V2 _IOW(BTRFS_IOCTL_MAGIC, 58, \
- struct btrfs_ioctl_vol_args_v2)
+ struct btrfs_ioctl_vol_args_v3)
#ifdef __cplusplus
}
#endif
Add device ioctl uses BTRFS_PATH_NAME_MAX however delete uses BTRFS_SUBVOL_NAME_MAX to hold device path. This patch makes them consistent. Depends on btrfs: make add and device ioctl args path max consistent Signed-off-by: Anand Jain <anand.jain@oracle.com> --- cmds-device.c | 2 +- ioctl.h | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-)