btrfs: new ioctls to do logical->inode and inode->path resolving
these ioctls make use of the new functions initially added for scrub. they return all inodes belonging to a logical address (BTRFS_IOC_LOGICAL_INO) and all paths belonging to an inode (BTRFS_IOC_INO_PATHS). Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
This commit is contained in:
@@ -204,6 +204,20 @@ struct btrfs_data_container {
|
||||
};
|
||||
};
|
||||
|
||||
struct btrfs_ioctl_ino_path_args {
|
||||
__u64 inum; /* in */
|
||||
__u32 size; /* in */
|
||||
__u64 reserved[4];
|
||||
struct btrfs_data_container *fspath; /* out */
|
||||
};
|
||||
|
||||
struct btrfs_ioctl_logical_ino_args {
|
||||
__u64 logical; /* in */
|
||||
__u32 size; /* in */
|
||||
__u64 reserved[4];
|
||||
struct btrfs_data_container *inodes; /* out */
|
||||
};
|
||||
|
||||
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
|
||||
struct btrfs_ioctl_vol_args)
|
||||
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
|
||||
@@ -259,4 +273,9 @@ struct btrfs_data_container {
|
||||
struct btrfs_ioctl_dev_info_args)
|
||||
#define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \
|
||||
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
|
||||
|
Reference in New Issue
Block a user