From 0a63a11c3d3bbb7e061daad28435b5eef91a947d Mon Sep 17 00:00:00 2001 From: Hubert Kario Date: Sun, 23 Jan 2011 15:31:07 +0000 Subject: [PATCH 04/15] update man page to new defragment command interface Update btrfs filesystem defragment command explanation. Add explanation of advanced parameters and notes about general usage. Add few notes about the btrfs --help usage, fix related grammar. Signed-off-by: Hubert Kario Signed-off-by: Chris Mason --- man/btrfs.8.in | 33 ++++++++++++++++++++++++++------- 1 files changed, 26 insertions(+), 7 deletions(-) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 26ef982..cba2de1 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -15,7 +15,7 @@ btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBsubvolume set-default\fP\fI \fP .PP -\fBbtrfs\fP \fBfilesystem defrag\fP\fI | [|...]\fP +\fBbtrfs\fP \fBfilesystem defragment\fP\fI [-vcf] [-s start] [-l len] [-t size] | [|...]\fP .PP \fBbtrfs\fP \fBfilesystem sync\fP\fI \fP .PP @@ -34,6 +34,8 @@ btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBhelp|\-\-help|\-h \fP\fI\fP .PP +\fBbtrfs\fP \fB \-\-help \fP\fI\fP +.PP .SH DESCRIPTION .B btrfs is used to control the filesystem and the files and directories stored. It is @@ -60,12 +62,12 @@ returns an error. If a command is terminated by .I --help -, the relevant help is showed. If the passed command matches more commands, -the help of all the matched commands are showed. For example +, the detailed help is showed. If the passed command matches more commands, +detailed help of all the matched commands is showed. For example .I btrfs dev --help shows the help of all .I device* -command. +commands. .SH COMMANDS .TP @@ -98,12 +100,29 @@ mount time via the \fIsubvol=\fR option. \fBsubvolume set-default\fR\fI \fR Set the subvolume of the filesystem \fI\fR which is mounted as -\fIdefault\fR. The subvolume is identified by \fB\fR, which +\fIdefault\fR. The subvolume is identified by \fI\fR, which is returned by the \fBsubvolume list\fR command. .TP -\fBfilesystem defragment\fP\fI | [|...]\fR -Defragment files and/or directories. +\fBfilesystem defragment\fP\fI [-vcf] [-s start] [-l len] [-t size] | [|...]\fR +Defragment file data and/or directory metadata. To defragment all files in a +directory you have to specify each one on its own or use your shell wildcards. + +\fB-v\fP be verbose + +\fB-c\fP compress file contents while defragmenting + +\fB-f\fP flush filesystem after defragmenting + +\fB-s start\fP defragment only from byte \fIstart\fR onward + +\fB-l len\fP defragment only up to \fIlen\fR bytes + +\fB-t size\fP defragment only files at least \fIsize\fR bytes big + +NOTE: defragmenting with kernels up to 2.6.37 will unlink COW-ed copies of data, don't +use it if you use snapshots, have de-duplicated your data or made copies with +\fBcp --reflink\fP. .TP \fBdevice scan\fR \fI[ [..]]\fR -- 1.7.5.2.353.g5df3e