Since we use custom backend implementation, we remove the ability for users to use algorithms from crypto backend. This breaks backward compatibility, user doesn't necessarily use one of the algorithms from "custom" backends defined in zram folder. For example, he can use some driver with hardware compression support. This patchset adds an option that allows user to enable Crypto API backend support. Crypto API backend is also implemented in a separate file backend_crypto_api like the other custom backends. Alexey Romanov (3): zram: pass zcomp instead of zcomp_params to create_context method zram: store crypto backends in list instead of array zram: introduce crypto-api backend drivers/block/zram/Kconfig | 10 ++ drivers/block/zram/Makefile | 1 + drivers/block/zram/backend_842.c | 14 +- drivers/block/zram/backend_842.h | 2 +- drivers/block/zram/backend_crypto_api.c | 117 +++++++++++++++ drivers/block/zram/backend_crypto_api.h | 10 ++ drivers/block/zram/backend_deflate.c | 15 +- drivers/block/zram/backend_deflate.h | 2 +- drivers/block/zram/backend_lz4.c | 15 +- drivers/block/zram/backend_lz4.h | 2 +- drivers/block/zram/backend_lz4hc.c | 15 +- drivers/block/zram/backend_lz4hc.h | 2 +- drivers/block/zram/backend_lzo.c | 14 +- drivers/block/zram/backend_lzo.h | 2 +- drivers/block/zram/backend_lzorle.c | 14 +- drivers/block/zram/backend_lzorle.h | 2 +- drivers/block/zram/backend_zstd.c | 15 +- drivers/block/zram/backend_zstd.h | 2 +- drivers/block/zram/zcomp.c | 183 ++++++++++++++++++------ drivers/block/zram/zcomp.h | 11 +- drivers/block/zram/zram_drv.c | 7 + 21 files changed, 390 insertions(+), 65 deletions(-) create mode 100644 drivers/block/zram/backend_crypto_api.c create mode 100644 drivers/block/zram/backend_crypto_api.h -- 2.34.1