The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.18
------>
commit 8ab3227eca10a5bb2b2210a83f7c9c840750b363
Author: Dmitry Monakhov <dmonak...@openvz.org>
Date:   Wed May 11 18:35:36 2016 +0400

    ploop: force journal commit after dio_post_submit()
    
    Once we converted extent to initialized it can be part of uncompleted
    journal transaction, so we have to force transaction commit at some point.
    The easiest way to do it is to perform unconditional fsync.
    
    TODO: This case and others can be optimized by deferring fsync.
          But this is subject of another patch.
    
    https://jira.sw.ru/browse/PSBM-45730
    
    Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
 drivers/block/ploop/io_direct.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index 8032999..5a2e12a 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -523,6 +523,8 @@ dio_post_submit(struct ploop_io *io, struct ploop_request * 
preq)
        err = io->files.file->f_op->fallocate(io->files.file,
                                              FALLOC_FL_CONVERT_UNWRITTEN,
                                              (loff_t)sec << 9, clu_siz);
+       if (!err)
+               err = io->files.file->f_op->FOP_FSYNC(io->files.file, 0);
        file_end_write(io->files.file);
        if (err) {
                PLOOP_REQ_SET_ERROR(preq, err);
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to