I lifted the btrfs label get/set ioctls to the vfs some time ago, but never followed up to use those common definitions directly in btrfs. This patch does that.
Unified · Split
| @@ -5453,6 +5453,10 @@ long btrfs_ioctl(struct file *file, unsigned int · 5452 unmodified lines | |||
| 5453 | return btrfs_ioctl_setflags(file, argp); | 5453 | return btrfs_ioctl_setflags(file, argp); |
| 5454 | case FS_IOC_GETVERSION: | 5454 | case FS_IOC_GETVERSION: |
| 5455 | return btrfs_ioctl_getversion(file, argp); | 5455 | return btrfs_ioctl_getversion(file, argp); |
| 5456 | case FS_IOC_GETFSLABEL: | ||
| 5457 | return btrfs_ioctl_get_fslabel(file, argp); | ||
| 5458 | case FS_IOC_SETFSLABEL: | ||
| 5459 | return btrfs_ioctl_set_fslabel(file, argp); | ||
| 5456 | case FITRIM: | 5460 | case FITRIM: |
| 5457 | return btrfs_ioctl_fitrim(file, argp); | 5461 | return btrfs_ioctl_fitrim(file, argp); |
| 5458 | case BTRFS_IOC_SNAP_CREATE: | 5462 | case BTRFS_IOC_SNAP_CREATE: |
| @@ -5564,10 +5568,6 @@ long btrfs_ioctl(struct file *file, unsigned int · 105 unmodified lines | |||
| 5564 | return btrfs_ioctl_quota_rescan_wait(file, argp); | 5568 | return btrfs_ioctl_quota_rescan_wait(file, argp); |
| 5565 | case BTRFS_IOC_DEV_REPLACE: | 5569 | case BTRFS_IOC_DEV_REPLACE: |
| 5566 | return btrfs_ioctl_dev_replace(fs_info, argp); | 5570 | return btrfs_ioctl_dev_replace(fs_info, argp); |
| 5567 | case BTRFS_IOC_GET_FSLABEL: | ||
| 5568 | return btrfs_ioctl_get_fslabel(file, argp); | ||
| 5569 | case BTRFS_IOC_SET_FSLABEL: | ||
| 5570 | return btrfs_ioctl_set_fslabel(file, argp); | ||
| 5571 | case BTRFS_IOC_GET_SUPPORTED_FEATURES: | 5571 | case BTRFS_IOC_GET_SUPPORTED_FEATURES: |
| 5572 | return btrfs_ioctl_get_supported_features(argp); | 5572 | return btrfs_ioctl_get_supported_features(argp); |
| 5573 | case BTRFS_IOC_GET_FEATURES: | 5573 | case BTRFS_IOC_GET_FEATURES: |
| @@ -917,10 +917,8 @@ enum btrfs_err_code { · 916 unmodified lines | |||
| 917 | #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ | 917 | #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ |
| 918 | struct btrfs_ioctl_quota_rescan_args) | 918 | struct btrfs_ioctl_quota_rescan_args) |
| 919 | #define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) | 919 | #define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) |
| 920 | #define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \ | 920 | #define BTRFS_IOC_GET_FSLABEL FS_IOC_GETFSLABEL |
| 921 | char[BTRFS_LABEL_SIZE]) | 921 | #define BTRFS_IOC_SET_FSLABEL FS_IOC_SETFSLABEL |
| 922 | #define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \ | ||
| 923 | char[BTRFS_LABEL_SIZE]) | ||
| 924 | #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \ | 922 | #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \ |
| 925 | struct btrfs_ioctl_get_dev_stats) | 923 | struct btrfs_ioctl_get_dev_stats) |
| 926 | #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ | 924 | #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ |