@@ -227,6 +227,33 @@
IOCTL(BTRFS_IOC_LOGICAL_INO, IOC_RW,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args)))
#endif
+#ifdef BTRFS_IOC_QUOTA_CTL
+ IOCTL(BTRFS_IOC_QUOTA_CTL, IOC_RW,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_quota_ctl_args)))
+#endif
+#ifdef BTRFS_IOC_QGROUP_ASSIGN
+ IOCTL(BTRFS_IOC_QGROUP_ASSIGN, IOC_W,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_qgroup_assign_args)))
+#endif
+#ifdef BTRFS_IOC_QGROUP_CREATE
+ IOCTL(BTRFS_IOC_QGROUP_CREATE, IOC_W,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_qgroup_create_args)))
+#endif
+#ifdef BTRFS_IOC_QGROUP_LIMIT
+ IOCTL(BTRFS_IOC_QGROUP_LIMIT, IOC_R,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_qgroup_limit_args)))
+#endif
+#ifdef BTRFS_IOC_QUOTA_RESCAN
+ IOCTL(BTRFS_IOC_QUOTA_RESCAN, IOC_W,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_quota_rescan_args)))
+#endif
+#ifdef BTRFS_IOC_QUOTA_RESCAN_STATUS
+ IOCTL(BTRFS_IOC_QUOTA_RESCAN_STATUS, IOC_R,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_quota_rescan_args)))
+#endif
+#ifdef BTRFS_IOC_QUOTA_RESCAN_WAIT
+ IOCTL(BTRFS_IOC_QUOTA_RESCAN_WAIT, 0, TYPE_NULL)
+#endif
#ifdef BTRFS_IOC_GET_DEV_STATS
IOCTL(BTRFS_IOC_GET_DEV_STATS, IOC_RW,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_dev_stats)))
@@ -996,6 +996,20 @@ struct target_rtc_pll_info {
35, struct btrfs_ioctl_ino_path_args)
#define TARGET_BTRFS_IOC_LOGICAL_INO TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
36, struct btrfs_ioctl_logical_ino_args)
+#define TARGET_BTRFS_IOC_QUOTA_CTL TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
+ 40, struct btrfs_ioctl_quota_ctl_args)
+#define TARGET_BTRFS_IOC_QGROUP_ASSIGN TARGET_IOW(BTRFS_IOCTL_MAGIC, \
+ 41, struct btrfs_ioctl_qgroup_assign_args)
+#define TARGET_BTRFS_IOC_QGROUP_CREATE TARGET_IOW(BTRFS_IOCTL_MAGIC, \
+ 42, struct btrfs_ioctl_qgroup_create_args)
+#define TARGET_BTRFS_IOC_QGROUP_LIMIT TARGET_IOR(BTRFS_IOCTL_MAGIC, \
+ 43, struct btrfs_ioctl_qgroup_limit_args)
+#define TARGET_BTRFS_IOC_QUOTA_RESCAN TARGET_IOW(BTRFS_IOCTL_MAGIC, \
+ 44, struct btrfs_ioctl_quota_rescan_args)
+#define TARGET_BTRFS_IOC_QUOTA_RESCAN_STATUS TARGET_IOR(BTRFS_IOCTL_MAGIC, \
+ 45, struct btrfs_ioctl_quota_rescan_args)
+#define TARGET_BTRFS_IOC_QUOTA_RESCAN_WAIT TARGET_IO(BTRFS_IOCTL_MAGIC, \
+ 46)
#define TARGET_BTRFS_IOC_GET_DEV_STATS TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
52, struct btrfs_ioctl_get_dev_stats)
#define TARGET_BTRFS_IOC_GET_FEATURES TARGET_IOR(BTRFS_IOCTL_MAGIC, \
@@ -400,6 +400,35 @@ STRUCT(btrfs_ioctl_get_dev_stats,
MK_ARRAY(TYPE_ULONGLONG,
128 - 2 - BTRFS_DEV_STAT_VALUES_MAX)) /* unused */
+STRUCT(btrfs_ioctl_quota_ctl_args,
+ TYPE_ULONGLONG, /* cmd */
+ TYPE_ULONGLONG) /* status */
+
+STRUCT(btrfs_ioctl_quota_rescan_args,
+ TYPE_ULONGLONG, /* flags */
+ TYPE_ULONGLONG, /* progress */
+ MK_ARRAY(TYPE_ULONGLONG, 6)) /* reserved */
+
+STRUCT(btrfs_ioctl_qgroup_assign_args,
+ TYPE_ULONGLONG, /* assign */
+ TYPE_ULONGLONG, /* src */
+ TYPE_ULONGLONG) /* dst */
+
+STRUCT(btrfs_ioctl_qgroup_create_args,
+ TYPE_ULONGLONG, /* create */
+ TYPE_ULONGLONG) /* qgroupid */
+
+STRUCT(btrfs_qgroup_limit,
+ TYPE_ULONGLONG, /* flags */
+ TYPE_ULONGLONG, /* max_rfer */
+ TYPE_ULONGLONG, /* max_excl */
+ TYPE_ULONGLONG, /* rsv_rfer */
+ TYPE_ULONGLONG) /* rsv_excl */
+
+STRUCT(btrfs_ioctl_qgroup_limit_args,
+ TYPE_ULONGLONG, /* qgroupid */
+ MK_STRUCT(STRUCT_btrfs_qgroup_limit)) /* lim */
+
STRUCT(btrfs_ioctl_feature_flags,
TYPE_ULONGLONG, /* compat_flags */
TYPE_ULONGLONG, /* compat_ro_flags */