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

Submitted by Kirill Tkhai on Sept. 6, 2019, 12:42 p.m.

Details

Message ID 156777370044.7092.16567900168452868523.stgit@localhost.localdomain
State New
Series "Revert "ploop: Populate holes_bitmap even if native discard is not supported""
Headers show

Commit Message

Kirill Tkhai Sept. 6, 2019, 12:42 p.m.
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@virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c |    3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

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);