]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Don't mark node clean after failed flush
authorKevin Wolf <kwolf@redhat.com>
Fri, 4 Nov 2016 23:03:15 +0000 (00:03 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 8 Dec 2016 19:50:54 +0000 (13:50 -0600)
commit48b3aa20ae7246500920c6c2c896efb45217fa08
tree3fc68e822d645ddc697030c9e76467d31c75192d
parentf1372d6e1489d01f3accbd6a3e5c4d45fa27ed45
block: Don't mark node clean after failed flush

Commit 3ff2f67a changed bdrv_co_flush() so that no flush is issues if
the image hasn't been dirtied since the last flush. This is not quite
correct: The condition should be that the image hasn't been dirtied
since the last _successful_ flush. This patch changes the logic
accordingly.

Without this fix, subsequent bdrv_co_flush() calls would return success
without actually doing anything even though the image is still dirty.
The difference is visible in some blkdebug test cases where error
messages incorrectly disappeared after commit 3ff2f67a.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1478300595-10090-1-git-send-email-kwolf@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit e6af1e085416378918cca357bf2abd8b90224667)

Conflicts:
block/io.c

* remove context dep on 9972354

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/io.c
tests/qemu-iotests/026.out
tests/qemu-iotests/026.out.nocache
tests/qemu-iotests/071.out