diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2011-07-07 10:48:38 -0400 |
---|---|---|
committer | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2011-09-29 06:54:28 -0400 |
commit | d7728c960dccf775b92f2c4139f1216275a45c44 (patch) | |
tree | 76d8ea34fe47a1557f0cf5e558aa3cb525f39c70 /fs/btrfs/ioctl.h | |
parent | 0ef8e45158f97dde4801b535e25f70f7caf01a27 (diff) |
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>
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r-- | fs/btrfs/ioctl.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h index 1857e3871843..2da30d4950e6 100644 --- a/fs/btrfs/ioctl.h +++ b/fs/btrfs/ioctl.h | |||
@@ -204,6 +204,20 @@ struct btrfs_data_container { | |||
204 | }; | 204 | }; |
205 | }; | 205 | }; |
206 | 206 | ||
207 | struct btrfs_ioctl_ino_path_args { | ||
208 | __u64 inum; /* in */ | ||
209 | __u32 size; /* in */ | ||
210 | __u64 reserved[4]; | ||
211 | struct btrfs_data_container *fspath; /* out */ | ||
212 | }; | ||
213 | |||
214 | struct btrfs_ioctl_logical_ino_args { | ||
215 | __u64 logical; /* in */ | ||
216 | __u32 size; /* in */ | ||
217 | __u64 reserved[4]; | ||
218 | struct btrfs_data_container *inodes; /* out */ | ||
219 | }; | ||
220 | |||
207 | #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ | 221 | #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ |
208 | struct btrfs_ioctl_vol_args) | 222 | struct btrfs_ioctl_vol_args) |
209 | #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \ | 223 | #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \ |
@@ -259,4 +273,9 @@ struct btrfs_data_container { | |||
259 | struct btrfs_ioctl_dev_info_args) | 273 | struct btrfs_ioctl_dev_info_args) |
260 | #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ | 274 | #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ |
261 | struct btrfs_ioctl_fs_info_args) | 275 | struct btrfs_ioctl_fs_info_args) |
276 | #define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \ | ||
277 | struct btrfs_ioctl_ino_path_args) | ||
278 | #define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \ | ||
279 | struct btrfs_ioctl_ino_path_args) | ||
280 | |||
262 | #endif | 281 | #endif |