aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-11-25 18:46:16 +0100
committerDavid Sterba <dsterba@suse.cz>2014-12-10 15:01:20 +0100
commit8ef9ac8cda38bda25561c2964f0aa81d8dcdf451 (patch)
tree481399f68e3abd063c13995c332bc8748851f174 /ioctl.h
parent6715de04d9a707aad5eddaeb65132f0c206c7b5f (diff)
downloadbtrfs-progs-8ef9ac8cda38bda25561c2964f0aa81d8dcdf451.tar.gz
btrfs-progs-8ef9ac8cda38bda25561c2964f0aa81d8dcdf451.tar.xz
btrfs-progs-8ef9ac8cda38bda25561c2964f0aa81d8dcdf451.zip
btrfs-progs: basic support for TREE_SEARCH_V2 ioctl
Add the interface and helper that checks if the v2 ioctl is supported. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ioctl.h b/ioctl.h
index 67c8de9..2c2c7c1 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -279,6 +279,18 @@ struct btrfs_ioctl_search_args {
char buf[BTRFS_SEARCH_ARGS_BUFSIZE];
};
+/*
+ * Extended version of TREE_SEARCH ioctl that can return more than 4k of bytes.
+ * The allocated size of the buffer is set in buf_size.
+ */
+struct btrfs_ioctl_search_args_v2 {
+ struct btrfs_ioctl_search_key key; /* in/out - search parameters */
+ __u64 buf_size; /* in - size of buffer
+ * out - on EOVERFLOW: needed size
+ * to store item */
+ __u64 buf[0]; /* out - found items */
+};
+
#define BTRFS_INO_LOOKUP_PATH_MAX 4080
struct btrfs_ioctl_ino_lookup_args {
__u64 treeid;
@@ -542,6 +554,8 @@ struct btrfs_ioctl_clone_range_args {
struct btrfs_ioctl_defrag_range_args)
#define BTRFS_IOC_TREE_SEARCH _IOWR(BTRFS_IOCTL_MAGIC, 17, \
struct btrfs_ioctl_search_args)
+#define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
+ struct btrfs_ioctl_search_args_v2)
#define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \
struct btrfs_ioctl_ino_lookup_args)
#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64)