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

Kirill Tkhai ktkhai at virtuozzo.com
Fri Sep 6 15:42:18 MSK 2019


This reverts commit c247a0abadaea0f4d3ca42bbf45419f1df2a69a8.

This is not complete fix, it even introduces new problems,
so I revert it while the full fix is not implemented.

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

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

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index ca601fa1069c..232f34f0e45b 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -149,6 +149,9 @@ 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