The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at 
https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.1
------>
commit 051a2a154c0e040d7d15ab9a3b56b77d9de021b3
Author: Andrey Smetanin <asmeta...@virtuozzo.com>
Date:   Tue May 19 08:27:16 2015 +0400

    ploop: force FUA of nullified blocks for BAT grow
    
    Lately we think we does sync of nullified blocks at format
    driver by image fsync before header BAT size grow update.
    But we write this data directly into underlying device
    bypassing EXT4 by usage of extent map tree
    (see dio_submit()). So fsync of EXT4 image doesnt help us.
    We need to force sync of nullified blocks. This patch does
    it by marking preq via PLOOP_REQ_FORCE_FUA flag.
    
    https://jira.sw.ru/browse/PSBM-31969
    
    Signed-off-by: Andrey Smetanin <asmeta...@parallels.com>
    
    Acked-by: Andrew Vagin <ava...@parallels.com>
---
 drivers/block/ploop/map.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/block/ploop/map.c b/drivers/block/ploop/map.c
index 67e2852..8ea67e9 100644
--- a/drivers/block/ploop/map.c
+++ b/drivers/block/ploop/map.c
@@ -1056,10 +1056,14 @@ static void map_wb_complete_post_process(struct 
ploop_map *map,
                       0, PAGE_SIZE);
 
        /*
-        * FUA of this data occures at format driver ->complete_grow() by
-        * all image sync. After that header size increased to use this
-        * cluster as BAT cluster.
+        * Lately we think we does sync of nullified blocks at format
+        * driver by image fsync before header update.
+        * But we write this data directly into underlying device
+        * bypassing EXT4 by usage of extent map tree
+        * (see dio_submit()). So fsync of EXT4 image doesnt help us.
+        * We need to force sync of nullified blocks.
         */
+       set_bit(PLOOP_REQ_FORCE_FUA, &preq->state);
        top_delta->io.ops->submit(&top_delta->io, preq, preq->req_rw,
                                  &sbl, preq->iblock, 1<<plo->cluster_log);
 }
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to