[Devel] [PATCH RH7 6/6] ploop: Disable discard on ploop1 v1 after snapshot

Kirill Tkhai ktkhai at virtuozzo.com
Thu Sep 3 17:13:42 MSK 2020


1)Base delta is RAW
2)Comming snapshot is ploop1 v1, which may contain unaligned clusters.

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

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 8a0f0a8fe3f7..113394d4ae8f 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -3773,6 +3773,9 @@ static int ploop_snapshot(struct ploop_device * plo, unsigned long arg,
 	if (err)
 		goto out_close2;
 
+	if (!may_allow_falloc_discard(plo))
+		set_bit(PLOOP_S_NO_FALLOC_DISCARD, &plo->state);
+
 	enable_discard(plo);
 	return 0;
 




More information about the Devel mailing list