From: Andreas Philipp <philipp.andreas@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Andreas Philipp <philipp.andreas@gmail.com>,
chris.mason@oracle.com, dcrmorgado@gmail.com,
lizf@cn.fujitsu.com
Subject: [PATCH 3/5] Added support for an additional ioctl.
Date: Mon, 25 Apr 2011 15:47:59 +0200 [thread overview]
Message-ID: <1303739282-1675-4-git-send-email-philipp.andreas@gmail.com> (raw)
In-Reply-To: <1303739282-1675-1-git-send-email-philipp.andreas@gmail.com>
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>
---
ioctl.h | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/ioctl.h b/ioctl.h
index 776d7a9..358f814 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -30,6 +30,17 @@ 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];
+};
+
struct btrfs_ioctl_search_key {
/* which root are we searching. 0 is the tree of tree roots */
__u64 tree_id;
@@ -132,6 +143,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, \
@@ -169,4 +181,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
--
1.7.4.1
next prev parent reply other threads:[~2011-04-25 13:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 1:24 Read Only snapshots David Morgado
2011-04-25 12:16 ` Chris Mason
2011-04-25 13:47 ` [PATCH 0/5] Add user-space support for read-only snapshot creation Andreas Philipp
2011-04-25 13:47 ` [PATCH 1/5] Add support for read-only subvolumes Andreas Philipp
2011-04-25 21:34 ` Goffredo Baroncelli
2011-04-25 23:24 ` Chris Mason
2011-04-26 6:06 ` Li Zefan
2011-04-26 5:48 ` Li Zefan
2011-04-26 5:50 ` Li Zefan
2011-04-25 13:47 ` [PATCH 2/5] Support the new parameters in do_clone(int argc, char** argv) Andreas Philipp
2011-04-25 13:47 ` Andreas Philipp [this message]
2011-04-25 13:48 ` [PATCH 4/5] Test the additional ioctl Andreas Philipp
2011-04-25 13:48 ` [PATCH 5/5] Updated documentation for btrfs subvolume snapshot Andreas Philipp
2011-04-26 5:42 ` [PATCH 0/5] Add user-space support for read-only snapshot creation Li Zefan
-- strict thread matches above, loose matches on Subject: below --
2011-04-13 9:12 Andreas Philipp
2011-04-13 9:12 ` [PATCH 3/5] Added support for an additional ioctl Andreas Philipp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303739282-1675-4-git-send-email-philipp.andreas@gmail.com \
--to=philipp.andreas@gmail.com \
--cc=chris.mason@oracle.com \
--cc=dcrmorgado@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).