Skip to content
Commit 48b3aa20 authored by Kevin Wolf's avatar Kevin Wolf Committed by Michael Roth
Browse files

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: default avatarKevin Wolf <kwolf@redhat.com>
Reviewed-by: default avatarDenis V. Lunev <den@openvz.org>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
Message-id: 1478300595-10090-1-git-send-email-kwolf@redhat.com
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit e6af1e08)

Conflicts:
	block/io.c

* remove context dep on 99723548

Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent f1372d6e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment