[Devel] [PATCH rh7] ploop: Populate holes_bitmap even if native discard is not supported

Kirill Tkhai ktkhai at virtuozzo.com
Wed Sep 4 18:26:30 MSK 2019


In case of migration from io_direct to io_kaio, image may contain
holes, which never reused. This makes the image grow over limits.
So, we have to use holes_bitmap even in this case.

https://jira.sw.ru/browse/PSBM-97319

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 232f34f0e45b..ca601fa1069c 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -149,9 +149,6 @@ static int populate_holes_bitmap(struct ploop_delta *delta,
 	u32 *index;
 	int i, ret;
 
-	if (test_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state))
-		return 0;
-
 	/* To do: add discard alignment for v1 */
 	if (delta->plo->fmt_version != PLOOP_FMT_V2) {
 		set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);



More information about the Devel mailing list