aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.h
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2010-12-20 16:04:08 +0800
committerLi Zefan <lizf@cn.fujitsu.com>2010-12-23 08:49:17 +0800
commitb83cc9693f39689490970c19f6c5b866f6719a70 (patch)
treeb86d09884015fce195a4ac5ff1e8ec5f6ec00677 /fs/btrfs/ioctl.h
parentfa0d2b9bd717340e0bc4850a80ac0eb344e9a7fb (diff)
downloadkernel_samsung_crespo-b83cc9693f39689490970c19f6c5b866f6719a70.zip
kernel_samsung_crespo-b83cc9693f39689490970c19f6c5b866f6719a70.tar.gz
kernel_samsung_crespo-b83cc9693f39689490970c19f6c5b866f6719a70.tar.bz2
Btrfs: Add readonly snapshots support
Usage: Set BTRFS_SUBVOL_RDONLY of btrfs_ioctl_vol_arg_v2->flags, and call ioctl(BTRFS_I0CTL_SNAP_CREATE_V2). Implementation: - Set readonly bit of btrfs_root_item->flags. - Add readonly checks in btrfs_permission (inode_permission), btrfs_setattr, btrfs_set/remove_xattr and some ioctls. Changelog for v3: - Eliminate btrfs_root->readonly, but check btrfs_root->root_item.flags. - Rename BTRFS_ROOT_SNAP_RDONLY to BTRFS_ROOT_SUBVOL_RDONLY. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r--fs/btrfs/ioctl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index c344d12..52ae489 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -31,6 +31,7 @@ struct btrfs_ioctl_vol_args {
};
#define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
+#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
#define BTRFS_SUBVOL_NAME_MAX 4039
struct btrfs_ioctl_vol_args_v2 {