> - if (atomic_read(&ibr->ib_bio_err_cnt))
> - status = SAM_STAT_CHECK_CONDITION;
> - else
> + /*
> + * Propigate use these two bio completion values from raw block
> + * drivers to signal up BUSY and TASK_SET_FULL status to the
> + * host side initiator. The latter for Linux/iSCSI initiators
> + * means the Linux/SCSI LLD will begin to reduce it's internal
> + * per session queue_depth.
> + */
> + if (atomic_read(&ibr->ib_bio_err_cnt)) {
> + switch (ibr->ib_bio_retry) {
> + case -EAGAIN:
> + status = SAM_STAT_BUSY;
> + break;
> + case -ENOMEM:
> + status = SAM_STAT_TASK_SET_FULL;
> + break;
> + default:
> + status = SAM_STAT_CHECK_CONDITION;
> + break;
> + }
> + } else {
> status = SAM_STAT_GOOD;
> + }
I think you;d be much better off killing ib_bio_err_cnt and having
an ib_error that gets set to the last / most server error.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html