]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 7 Feb 2016 05:48:04 +0000 (21:48 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 5 Mar 2016 07:36:20 +0000 (23:36 -0800)
commitf630dbf5b53467319c21652545aa1e5c53a848a4
tree6ba485852f5bcd596be2e26352f4258bb1fd7b21
parent2654cf300fc2bc27fa9ff7bb7c092b97e76acc9a
target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL

This patch updates target/iblock backend driver code to
check for bio completion status of -EAGAIN / -ENOMEM
provided by raw block drivers and scsi devices, in order
to generate the following SCSI status to initiators:

  - SAM_STAT_BUSY
  - SAM_STAT_TASK_SET_FULL

Note these two SAM status codes are useful to signal to
Linux SCSI host side that se_cmd should be retried
again, or with TASK_SET_FULL case to attempt to lower
our internal host LLD queue_depth and scsi_cmnd retry.

It also updates target_complete_cmd() to parse status
when signalling success to target_completion_wq.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Andy Grover <agrover@redhat.com>
Cc: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_iblock.c
drivers/target/target_core_iblock.h
drivers/target/target_core_transport.c