aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/ioctls.h27
-rw-r--r--linux-user/syscall_defs.h7
-rw-r--r--linux-user/syscall_types.h29
3 files changed, 63 insertions, 0 deletions
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index dc2f3d2413..42759c0778 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -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)))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index bb60c728d8..b557b07eec 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1023,6 +1023,13 @@ struct target_rtc_pll_info {
#define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 30)
#define TARGET_BTRFS_IOC_INO_PATHS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 35)
#define TARGET_BTRFS_IOC_LOGICAL_INO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 36)
+#define TARGET_BTRFS_IOC_QUOTA_CTL TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 40)
+#define TARGET_BTRFS_IOC_QGROUP_ASSIGN TARGET_IOWU(BTRFS_IOCTL_MAGIC, 41)
+#define TARGET_BTRFS_IOC_QGROUP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 42)
+#define TARGET_BTRFS_IOC_QGROUP_LIMIT TARGET_IORU(BTRFS_IOCTL_MAGIC, 43)
+#define TARGET_BTRFS_IOC_QUOTA_RESCAN TARGET_IOWU(BTRFS_IOCTL_MAGIC, 44)
+#define TARGET_BTRFS_IOC_QUOTA_RESCAN_STATUS TARGET_IORU(BTRFS_IOCTL_MAGIC, 45)
+#define TARGET_BTRFS_IOC_QUOTA_RESCAN_WAIT TARGET_IO(BTRFS_IOCTL_MAGIC, 46)
#define TARGET_BTRFS_IOC_GET_DEV_STATS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 52)
#define TARGET_BTRFS_IOC_GET_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57)
#define TARGET_BTRFS_IOC_SET_FEATURES TARGET_IOWU(BTRFS_IOCTL_MAGIC, 57)
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 73e36620ce..51d9931b95 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -458,6 +458,35 @@ STRUCT(btrfs_ioctl_get_dev_stats,
128 - 2 - BTRFS_DEV_STAT_VALUES_MAX)) /* unused */
#endif
+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 */