[Devel] [PATCH RHEL7 COMMIT] ploop: Disable discard on ploop1 v1 after snapshot

Vasily Averin vvs at virtuozzo.com
Fri Sep 4 10:31:21 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.16
------>
commit de57566e992d5de7c8d82f00acf3183b06889511
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Sep 4 10:31:21 2020 +0300

    ploop: Disable discard on ploop1 v1 after snapshot
    
    1)Base delta is RAW
    2)Comming snapshot is ploop1 v1, which may contain unaligned clusters.
    
    https://jira.sw.ru/browse/PSBM-107598
    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 8a0f0a8..113394d 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