The commit is pushed to "branch-rh9-5.14.0-427.106.1.vz9.90.x-ovz" and will 
appear at [email protected]:openvz/vzkernel.git
after rh9-5.14.0-427.106.1.vz9.90.1
------>
commit e0b9c1cc630cdad363dce5ab777bdd110a20d3e3
Author: Vasileios Almpanis <[email protected]>
Date:   Thu Jan 29 11:15: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
    
      - Add a new do_ftruncate() helper that operates directly on a struct
        file, allowing in-kernel callers to truncate files without going
        through file descriptor based interfaces.
      - 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 34fa0665935df..10eb0b4e670b5 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -634,7 +634,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

Reply via email to