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

Submitted by Kirill Tkhai on Sept. 4, 2019, 3:26 p.m.


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

Commit Message

Kirill Tkhai Sept. 4, 2019, 3:26 p.m.
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.


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

Patch hide | download patch | download mbox

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