From: Jens Axboe <axboe@suse.de>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: dougg@torque.net, Brian King <brking@us.ibm.com>,
dgilbert@interlog.com,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] sg block layer tcqing fix
Date: Tue, 6 Jan 2004 16:22:15 +0100 [thread overview]
Message-ID: <20040106152215.GD3483@suse.de> (raw)
In-Reply-To: <1073402071.2047.5.camel@mulgrave>
On Tue, Jan 06 2004, James Bottomley wrote:
> On Mon, 2004-01-05 at 23:06, Douglas Gilbert wrote:
> > Given that no other ULDs call blk_queue_*_tag() routines it seems
> > a bit strange that sg, st and osst need to call blk_queue_end_tag()
> > prior to calling scsi_release_request(). Perhaps the cleanup can be
> > built into scsi_release_request() or a new variant (e.g.
> > scsi_release_special_request() ) could be introduced.
>
> I agree. Having the ULD stop tags but not start them is a layering
> violation. The attached patch will end the tag in the release request.
>
> It's still appropriate to release the tag earlier, as the mid layer does
> to free up tag slots for other requests. Once the tag is ended, the tag
> queue flag is cleared, so the check in release request now fails.
>
> James
>
> ===== drivers/scsi/scsi.c 1.132 vs edited =====
> --- 1.132/drivers/scsi/scsi.c Tue Sep 30 09:24:17 2003
> +++ edited/drivers/scsi/scsi.c Tue Jan 6 09:10:25 2004
> @@ -142,6 +142,23 @@
>
> void __scsi_release_request(struct scsi_request *sreq)
> {
> + struct request *req = sreq->sr_request;
> +
> + /* unlikely because the tag was usually ended earlier
> + *
> + * NOTE: the lock should be held while checking the
> + * flag. However, any race here requiring the lock
> + * would be a gross error. */
I don't agree with this comment - why would you need to have the queue
lock to check req->flags?
--
Jens Axboe
next prev parent reply other threads:[~2004-01-06 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-29 20:29 [PATCH] sg block layer tcqing fix Brian King
2004-01-06 5:06 ` Douglas Gilbert
2004-01-06 11:46 ` Willem Riede
2004-01-06 15:14 ` James Bottomley
2004-01-06 15:22 ` Jens Axboe [this message]
2004-01-06 15:30 ` James Bottomley
2004-01-06 15:37 ` 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=20040106152215.GD3483@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@steeleye.com \
--cc=brking@us.ibm.com \
--cc=dgilbert@interlog.com \
--cc=dougg@torque.net \
--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 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).