summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2026-03-11 11:42:49 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-04-05 23:53:25 +0300
commit301f3922009658ee353b3177bc186a12d36b8dd3 (patch)
tree062a97e2366b2e6e474e12b642f53f52f493e700 /tools/testing
parentcedfa028b54e584532026888dec94039b62b3d1f (diff)
downloadlinux-301f3922009658ee353b3177bc186a12d36b8dd3.tar.xz
zram: unify and harden algo/priority params handling
We have two functions that accept algo= and priority= params - algorithm_params_store() and recompress_store(). This patch unifies and hardens handling of those parameters. There are 4 possible cases: - only priority= provided [recommended] We need to verify that provided priority value is within permitted range for each particular function. - both algo= and priority= provided We cannot prioritize one over another. All we should do is to verify that zram is configured in the way that user-space expects it to be. Namely that zram indeed has compressor algo= setup at given priority=. - only algo= provided [not recommended] We should lookup priority in compressors list. - none provided [not recommended] Just use function's defaults. Link: https://lkml.kernel.org/r/20260311084312.1766036-7-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Suggested-by: Minchan Kim <minchan@kernel.org> Cc: Brian Geffon <bgeffon@google.com> Cc: gao xu <gaoxu2@honor.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions