public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Cc: stern@rowland.harvard.edu, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI: don't do bogus retries
Date: Tue, 30 Sep 2008 09:46:38 -0500	[thread overview]
Message-ID: <1222785998.3232.23.camel@localhost.localdomain> (raw)
In-Reply-To: <20080930.101418.74753689.k-ueda@ct.jp.nec.com>

On Tue, 2008-09-30 at 10:14 -0400, Kiyoshi Ueda wrote:
> I think you should use blk_end_request(req, -EIO, blk_rq_bytes(rq))
> here instead of end_dequeued_request(req, -EIO).
> 
> end_dequeued_request() needs to be called with queue lock held,
> but I can't see any queue lock in your patches.
> Also, if you add the queue lock and still use end_dequeued_request(),
> __end_that_request_first(), which completes BIOs in the request,
> is called with the queue lock held, though it doesn't require queue
> lock actually.  So that might cause some performance regressions.

Yes, I was just getting around to noticing this.  Several other issues
spring immediately to mind

     1. Why are there both end_dequeued_request and end_queued_request?
        They both (by design since we tried to make the end cases the
        same) do the same thing
     2. Why don't they follow the block naming convention (they should
        begin blk_rq_ to indicate they're functions in block and act on
        requests).
     3. The block convention is for unlocked variants to be preceded by
        two underscores (although not universally adhered to).

James



  parent reply	other threads:[~2008-09-30 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29 21:12 [PATCH] SCSI: don't do bogus retries Alan Stern
2008-09-30 14:14 ` Kiyoshi Ueda
2008-09-30 14:39   ` Alan Stern
2008-09-30 14:46   ` James Bottomley [this message]
2008-09-30 15:41     ` Kiyoshi Ueda
2008-09-30 18:39       ` 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=1222785998.3232.23.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=k-ueda@ct.jp.nec.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stern@rowland.harvard.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