All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_debug: illegal blocking memory allocation
Date: Fri, 05 Jan 2007 00:30:13 -0500	[thread overview]
Message-ID: <459DE265.7030100@torque.net> (raw)
In-Reply-To: <20070104155047.GE11203@kernel.dk>

Jens Axboe wrote:
> On Thu, Jan 04 2007, James Bottomley wrote:
>> On Thu, 2007-01-04 at 12:21 +0100, Jens Axboe wrote:
>>> I guess it's fully up to you how you want to solve it. The scheme seems
>>> a little elaborate, but these error conditions are unlikely to ever been
>>> seen in the wild, so no objections from me.
>> Actually, there's already a DID_ code that does what you want.  Instead
>> of DID_ERROR, which will retry immediately, there's DID_REQUEUE which
>> will halt the device queue and wait for a returning command to retry.
> 
> As long as it keeps firing the queue at some intervals even without any
> commands pending at all, then that'll work just fine. I like that
> approach a lot better than coding the error into some sense value that
> is (at best) some vague approximation of what has happened (calling
> memory shortage a transport error is a bit of a stretch).

True, but both happen. The scsi_debug driver is a
virtual host, virtual target and a lu (ram disk).
The failure that you pointed out stopped a response
being built. In the real world that would in the
target or lu.

The reason that I mentioned aborted_command sense key
is that it is also a "out of resources" (bandwidth) error
and it broke sg_dd. I would bet money that it would
also break the block layer/sd. The block layer should
leave it alone as it is simply a matter of sd
retrying a few times. However the st driver could have
a real problem (e.g. did that state changing command
work, fail or partially work??).

Anyway, I have submitted a patch that reports DID_REQUEUE
for an allocation failures and adds the ability to inject
aborted_command errors.

Doug Gilbert


  reply	other threads:[~2007-01-05  5:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03 13:49 [PATCH] scsi_debug: illegal blocking memory allocation Jens Axboe
2007-01-04  5:38 ` Douglas Gilbert
2007-01-04 11:21   ` Jens Axboe
2007-01-04 15:10     ` James Bottomley
2007-01-04 15:27       ` Matthew Wilcox
2007-01-04 15:34         ` James Bottomley
2007-01-04 15:50       ` Jens Axboe
2007-01-05  5:30         ` Douglas Gilbert [this message]
2007-01-05 12:49           ` Jens Axboe

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=459DE265.7030100@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-scsi@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.