Re: [PATCH 3/3] zram: reset per-priority params when changing algorithm before init

From: Sergey Senozhatsky

Date: Fri Jul 24 2026 - 01:20:42 EST


On (26/06/27 15:02), Haoqin Huang wrote:
> Parameters validated against one algorithm may be invalid for another
> (e.g. lz4 accepts level=65535 but zstd does not). Although algorithm
> changes are blocked after disksize is set, they are allowed before
> device initialization. Reset per-priority params on algorithm change
> so that stale parameters do not silently carry over.
>
> Signed-off-by: Haoqin Huang <haoqinhuang@xxxxxxxxxxx>
> Reviewed-by: Rongwei Wang <zigiwang@xxxxxxxxxxx>

I suppose we can do that. 99% (if not 100%) of zram setup routines
are completely automatic (systemd, mmd, .etc) but why not.

Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>