block/iscsi: handle BUSY condition
commitefc6de0d0eb21bbd8fbc90da1faf7dd8ed9f5321
authorPeter Lieven <pl@kamp.de>
Fri, 30 May 2014 21:36:47 +0000 (30 23:36 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Jun 2014 06:47:10 +0000 (18 08:47 +0200)
treedd2613c96ba44edc642e594f2625fa76d4748a9e
parentaf44da87e926ff64260b95f4350d338c4fc113ca
block/iscsi: handle BUSY condition

this patch adds handling of BUSY status reponse from an iSCSI target.
Currently, we fail with -EIO in case of SCSI_STATUS_BUSY while the
obvious reaction would be to retry the operation after some time.
The retry time is randomly choosen from a range with exponential
growth increasing with each retry.

This patch includes most of the changes by a an upcoming patch
from Stefan Hajnoczi:

 iscsi: implement .bdrv_detach/attach_aio_context()

because I also need the reference to the aio_context for
the retry timer to work. I included the changes to maintain
better mergeability.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/iscsi.c