References: bsc#
1178049
SG_IO may return additional status in the 'status', 'driver_status',
and 'host_status' fields. When either of these fields are set the
command has not been executed normally, so we should not continue
processing this command but rather return an error.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bruce Rogers <brogers@suse.com>
aio_context_acquire(blk_get_aio_context(s->conf.blk));
- if (ret || r->req.io_canceled) {
+ if (ret || r->req.io_canceled ||
+ r->io_header.status ||
+ r->io_header.driver_status ||
+ r->io_header.host_status) {
scsi_command_complete_noio(r, ret);
goto done;
}
aio_context_acquire(blk_get_aio_context(s->conf.blk));
- if (ret || r->req.io_canceled) {
+ if (ret || r->req.io_canceled ||
+ r->io_header.status ||
+ r->io_header.driver_status ||
+ r->io_header.host_status) {
scsi_command_complete_noio(r, ret);
goto done;
}