The flag was introduced for local case: if we modify local block-device directly, bypassing ext4, we cannot rely on fsync() and must flush the device explicitly. It is not the case for pio_nfs, so it's not necessary to set PLOOP_REQ_ISSUE_FLUSH.
The patch is important because pio_nfs doesn't provide issue_flush method. Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- drivers/block/ploop/map.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/ploop/map.c b/drivers/block/ploop/map.c index 715dc15..154a897 100644 --- a/drivers/block/ploop/map.c +++ b/drivers/block/ploop/map.c @@ -1113,9 +1113,11 @@ static void map_wb_complete_post_process(struct ploop_map *map, * (see dio_submit()). So fsync of EXT4 image doesnt help us. * We need to force sync of nullified blocks. */ - preq->eng_io = &top_delta->io; + if (top_delta->io.ops->issue_flush) { + preq->eng_io = &top_delta->io; + set_bit(PLOOP_REQ_ISSUE_FLUSH, &preq->state); + } BUG_ON(test_bit(PLOOP_REQ_POST_SUBMIT, &preq->state)); - set_bit(PLOOP_REQ_ISSUE_FLUSH, &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