]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
zramctl: add hint about supported algorithms
authorKarel Zak <kzak@redhat.com>
Wed, 9 Aug 2023 09:26:28 +0000 (11:26 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 9 Aug 2023 09:26:28 +0000 (11:26 +0200)
It seems the current list of the algorithms is confusing for
end-users, because it's inaccurate in many cases. Let's explain why
the list cannot be "perfect".

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2203324
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/zramctl.8.adoc
sys-utils/zramctl.c

index 576701ed306f4b66ed49b69303b4c644accc6feb..ef525a63337f9b3e874aca7a0343d97adb6d260f 100644 (file)
@@ -40,6 +40,8 @@ Note that _zramdev_ node specified on command line has to already exist. The com
 
 *-a*, **--algorithm lzo**|**lz4**|**lz4hc**|**deflate**|**842**|**zstd**::
 Set the compression algorithm to be used for compressing data in the zram device.
++
+The *list of supported algorithms could be inaccurate* as it depends on the current kernel configuration. A basic overview can be obtained by using the command "cat /sys/block/zram0/comp_algorithm"; however, please note that this list might also be incomplete. This is due to the fact that ZRAM utilizes the Crypto API, and if certain algorithms were built as modules, it becomes impossible to enumerate all of them.
 
 *-f*, *--find*::
 Find the first unused zram device. If a *--size* argument is present, then initialize the device.
index 0c321b8cc7a6393168a6dfe9772329f2393680d9..a84ce665bc39f18b8b69ceed02ffb378ee6befe3 100644 (file)
@@ -566,6 +566,7 @@ static void __attribute__((__noreturn__)) usage(void)
 
        fputs(_(" <alg> specify algorithm, supported are:\n"), out);
        fputs(_("   lzo, lz4, lz4hc, deflate, 842 and zstd\n"), out);
+       fputs(_("   (List may be inaccurate, consult man page.)\n"), out);
 
        fputs(USAGE_COLUMNS, out);
        for (i = 0; i < ARRAY_SIZE(infos); i++)