All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@daterainc.com>
Cc: target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
	Mike Christie <michaelc@cs.wisc.edu>,
	Sagi Grimberg <sagig@dev.mellanox.co.il>,
	Andy Grover <agrover@redhat.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	Sagi Grimberg <sagig@mellanox.com>,
	Mike Christie <mchristi@redhat.com>
Subject: Re: [PATCH-v2 2/2] target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL
Date: Sat, 5 Mar 2016 22:01:08 +0100	[thread overview]
Message-ID: <20160305210108.GA16337@lst.de> (raw)
In-Reply-To: <1457161634-15756-2-git-send-email-nab@daterainc.com>

> -	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.

  reply	other threads:[~2016-03-05 21:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05  7:07 [PATCH-v2 1/2] target: Avoid DataIN transfers for non-GOOD SAM status Nicholas A. Bellinger
2016-03-05  7:07 ` [PATCH-v2 2/2] target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL Nicholas A. Bellinger
2016-03-05 21:01   ` Christoph Hellwig [this message]
2016-03-05 22:51     ` Nicholas A. Bellinger
2016-03-06  6:19       ` Christoph Hellwig
2016-03-06 21:55         ` Nicholas A. Bellinger
2016-03-07  7:55           ` Christoph Hellwig
2016-03-07  8:03             ` Nicholas A. Bellinger
2016-03-07 16:18               ` -EAGAIN and -ENOMEM from ->bi_end_io, was " Christoph Hellwig
2016-03-07 22:39                 ` Nicholas A. Bellinger
2016-03-07 22:39                   ` Nicholas A. Bellinger
2016-03-08  7:04                   ` Christoph Hellwig
2016-03-07 16:40               ` James Bottomley
2016-03-07 22:44                 ` Nicholas A. Bellinger
2016-03-05 21:01 ` [PATCH-v2 1/2] target: Avoid DataIN transfers for non-GOOD SAM status Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160305210108.GA16337@lst.de \
    --to=hch@lst.de \
    --cc=agrover@redhat.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mchristi@redhat.com \
    --cc=michaelc@cs.wisc.edu \
    --cc=nab@daterainc.com \
    --cc=nab@linux-iscsi.org \
    --cc=sagig@dev.mellanox.co.il \
    --cc=sagig@mellanox.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.