block: mark blocks dirty on coroutine write completion
commit6b7cb2479b2b8ac2a3368ade3e72bfd8121675c2
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 13 Oct 2011 12:08:24 +0000 (13 13:08 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 13 Oct 2011 13:02:54 +0000 (13 15:02 +0200)
treed8fb209a804193e100ace986c8f315fc3b3348e0
parentb2a6137166c765f3a35265e6457cd7c2de9d992c
block: mark blocks dirty on coroutine write completion

The aio write operation marks blocks dirty when the write operation
completes.  The coroutine write operation marks blocks dirty before
issuing the write operation.

It seems safest to mark the block dirty when the operation completes so
that anything tracking dirty blocks will not act before the change has
been made to the image file.

Make the coroutine write operation dirty blocks on write completion.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c