diff options
author | David Sterba <dsterba@suse.com> | 2017-09-15 17:36:57 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-11-01 20:45:29 +0100 |
commit | f51d2b59120ff364a5e612a594ed358767e1cd09 (patch) | |
tree | 349ed68bde053fc040138f4255aca2dab83b0bba /fs/btrfs/lzo.c | |
parent | d4417e22551377c6e589c15ff2b931610e5230bc (diff) | |
download | linux-f51d2b59120ff364a5e612a594ed358767e1cd09.tar.gz linux-f51d2b59120ff364a5e612a594ed358767e1cd09.tar.bz2 linux-f51d2b59120ff364a5e612a594ed358767e1cd09.zip |
btrfs: allow to set compression level for zlib
Preliminary support for setting compression level for zlib, the
following works:
$ mount -o compess=zlib # default
$ mount -o compess=zlib0 # same
$ mount -o compess=zlib9 # level 9, slower sync, less data
$ mount -o compess=zlib1 # level 1, faster sync, more data
$ mount -o remount,compress=zlib3 # level set by remount
The compress-force works the same as compress'. The level is visible in
the same format in /proc/mounts. Level set via file property does not
work yet.
Required patch: "btrfs: prepare for extensions in compression options"
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/lzo.c')
-rw-r--r-- | fs/btrfs/lzo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c index d433e75d489a..6c7f18cd3b61 100644 --- a/fs/btrfs/lzo.c +++ b/fs/btrfs/lzo.c @@ -430,10 +430,15 @@ out: return ret; } +static void lzo_set_level(struct list_head *ws, unsigned int type) +{ +} + const struct btrfs_compress_op btrfs_lzo_compress = { .alloc_workspace = lzo_alloc_workspace, .free_workspace = lzo_free_workspace, .compress_pages = lzo_compress_pages, .decompress_bio = lzo_decompress_bio, .decompress = lzo_decompress, + .set_level = lzo_set_level, }; |