@@ -202,6 +202,10 @@
IOCTL(BTRFS_IOC_SNAP_DESTROY, IOC_W,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
#endif
+#ifdef BTRFS_IOC_INO_LOOKUP
+ IOCTL(BTRFS_IOC_INO_LOOKUP, IOC_RW,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_args)))
+#endif
#ifdef BTRFS_IOC_SUBVOL_GETFLAGS
IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG))
#endif
@@ -212,6 +216,14 @@
IOCTL(BTRFS_IOC_DEV_INFO, IOC_RW,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_dev_info_args)))
#endif
+#ifdef BTRFS_IOC_INO_PATHS
+ IOCTL(BTRFS_IOC_INO_PATHS, IOC_RW,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_path_args)))
+#endif
+#ifdef BTRFS_IOC_LOGICAL_INO
+ IOCTL(BTRFS_IOC_LOGICAL_INO, IOC_RW,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args)))
+#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)))
@@ -228,10 +240,18 @@
IOCTL(BTRFS_IOC_GET_SUPPORTED_FEATURES, IOC_R,
MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags), 3)))
#endif
+#ifdef BTRFS_IOC_LOGICAL_INO_V2
+ IOCTL(BTRFS_IOC_LOGICAL_INO_V2, IOC_RW,
+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args)))
+#endif
#ifdef BTRFS_IOC_GET_SUBVOL_INFO
IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R,
MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_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)))
+#endif
#ifdef CONFIG_USBFS
/* USB ioctls */
@@ -982,12 +982,18 @@ struct target_rtc_pll_info {
14, struct btrfs_ioctl_vol_args)
#define TARGET_BTRFS_IOC_SNAP_DESTROY TARGET_IOW(BTRFS_IOCTL_MAGIC, \
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_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, \
25, abi_ullong)
#define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, \
26, abi_ullong)
#define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
30, struct btrfs_ioctl_dev_info_args)
+#define TARGET_BTRFS_IOC_INO_PATHS TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
+ 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_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, \
@@ -996,8 +1002,12 @@ struct target_rtc_pll_info {
57, struct btrfs_ioctl_feature_flags[2])
#define TARGET_BTRFS_IOC_GET_SUPPORTED_FEATURES TARGET_IOR(BTRFS_IOCTL_MAGIC, \
57, struct btrfs_ioctl_feature_flags[3])
+#define TARGET_BTRFS_IOC_LOGICAL_INO_V2 TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
+ 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_INO_LOOKUP_USER TARGET_IOWR(BTRFS_IOCTL_MAGIC,\
+ 62, struct btrfs_ioctl_ino_lookup_user_args)
/* usb ioctls */
#define TARGET_USBDEVFS_CONTROL TARGET_IOWRU('U', 0)
@@ -349,6 +349,30 @@ STRUCT(btrfs_ioctl_get_subvol_info_args,
MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* rtime */
MK_ARRAY(TYPE_ULONGLONG, 8)) /* reserved */
+STRUCT(btrfs_ioctl_ino_lookup_args,
+ TYPE_ULONGLONG, /* treeid */
+ TYPE_ULONGLONG, /* objectid */
+ MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_PATH_MAX)) /* name */
+
+STRUCT(btrfs_ioctl_ino_path_args,
+ TYPE_ULONGLONG, /* inum */
+ TYPE_ULONGLONG, /* size */
+ TYPE_ULONGLONG, /* reserved */
+ TYPE_ULONGLONG) /* fspath */
+
+STRUCT(btrfs_ioctl_logical_ino_args,
+ TYPE_ULONGLONG, /* logical */
+ TYPE_ULONGLONG, /* size */
+ TYPE_ULONGLONG, /* reserved */
+ TYPE_ULONGLONG, /* flags */
+ TYPE_ULONGLONG) /* inodes */
+
+STRUCT(btrfs_ioctl_ino_lookup_user_args,
+ TYPE_ULONGLONG, /* dirid */
+ TYPE_ULONGLONG, /* treeid */
+ MK_ARRAY(TYPE_CHAR, BTRFS_VOL_NAME_MAX + 1), /* name */
+ MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_USER_PATH_MAX)) /* path */
+
STRUCT(btrfs_ioctl_dev_info_args,
TYPE_ULONGLONG, /* devid */
MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* uuid */