The commit is pushed to "branch-rh10-6.12.0-211.16.1.12.x.vz10-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh10-6.12.0-211.16.1.el10
------>
commit 06271b8af591fb7aec6ee877df6d027bf4cc2fb2
Author: Konstantin Khorenko <[email protected]>
Date: Wed Jun 3 23:56:37 2026 +0200
dm-ploop: fix inverted nr_deltas check disabling construction-time prealloc
The read-only guard added to ploop_ctr() also accidentally negated the
existing nr_deltas clause:
- if (ploop->nr_deltas > 0)
+ if (!ploop_is_ro(ploop) && !(ploop->nr_deltas > 0))
ploop_should_prealloc(ploop);
At this point ploop->nr_deltas is always >= 1 (ploop_add_deltas_stack()
just above returns -EINVAL for argc < 1 and otherwise sets nr_deltas =
argc, and ploop_ctr() rejects argc <= 0 earlier), so "nr_deltas > 0" is
always true and "!(nr_deltas > 0)" is always false. The whole condition
is therefore always false and ploop_should_prealloc() is never called -
for writable devices too, contrary to the commit's intent ("skip prealloc
for read-only, keep it for RW").
Drop the spurious inner negation so prealloc is enabled for RW devices
with deltas and skipped only for read-only ones. (Runtime allocation-path
prealloc was unaffected; this only restores eager construction-time
preallocation.)
Fixes: e0461bc2c152 ("dm-ploop: dont preallocate clusters for read only
table")
https://virtuozzo.atlassian.net/browse/VSTOR-132310
Feature: dm-ploop: ploop target driver
Signed-off-by: Konstantin Khorenko <[email protected]>
---
drivers/md/dm-ploop-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index af0925712194..0de0e84d440d 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -635,7 +635,7 @@ static int ploop_ctr(struct dm_target *ti, unsigned int
argc, char **argv)
ti->num_discard_bios = 1;
ti->discards_supported = true;
- if (!ploop_is_ro(ploop) && !(ploop->nr_deltas > 0))
+ if (!ploop_is_ro(ploop) && ploop->nr_deltas > 0)
ploop_should_prealloc(ploop);
return 0;
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel