diff options
| author | Kevin Wolf | 2017-03-22 22:00:05 +0100 |
|---|---|---|
| committer | Max Reitz | 2017-03-27 16:53:42 +0200 |
| commit | e5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91 (patch) | |
| tree | 8c4ebc20c2a2a3a646822f0742e7c1944b1734bb /block/commit.c | |
| parent | nbd-client: fix handling of hungup connections (diff) | |
| download | qemu-e5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91.tar.gz qemu-e5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91.tar.xz qemu-e5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91.zip | |
file-posix: Make bdrv_flush() failure permanent without O_DIRECT
Success for bdrv_flush() means that all previously written data is safe
on disk. For fdatasync(), the best semantics we can hope for on Linux
(without O_DIRECT) is that all data that was written since the last call
was successfully written back. Therefore, and because we can't redo all
writes after a flush failure, we have to give up after a single
fdatasync() failure. After this failure, we would never be able to make
the promise that a successful bdrv_flush() makes.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20170322210005.16533-1-kwolf@redhat.com
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/commit.c')
0 files changed, 0 insertions, 0 deletions
