Messages in this thread Patch in this message | | | From | Alexey Romanov <> | Subject | [RFC PATCH v1 4/4] zram: recompression: add ZRAM_MERGED check | Date | Mon, 21 Nov 2022 22:00:20 +0300 |
| |
It is not possible to recompress merged pages in the current implementation. Although, in the future it is possible to add support for recompression of merged pages.
Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru> --- drivers/block/zram/zram_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 7a267b37e5db..07661283ea15 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -2211,7 +2211,8 @@ static ssize_t recompress_store(struct device *dev, if (zram_test_flag(zram, index, ZRAM_WB) || zram_test_flag(zram, index, ZRAM_UNDER_WB) || zram_test_flag(zram, index, ZRAM_SAME) || - zram_test_flag(zram, index, ZRAM_INCOMPRESSIBLE)) + zram_test_flag(zram, index, ZRAM_INCOMPRESSIBLE) || + zram_test_flag(zram, index, ZRAM_MERGED)) goto next; err = zram_recompress(zram, index, page, threshold, -- 2.25.1
| |