@@ -12,7 +12,7 @@ DESCRIPTION
1212:command: `btrfs filesystem ` is used to perform several whole filesystem level tasks,
1313including all the regular filesystem operations like resizing, space stats,
1414label setting/getting, and defragmentation. There are other whole filesystem
15- tasks like scrub or balance that are grouped in separate commands.
15+ tasks like scrub or balance that are grouped in separate commands ( :doc: ` btrfs-scrub `, :doc: ` btrfs-balance `) .
1616
1717SUBCOMMAND
1818----------
@@ -83,7 +83,7 @@ df [options] <path>
8383defragment [options] <file>|<dir> [<file>|<dir>...]
8484 Defragment file data on a mounted filesystem. Requires kernel 2.6.33 and newer.
8585
86- If *-r * is passed, files in dir will be defragmented recursively (not
86+ If *-r * is passed, files in * dir * will be defragmented recursively (not
8787 descending to subvolumes, mount points and directory symlinks).
8888 The start position and the number of bytes to defragment can be specified by
8989 start and length using *-s * and *-l * options below.
@@ -117,6 +117,13 @@ defragment [options] <file>|<dir> [<file>|<dir>...]
117117 algorithm, *zlib * (default), *lzo * or *zstd *. Currently it's not possible to select no
118118 compression. See also section *EXAMPLES *.
119119
120+ -L|--level <level>
121+ Since kernel 6.14 the compresison can also take the level parameter which will be used
122+ only for the defragmentation and overrides the eventual mount option compression level.
123+ Valid levels depend on the compression algorithms: *zlib *
124+ 1..9, *lzo * does not have any levels, *zstd * the standard levels 1..15 and also the
125+ realtime -1..-15.
126+
120127 -r
121128 defragment files recursively in given directories, does not descend to
122129 subvolumes or mount points
@@ -143,6 +150,7 @@ defragment [options] <file>|<dir> [<file>|<dir>...]
143150 Perform defragmentation in the range in SIZE steps and flush (*-f *) after each one.
144151 The range is default (the whole file) or given by *-s * and *-l *, split into
145152 the steps or done in one go if the step is larger. Minimum range size is 256KiB.
153+ With verbosity options the progress of defragmentation will be also printed.
146154
147155 -v
148156 (deprecated) alias for global *-v * option
0 commit comments