ide: convert ide_sector_write() to asynchronous I/O
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 29 Mar 2012 09:31:31 +0000 (10:31 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 Apr 2012 14:03:27 +0000 (16:03 +0200)
commite82dabd82e7a8ce0294bce829b3d2dd25eb3a514
tree23323a335733668cc2f7214905b7d27b8481282b
parentbef0fd5958120542f126f2dedbfce65d8839a94d
ide: convert ide_sector_write() to asynchronous I/O

The IDE PIO write sector code path uses bdrv_write() and hence can make
the guest unresponsive while the I/O request is in progress.  This patch
converts ide_sector_write() to use bdrv_aio_writev() by using the
BUSY_STAT bit to tell the guest that the request is in progress.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Tested-by: Richard Davies <richard@arachsys.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/core.c