[Devel] [PATCH RHEL9 COMMIT] dm-ploop: fix dirty data detection mechanism in ploop_allocate_cluster
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jul 14 21:54:36 MSK 2025
The commit is pushed to "branch-rh9-5.14.0-427.55.1.vz9.82.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.55.1.vz9.82.7
------>
commit 8d61e82b0417a637055e1840269172802ef1fd51
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date: Thu Jul 10 14:02:40 2025 +0800
dm-ploop: fix dirty data detection mechanism in ploop_allocate_cluster
We use ploop_delta->file_preallocated_area_start when we allocate a new
cluster to determine if the place we allocate from is from preallocation
area or not. And depending on that we either zero the area or not, so
wrong detection can lead to garbage data to appear in the cluster which
was thought of as a zero cluster.
https://virtuozzo.atlassian.net/browse/VSTOR-110285
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Feature: dm-ploop: ploop target driver
---
drivers/md/dm-ploop-map.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index f21a3ae5ba4ad..40eca0a6f83f6 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1332,6 +1332,9 @@ static int ploop_allocate_cluster(struct ploop *ploop, u32 *dst_clu, struct file
}
}
+ if (end > top->file_preallocated_area_start)
+ top->file_preallocated_area_start = end;
+
spin_unlock_irqrestore(&ploop->bat_lock, flags);
return 0;
More information about the Devel
mailing list