linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: James Bottomley <James.Bottomley@suse.de>
Cc: Hannes Reinecke <hare@suse.de>,
	Mike Christie <michaelc@cs.wisc.edu>,
	linux-scsi@vger.kernel.org, Jens Axboe <Jens.Axboe@oracle.com>
Subject: Re: [PATCH] Retry commands with UNIT_ATTENTION sense codes
Date: Wed, 5 May 2010 09:28:16 -0400	[thread overview]
Message-ID: <20100505132816.GA21362@infradead.org> (raw)
In-Reply-To: <1273065593.5227.42.camel@mulgrave.site>

On Wed, May 05, 2010 at 09:19:53AM -0400, James Bottomley wrote:
> Unfortunately, not.  A long time ago we used to use SPECIAL for prepared
> commands, but we stripped that path out.  If you look at the prep
> functions today, they only accept either REQ_TYPE_FS or
> REQ_TYPE_BLOCK_PC ... they kill everything else, so we'd have to do
> surgery on all the input paths to get this to work.
> 
> Looking at all of this, I'm really unhappy with the way barriers are
> working in SCSI ... using BLOCK_PC for them was a big mistake, since
> block can't handle the errors and BLOCK_PC by its very nature requests
> that all errors, however trivially fixable, be returned.
> 
> It looks like we have precisely the same problems with discard too,
> except there at least we'll ignore the error.
> 
> Someone needs to take a good look at fixing this ... or at least just
> making discard and barrier use the same submit paths, so we can fix it
> up in the lower layers.

Both barriers and dicards are FS requests as far as the block layer is
concerned.  We turn them into BLOCK_PC requests very late in the game,
either in the prepare_flush function for barriers, or directly inside
prep_fn for discard.  I tried to handle discard requests as FS all
the way through, but the various different ways in which we account for
a request length didn't play nicely with that.

Handling cache flushes as FS requests all the way through should be
easier than that.


      reply	other threads:[~2010-05-05 13:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 14:48 [PATCH] Retry commands with UNIT_ATTENTION sense codes Hannes Reinecke
2010-05-04 16:26 ` James Bottomley
2010-05-04 20:15   ` Mike Christie
2010-05-04 20:27     ` Mike Christie
2010-05-04 20:30       ` James Bottomley
2010-05-04 20:51         ` James Bottomley
2010-05-05  6:26         ` Hannes Reinecke
2010-05-05 13:19           ` James Bottomley
2010-05-05 13:28             ` Christoph Hellwig [this message]

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=20100505132816.GA21362@infradead.org \
    --to=hch@infradead.org \
    --cc=James.Bottomley@suse.de \
    --cc=Jens.Axboe@oracle.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).