@@ -206,6 +206,9 @@
IOCTL(BTRFS_IOC_INO_LOOKUP, IOC_RW,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_args)))
#endif
+#ifdef BTRFS_IOC_DEFAULT_SUBVOL
+ IOCTL(BTRFS_IOC_DEFAULT_SUBVOL, IOC_W, MK_PTR(TYPE_ULONGLONG))
+#endif
#ifdef BTRFS_IOC_SUBVOL_GETFLAGS
IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG))
#endif
@@ -248,6 +251,10 @@
IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args)))
#endif
+#ifdef BTRFS_IOC_GET_SUBVOL_ROOTREF
+ IOCTL(BTRFS_IOC_GET_SUBVOL_ROOTREF, IOC_RW,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_rootref_args)))
+#endif
#ifdef BTRFS_IOC_INO_LOOKUP_USER
IOCTL(BTRFS_IOC_INO_LOOKUP_USER, IOC_RW,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_user_args)))
@@ -984,6 +984,8 @@ struct target_rtc_pll_info {
15, struct btrfs_ioctl_vol_args)
#define TARGET_BTRFS_IOC_INO_LOOKUP TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
18, struct btrfs_ioctl_ino_lookup_args)
+#define TARGET_BTRFS_IOC_DEFAULT_SUBVOL TARGET_IOW(BTRFS_IOCTL_MAGIC, \
+ 19, abi_ullong)
#define TARGET_BTRFS_IOC_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, \
25, abi_ullong)
#define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, \
@@ -1006,6 +1008,8 @@ struct target_rtc_pll_info {
59, struct btrfs_ioctl_logical_ino_args)
#define TARGET_BTRFS_IOC_GET_SUBVOL_INFO TARGET_IOR(BTRFS_IOCTL_MAGIC, \
60, struct btrfs_ioctl_get_subvol_info_args)
+#define TARGET_BTRFS_IOC_GET_SUBVOL_ROOTREF TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
+ 61, struct btrfs_ioctl_get_subvol_rootref_args)
#define TARGET_BTRFS_IOC_INO_LOOKUP_USER TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
62, struct btrfs_ioctl_ino_lookup_user_args)
@@ -381,6 +381,17 @@ STRUCT(btrfs_ioctl_dev_info_args,
MK_ARRAY(TYPE_ULONGLONG, 379), /* unused */
MK_ARRAY(TYPE_CHAR, BTRFS_DEVICE_PATH_NAME_MAX)) /* path */
+STRUCT(rootref,
+ TYPE_ULONGLONG, /* treeid */
+ TYPE_ULONGLONG) /* dirid */
+
+STRUCT(btrfs_ioctl_get_subvol_rootref_args,
+ TYPE_ULONGLONG, /* min_treeid */
+ MK_ARRAY(MK_STRUCT(STRUCT_rootref),
+ BTRFS_MAX_ROOTREF_BUFFER_NUM), /* rootref */
+ TYPE_CHAR, /* num_items */
+ MK_ARRAY(TYPE_CHAR, 7)) /* align */
+
STRUCT(btrfs_ioctl_get_dev_stats,
TYPE_ULONGLONG, /* devid */
TYPE_ULONGLONG, /* nr_items */