summaryrefslogtreecommitdiff
path: root/ioctl.h
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2011-11-02 11:42:30 -0400
committerChris Mason <chris.mason@oracle.com>2011-11-02 15:46:10 -0400
commit6055e736045d7e1f83ea77551941c7745ad36ec2 (patch)
treeefb881b6d1d1ea02a2ab159dbb9a956fc496332c /ioctl.h
parentdcdbc1ce18ef73224198d45d8463a86709379202 (diff)
downloadbtrfs-progs-6055e736045d7e1f83ea77551941c7745ad36ec2.tar.gz
Btrfs-progs: added ioctls and commands to resolve inodes and logical addrs
two new commands that make use of the new path resolving functions implemented for scrub, doing the resolving in-kernel. the result for both commands is a list of files belonging to that inode / logical address. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/ioctl.h b/ioctl.h
index a391695..1ae7537 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -200,6 +200,30 @@ struct btrfs_ioctl_space_args {
struct btrfs_ioctl_space_info spaces[0];
};
+struct btrfs_data_container {
+ __u32 bytes_left; /* out -- bytes not needed to deliver output */
+ __u32 bytes_missing; /* out -- additional bytes needed for result */
+ __u32 elem_cnt; /* out */
+ __u32 elem_missed; /* out */
+ __u64 val[0]; /* out */
+};
+
+struct btrfs_ioctl_ino_path_args {
+ __u64 inum; /* in */
+ __u64 size; /* in */
+ __u64 reserved[4];
+ /* struct btrfs_data_container *fspath; out */
+ __u64 fspath; /* out */
+};
+
+struct btrfs_ioctl_logical_ino_args {
+ __u64 logical; /* in */
+ __u64 size; /* in */
+ __u64 reserved[4];
+ /* struct btrfs_data_container *inodes; out */
+ __u64 inodes;
+};
+
/* BTRFS_IOC_SNAP_CREATE is no longer used by the btrfs command */
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
struct btrfs_ioctl_vol_args)
@@ -248,5 +272,10 @@ struct btrfs_ioctl_space_args {
#define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \
struct btrfs_ioctl_dev_info_args)
#define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \
- struct btrfs_ioctl_fs_info_args)
+ struct btrfs_ioctl_fs_info_args)
+#define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \
+ struct btrfs_ioctl_ino_path_args)
+#define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \
+ struct btrfs_ioctl_ino_path_args)
+
#endif