aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorAndreas Philipp <philipp.andreas@gmail.com>2011-04-26 10:02:40 +0200
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:57 -0400
commit501a867d36de284947fe2bd3a72685345672a811 (patch)
tree8915eee814a71bb2df19ddd870e7c2839a6a3a1c /ioctl.h
parentfa81a569ac5e4ca426cd8e3fc8a0f181c58a8fae (diff)
downloadbtrfs-progs-501a867d36de284947fe2bd3a72685345672a811.tar.gz
btrfs-progs-501a867d36de284947fe2bd3a72685345672a811.tar.xz
btrfs-progs-501a867d36de284947fe2bd3a72685345672a811.zip
Added support for an additional ioctl.
Added BTRFS_IOC_SNAP_CREATE_V2 and struct btrfs_ioctl_vol_args_v2 as defined in fs/btrfs/ioctl.h in the kernel sources. Signed-off-by: Andreas Philipp <philipp.andreas@gmail.com> Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ioctl.h b/ioctl.h
index bb7b9e0..5aa288b 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -30,6 +30,20 @@ struct btrfs_ioctl_vol_args {
char name[BTRFS_PATH_NAME_MAX + 1];
};
+#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
+#define BTRFS_SUBVOL_NAME_MAX 4039
+
+struct btrfs_ioctl_vol_args_v2 {
+ __s64 fd;
+ __u64 transid;
+ __u64 flags;
+ __u64 unused[4];
+ char name[BTRFS_SUBVOL_NAME_MAX + 1];
+};
+
+#define BTRFS_FSID_SIZE 16
+#define BTRFS_UUID_SIZE 16
+
struct btrfs_ioctl_search_key {
/* which root are we searching. 0 is the tree of tree roots */
__u64 tree_id;
@@ -139,6 +153,7 @@ struct btrfs_ioctl_space_args {
struct btrfs_ioctl_space_info spaces[0];
};
+/* 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)
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -176,4 +191,6 @@ struct btrfs_ioctl_space_args {
#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64)
#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
struct btrfs_ioctl_space_args)
+#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
+ struct btrfs_ioctl_vol_args_v2)
#endif