Skip to content

Commit

Permalink
Soft-hide global /recompress parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed Dec 19, 2024
1 parent 6151160 commit 4d2a060
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion man/zram-generator.conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Devices with the final size of *0* will be discarded.
If more than one is given, and recompression is enabled in the kernel, subsequent ones will be set as the recompression algorithms, with decreasing priority.

If a compression algorithm is suffixed with a parenthesised comma-separated list of parameters, those are given to `.../algorithm_params`.
A parenthesised parameter list *without* a compression algorithm is set as the global recompression parameters (`.../recompress`).
A parenthesised parameter list *without* a compression algorithm is written to `.../recompress`.

* `writeback-device`=

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ fn test_10_example() {
("lzo-rle".into(), "".into()),
("zstd".into(), "level=3".into())
],
recompression_global: "type=idle".into(),
..Default::default()
}
);
assert_eq!(d.options, "");
Expand Down
5 changes: 1 addition & 4 deletions zram-generator.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ zram-resident-limit = maxhotplug * 3/4
#
# Subsequent algorithms are used for recompression.
# Comma-separated parameters may be specified in parentheses.
#
# Parameters without a compression algorithm are set as
# global recompression parameters.
compression-algorithm = lzo-rle zstd(level=3) (type=idle)
compression-algorithm = lzo-rle zstd(level=3)

# By default, file systems and swap areas are trimmed on-the-go
# by setting "discard".
Expand Down

0 comments on commit 4d2a060

Please sign in to comment.