btrfs-progs: docs: add compression level support for mount options

As of 5.1, btrfs now supports compression levels for zstd. Let users
know about this in the man page.

Pull-request: #204
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Dennis Zhou 2019-09-19 03:11:15 -07:00 committed by David Sterba
parent 4b3e22e988
commit 483179bbae
1 changed files with 10 additions and 3 deletions

View File

@ -125,10 +125,10 @@ The upper bound is not forced, but a warning is printed if it's more than 300
seconds (5 minutes). Use with care.
*compress*::
*compress='type'*::
*compress='type[:level]'*::
*compress-force*::
*compress-force='type'*::
(default: off)
*compress-force='type[:level]'*::
(default: off, level support since: 5.1)
+
Control BTRFS file data compression. Type may be specified as 'zlib',
'lzo', 'zstd' or 'no' (for no compression, used for remounting). If no type
@ -136,6 +136,13 @@ is specified, 'zlib' is used. If 'compress-force' is specified,
then compression will always be attempted, but the data may end up uncompressed
if the compression would make them larger.
+
Both 'zlib' and 'zstd' (since version 5.1) expose the compression level as a
tunable knob with higher levels trading speed and memory ('zstd') for higher
compression ratios. This can be set by appending a colon and the desired level.
Zlib accepts the range [1, 9] and zstd accepts [1, 15]. If no level is set,
both currently use a default level of 3. The value 0 is an alias for the defaul
level.
+
Otherwise some simple heuristics are applied to detect an incompressible file.
If the first blocks written to a file are not compressible, the whole file is
permanently marked to skip compression. As this is too simple, the