aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2013-12-12 19:11:26 +0100
committerChris Mason <clm@fb.com>2014-01-31 08:22:20 -0800
commit4b7656f3bf4bb204d567375eb6d43317521543fc (patch)
treeb4e895ab26929e0782d686d2593516ca3ef56730 /ioctl.h
parent91bc44bd073020c27487b22ccf53a37d593d331e (diff)
downloadbtrfs-progs-4b7656f3bf4bb204d567375eb6d43317521543fc.tar.gz
btrfs-progs-4b7656f3bf4bb204d567375eb6d43317521543fc.tar.xz
btrfs-progs-4b7656f3bf4bb204d567375eb6d43317521543fc.zip
btrfs-progs: add options to set commit mode after subvol delete
Subvolume deletion does not do a full transaction commit. This can lead to an unexpected result when the system crashes between deletion and commit, the subvolume directory will appear again. Add options to request filesystem sync after each deleted subvolume or after the last one. If the command with --commit option finishes succesfully, the subvolume(s) deletion status is safely stored on the media. Userspace approach is more flexible than in-kernel. Related discussions: http://www.spinics.net/lists/linux-btrfs/msg22088.html http://www.spinics.net/lists/linux-btrfs/msg27240.html CC: Alex Lyakas <alex.btrfs@zadarastorage.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ioctl.h b/ioctl.h
index a589cd7..de48691 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -542,6 +542,8 @@ struct btrfs_ioctl_clone_range_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_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)
+#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_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 24, \