Re: [PATCH v3] zram: break the strict dependency from lzo

From: Sergey Senozhatsky
Date: Mon Oct 26 2020 - 21:22:12 EST


On (20/10/26 08:51), Rui Salvaterra wrote:
> static const char * const backends[] = {
> +#if IS_ENABLED(CONFIG_CRYPTO_LZO)
> "lzo",
> "lzo-rle",
> +#endif
> #if IS_ENABLED(CONFIG_CRYPTO_LZ4)
> "lz4",
> #endif
[..]
> +static const char *default_compressor =
> +#if IS_ENABLED(CONFIG_CRYPTO_LZO)
> + "lzo-rle";
> +#elif IS_ENABLED(CONFIG_CRYPTO_LZ4)
> + "lz4";
> +#elif IS_ENABLED(CONFIG_CRYPTO_LZ4HC)
> + "lz4hc";
> +#elif IS_ENABLED(CONFIG_CRYPTO_842)
> + "842";
> +#elif IS_ENABLED(CONFIG_CRYPTO_ZSTD)
> + "zstd";
> +#endif

Honestly, I'm not entirely excited. lzo is a fallback compression
algorithm. If you want to use zram with something else thenconfigure
zram to use something else. What do all these #if/#elif buy us?

-ss