]> Git Repo - qemu.git/commit
file-posix: Make bdrv_flush() failure permanent without O_DIRECT
authorKevin Wolf <[email protected]>
Wed, 22 Mar 2017 21:00:05 +0000 (22:00 +0100)
committerMax Reitz <[email protected]>
Mon, 27 Mar 2017 14:53:42 +0000 (16:53 +0200)
commite5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91
tree8c4ebc20c2a2a3a646822f0742e7c1944b1734bb
parenta12a712a7dfbd2e2f4882ef2c90a9b2162166dd7
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 <[email protected]>
Message-id: 20170322210005[email protected]
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
block/file-posix.c
This page took 0.026041 seconds and 4 git commands to generate.