The commit is pushed to "branch-rh9-5.14.0-427.55.1.vz9.82.x-ovz" and will 
appear at g...@bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.55.1.vz9.82.2
------>
commit 4f4a9e2dd6050977d8bcef452b95b6f5047cda53
Author: Pavel Tikhomirov <ptikhomi...@virtuozzo.com>
Date:   Mon Jul 7 15:07:02 2025 +0200

    dm-ploop: make ploop_preallocate_cluster() return error on unexpected file 
size change
    
    https://virtuozzo.atlassian.net/browse/VSTOR-108868
    Co-developed-by: Andrey Zhadchenko <andrey.zhadche...@virtuozzo.com>
    Signed-off-by: Pavel Tikhomirov <ptikhomi...@virtuozzo.com>
    
    Feature: dm-ploop: ploop target driver
---
 drivers/md/dm-ploop-map.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index b59e0d514c95f..aa3cd483f6a55 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1194,12 +1194,16 @@ static int ploop_preallocate_cluster(struct ploop 
*ploop, struct file *file)
                goto out;
        }
 
-       /* here must be the only place to change file_size */
+       /*
+        * Here must be the only place to change file_size.
+        */
        spin_lock_irqsave(&ploop->bat_lock, flags);
        if (top->file_size < new_len) {
                top->file_size = new_len;
        } else {
                PL_ERR("unexpected file size change\n");
+               ret = -EIO;
+               goto out;
        }
        if (ploop->prealloc_size)
                goto prealloc_more;
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to