summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.h
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2010-12-20 16:30:25 +0800
committerLi Zefan <lizf@cn.fujitsu.com>2010-12-23 08:49:19 +0800
commit0caa102da82799efaba88e234484786a9591c797 (patch)
tree748bb0d8054bb85256904ffe29913277e5b80684 /fs/btrfs/ioctl.h
parentb83cc9693f39689490970c19f6c5b866f6719a70 (diff)
downloadop-kernel-dev-0caa102da82799efaba88e234484786a9591c797.zip
op-kernel-dev-0caa102da82799efaba88e234484786a9591c797.tar.gz
Btrfs: Add BTRFS_IOC_SUBVOL_GETFLAGS/SETFLAGS ioctls
This allows us to set a snapshot or a subvolume readonly or writable on the fly. Usage: Set BTRFS_SUBVOL_RDONLY of btrfs_ioctl_vol_arg_v2->flags, and then call ioctl(BTRFS_IOCTL_SUBVOL_SETFLAGS); Changelog for v3: - Change to pass __u64 as ioctl parameter. Changelog for v2: - Add _GETFLAGS ioctl. - Check if the passed fd is the root of a subvolume. - Change the name from _SNAP_SETFLAGS to _SUBVOL_SETFLAGS. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r--fs/btrfs/ioctl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 52ae489..1223223 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -194,4 +194,6 @@ struct btrfs_ioctl_space_args {
#define BTRFS_IOC_WAIT_SYNC _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)
#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
struct btrfs_ioctl_vol_args_v2)
+#define BTRFS_IOC_SUBVOL_GETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 25, __u64)
+#define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64)
#endif
OpenPOWER on IntegriCloud