Re: [PATCH 2/3] zram: add per-backend capability flags and validate parameters early
haoqin huang <[email protected]> Tue, 28 Jul 2026 17:09:06 +0800
| Newsgroups | org.kernel.vger.linux-block,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAEjiKS=SOTQFC4PrsV2VHkP9z3NxceuhUQavtvd7ZaZytWGDPQ@mail.gmail.com> |
On Tue, Jul 28, 2026 at 9:27 AM Sergey Senozhatsky <[email protected]> wrote: > > On (26/06/27 15:02), Haoqin Huang wrote: > [..] > > > diff --git a/include/linux/zstd_lib.h b/include/linux/zstd_lib.h > > index e295d4125dde..f4b26844e53a 100644 > > --- a/include/linux/zstd_lib.h > > +++ b/include/linux/zstd_lib.h > > @@ -1241,6 +1241,7 @@ ZSTDLIB_API size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict); > > #define ZSTD_SEARCHLOG_MIN 1 > > #define ZSTD_MINMATCH_MAX 7 /* only for ZSTD_fast, other strategies are limited to 6 */ > > #define ZSTD_MINMATCH_MIN 3 /* only for ZSTD_btopt+, faster strategies are limited to 4 */ > > +#define ZSTD_MAX_CLEVEL 22 > > #define ZSTD_TARGETLENGTH_MAX ZSTD_BLOCKSIZE_MAX > > #define ZSTD_TARGETLENGTH_MIN 0 /* note : comparing this constant to an unsigned results in a tautological test */ > > #define ZSTD_STRATEGY_MIN ZSTD_fast > > diff --git a/lib/zstd/compress/clevels.h b/lib/zstd/compress/clevels.h > > index 6ab8be6532ef..db3b275b502e 100644 > > --- a/lib/zstd/compress/clevels.h > > +++ b/lib/zstd/compress/clevels.h > > @@ -17,7 +17,6 @@ > > > > /*-===== Pre-defined compression levels =====-*/ > > > > -#define ZSTD_MAX_CLEVEL 22 > > > > __attribute__((__unused__)) > > I think the zstd part wants to be a separate patch as well. Agreed, I've split it into a standalone patch in v2: [3/5] zstd: move ZSTD_MAX_CLEVEL to zstd_lib.h