[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221121190020.66548-5-avromanov@sberdevices.ru>
Date: Mon, 21 Nov 2022 22:00:20 +0300
From: Alexey Romanov <avromanov@...rdevices.ru>
To: <minchan@...nel.org>, <senozhatsky@...omium.org>,
<ngupta@...are.org>, <akpm@...ux-foundation.org>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<kernel@...rdevices.ru>, <ddrokosov@...rdevices.ru>,
Alexey Romanov <avromanov@...rdevices.ru>
Subject: [RFC PATCH v1 4/4] zram: recompression: add ZRAM_MERGED check
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@...rdevices.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
Powered by blists - more mailing lists