scsi-disk: introduce scsi_disk_req_check_error
commit5b956f415a356449a4171d5e0c7d9a25bbc84b5a
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 May 2016 11:08:13 +0000 (13 13:08 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 29 May 2016 07:11:11 +0000 (29 09:11 +0200)
tree6e401b8e6b4814ec82cf5f9d30f18148da5b3b4b
parent94f8ba1125ee7dfc7aa46166c8e3312e5ad949df
scsi-disk: introduce scsi_disk_req_check_error

Commonize all the checks for canceled requests and errors.  The next patch
will add another case to check for, in order to handle passthrough commands.

There is no semantic change here; the only nontrivial modification is in
scsi_write_do_fua, where cancellation has been checked earlier by both
callers.  Thus, the check is replaced with an assertion.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-disk.c