aboutsummaryrefslogtreecommitdiff
path: root/block/cow.c
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@inktank.com>2013-03-29 13:03:23 -0700
committerStefan Hajnoczi <stefanha@redhat.com>2013-04-15 10:18:05 +0200
commitdc7588c1eb3008bda53dde1d6b890cd299758155 (patch)
tree013e43ffc24d04e9d47b74ce52923aa1efc6a030 /block/cow.c
parent342809e807ecb55551e579942f535966251cbe27 (diff)
rbd: add an asynchronous flush
The existing bdrv_co_flush_to_disk implementation uses rbd_flush(), which is sychronous and causes the main qemu thread to block until it is complete. This results in unresponsiveness and extra latency for the guest. Fix this by using an asynchronous version of flush. This was added to librbd with a special #define to indicate its presence, since it will be backported to stable versions. Thus, there is no need to check the version of librbd. Implement this as bdrv_aio_flush, since it matches other aio functions in the rbd block driver, and leave out bdrv_co_flush_to_disk when the asynchronous version is available. Reported-by: Oliver Francke <oliver@filoo.de> Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/cow.c')
0 files changed, 0 insertions, 0 deletions