The commit is pushed to "branch-rh10-6.12.0-55.52.1.4.x.vz10-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.4.1.vz10
------>
commit 1571addddde855853f6855a6dca21d45cfc3d37d
Author: Vasileios Almpanis <[email protected]>
Date: Thu Jan 29 11:09:07 2026 +0000
dm-ploop: dont preallocate clusters for read only table
Userspace might pass the optional argument fallo_new_clu
to the constructor even though the table is created in
read-only mode. Add a check for read-only ploop and skip
preallocation.
https://virtuozzo.atlassian.net/browse/VSTOR-123292
Signed-off-by: Vasileios Almpanis <[email protected]>
Feature: dm-ploop: ploop target driver
======
Patchset description:
dm-ploop: truncate helpers cleanup and read-only table fix
- Export do_ftruncate() so it can be used by other kernel subsystems.
- Revert the recently introduced vfs_truncate2() helper, which becomes
redundant after exporting do_ftruncate() and adds unnecessary API
surface.
- Fix dm-ploop target constructor logic to avoid preallocating
clusters when the table is created in read-only mode. Userspace
may still pass the optional fallo_new_clu argument, but
preallocation must be skipped for read-only ploop devices.
---
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 6ab81a56707d6..553ade08b0c44 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->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