diff options
author | David Sterba <dsterba@suse.cz> | 2013-12-12 19:11:26 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-31 08:22:20 -0800 |
commit | 4b7656f3bf4bb204d567375eb6d43317521543fc (patch) | |
tree | b4e895ab26929e0782d686d2593516ca3ef56730 /man/btrfs.8.in | |
parent | 91bc44bd073020c27487b22ccf53a37d593d331e (diff) |
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 'man/btrfs.8.in')
-rw-r--r-- | man/btrfs.8.in | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/man/btrfs.8.in b/man/btrfs.8.in index d5515e0a..389de3d7 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -8,7 +8,7 @@ btrfs \- control a btrfs filesystem .SH SYNOPSIS \fBbtrfs\fP \fBsubvolume create\fP [-i \fI<qgroupid>\fP] [\fI<dest>\fP/]\fI<name>\fP .PP -\fBbtrfs\fP \fBsubvolume delete\fP \fI<subvolume>\fP [\fI<subvolume>...\fP] +\fBbtrfs\fP \fBsubvolume delete\fP [\fIoptions\fP] \fI<subvolume>\fP [\fI<subvolume>...\fP] .PP \fBbtrfs\fP \fBsubvolume list\fP [\fIoptions\fP] [-G [+|-]\fIvalue\fP] [-C [+|-]\fIvalue\fP] [--sort=rootid,gen,ogen,path] \fI<path>\fP .PP @@ -168,9 +168,24 @@ times. .RE .TP -\fBsubvolume delete\fR\fI <subvolume> \fP[\fI<subvolume>...\fP]\fR -Delete the subvolume \fI<subvolume>\fR. If \fI<subvolume>\fR is not a -subvolume, \fBbtrfs\fR returns an error. +\fBsubvolume delete\fR [\fIoptions\fP] \fI<subvolume>\fP [\fI<subvolume>...\fP]\fR +Delete the subvolume(s) from the filesystem. If \fI<subvolume>\fR is not a +subvolume, \fBbtrfs\fR returns an error but continues if there are more arguments +to process. + +The corresponding directory is removed instantly but the data blocks are +removed later. The deletion does not involve full commit by default due to +performance reasons (as a consequence, the subvolume may appear again after a +crash). Use one of the --commit options to wait until the operation is safely +stored on the media. +.RS + +\fIOptions\fP +.IP "\fB-c|--commit-after\fP" 5 +wait for transaction commit at the end of the operation +.IP "\fB-C|--commit-each\fP" 5 +wait for transaction commit after deleting each subvolume +.RE .TP \fBsubvolume list\fR [\fIoptions\fP] [-G [+|-]\fIvalue\fP] [-C [+|-]\fIvalue\fP] [--sort=rootid,gen,ogen,path] \fI<path>\fR |