« Previous | Next » 

Revision 0c92e0e6

ID0c92e0e6b64c9061f7365a2712b9055ea35b52f9

Added by Paolo Bonzini about 11 years ago

scsi-disk: handle io_canceled uniformly and correctly

Always check it immediately after calling bdrv_acct_done, and
always do a "goto done" in case the "done" label has to free
some memory---as is the case for scsi_unmap_complete in the
previous patch.

This patch could fix problems that happen when a request is
split into multiple parts, and one of them is canceled. Then
the next part is fired, but the HBA's cancellation callbacks have
fired already. Whether this happens or not, depends on how the
block/ driver implements AIO cancellation. It it does a simple
bdrv_drain_all() or similar, then it will not have a problem.
If it only cancels the given AIOCB, this scenario could happen.

Cc:
Signed-off-by: Paolo Bonzini <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences