public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: martin@dalecki.de
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5.28 small REQ_SPECIAL abstraction
Date: Sun, 28 Jul 2002 21:25:23 +0200	[thread overview]
Message-ID: <20020728212523.A3460@suse.de> (raw)
In-Reply-To: <3D416625.4050205@evision.ag>

On Fri, Jul 26 2002, Marcin Dalecki wrote:
> Jens Axboe wrote:
> >On Fri, Jul 26 2002, Marcin Dalecki wrote:
> >
> >>The attached patch does the following:
> >
> >
> >Looks fine to me. One thing sticks out though:
> 
> Hey it was *literal* cut and paste from SCSI code after all ;-)
> 
> >>+	rq->flags &= REQ_QUEUED;
> >
> >
> >this can't be right. Either it's a bug for REQ_QUEUED to be set here, or
> >it needs to end the tag properly.
> >
> >
> >>+	rq->flags |= REQ_SPECIAL | REQ_BARRIER;
> >>+
> >>+	rq->special = data;
> >>+
> >>+	spin_lock_irqsave(q->queue_lock, flags);
> >>+	/* If command is tagged, release the tag */
> >>+	if(blk_rq_tagged(rq))
> >>+		blk_queue_end_tag(q, rq);
> >
> >
> >woops, you just possible leaked a tag. I really don't think you should
> >mix inserting a special and ending a tag into the same function, makes
> >no sense. If a driver wants that it should do:
> >
> >	if (blk_rq_tagged(rq))
> >		blk_queue_end_tag(q, rq);
> 
> Yes.
> 
> >	blk_insert_request(q, rq, bla bla);
> >
> >Also, please use the right spacing, if(bla :-)
> 
> Cut and paste damage from SCSI code.... no argument here.
> 
> >So kill any reference to tagging (and REQ_QUEUED)i in
> >blk_insert_request, and I'm ok with it.
> 
> Ah, yes I'm pretty sure now. I looked up how blk_queue_end_tag()
> works and it's indeed the case -> setting the flag
> and undoing it immediately doesn't make sense anyway.
> (Even the collateral damage to tag allocation aside...)
> This was perhaps "defensive coding" by the SCSI people?
> 
> You are right the
> 
> rq->flags &= REQ_QUEUED;
> 
> and the
> 
>  	if (blk_rq_tagged(rq))
>  		blk_queue_end_tag(q, rq);
> 
> should be just removed and things are fine.
> They only survive becouse they don't provide a tag for the request in
> first place.
> 
> Thanks for pointing it out.

But the crap still got merged, sigh... Yet again an excellent point of
why stuff like this should go through the maintainer. Apparently Linus
blindly applies this stuff.

-- 
Jens Axboe


  reply	other threads:[~2002-07-28 19:21 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 21:13 Linux-2.5.28 Linus Torvalds
2002-07-24 21:46 ` Linux-2.5.28 Paul Larson
2002-07-24 21:57   ` Linux-2.5.28 Paul Larson
2002-07-24 22:11     ` Linux-2.5.28 Robert Love
2002-07-24 22:14     ` Linux-2.5.28 William Lee Irwin III
2002-07-24 22:20       ` Linux-2.5.28 Paul Larson
2002-07-24 23:31         ` Linux-2.5.28 Alessandro Suardi
2002-07-24 22:22       ` Linux-2.5.28 Robert Love
2002-07-24 22:49         ` Linux-2.5.28 Paul Larson
2002-07-24 22:32   ` Linux-2.5.28 Linus Torvalds
2002-07-24 22:30 ` Linux-2.5.28 Daniel Egger
2002-07-24 22:52   ` Linux-2.5.28 Linus Torvalds
2002-07-24 23:31     ` Linux-2.5.28 Daniel Egger
2002-07-25  1:08       ` Linux-2.5.28 Linus Torvalds
2002-07-25  1:54         ` Linux-2.5.28 Bartlomiej Zolnierkiewicz
2002-07-25  3:34         ` Linux-2.5.28 link problem jeff millar
2002-07-26  5:18           ` Linux-2.5.27-28 "undefined reference to local symbols in discarded section .text.exit" jeff millar
2002-07-27 13:53             ` 2.5.27-28-29 linker error: " jeff millar
2002-07-26  5:24           ` Linux-2.5.28 link problem Adrian Bunk
2002-07-25  9:21         ` Linux-2.5.28 Daniel Egger
2002-07-27 23:57         ` Linux-2.5.28 Andries Brouwer
2002-07-28  2:02           ` Linux-2.5.28 Alan Cox
2002-07-28  2:47           ` Linux-2.5.28 Linus Torvalds
2002-07-28  4:40             ` Linux-2.5.28 Linus Torvalds
2002-07-28  4:47               ` Linux-2.5.28 Larry McVoy
2002-07-28 12:50               ` Linux-2.5.28 Bartlomiej Zolnierkiewicz
2002-07-28 15:11             ` Linux-2.5.28 Andries Brouwer
2002-07-28  2:47           ` Linux-2.5.28 Greg KH
2002-07-28 15:56             ` Linux-2.5.28 Andries Brouwer
2002-07-28 18:53               ` Linux-2.5.28 Greg KH
2002-07-28 21:13                 ` Linux-2.5.28 Andries Brouwer
2002-07-29 10:16             ` Linux-2.5.28 Marcin Dalecki
2002-07-29 18:15               ` Linux-2.5.28 Greg KH
     [not found]           ` <200207282203.g6SM3KI15155@fachschaft.cup.uni-muenchen.de>
2002-07-28 23:34             ` Linux-2.5.28 Andries Brouwer
2002-07-24 23:06   ` Linux-2.5.28 Jonathan Corbet
2002-07-25  5:56     ` Linux-2.5.28 Jens Axboe
2002-07-25  7:36       ` Linux-2.5.28 Marcin Dalecki
2002-07-24 22:43 ` Linux-2.5.28 Russell King
2002-07-24 23:02   ` Linux-2.5.28 Linus Torvalds
2002-07-24 23:55   ` Linux-2.5.28 Skip Ford
2002-07-24 23:15 ` Linux-2.5.28 Dave Jones
2002-07-24 23:19   ` Linux-2.5.28 Linus Torvalds
2002-07-25 10:16   ` Linux-2.5.28 Alexander Hoogerhuis
2002-07-25  0:37 ` i810_audio.c cli/sti fix Greg KH
2002-07-25  1:17   ` Linus Torvalds
2002-07-25  6:01     ` Greg KH
2002-07-25  6:19       ` cli-sti-removal.txt fixup Greg KH
2002-07-25  7:16         ` Thunder from the hill
2002-07-25  9:40           ` Ingo Molnar
2002-07-25  6:14     ` i810_audio.c cli/sti fix Doug Ledford
2002-07-27  9:10       ` Ingo Molnar
2002-07-27 12:35         ` Alan Cox
2002-07-28  6:13           ` Doug Ledford
2002-07-26  6:03 ` [PATCH] 2.5.28 small REQ_SPECIAL abstraction Marcin Dalecki
2002-07-26 14:38   ` Jens Axboe
2002-07-26 15:09     ` Marcin Dalecki
2002-07-28 19:25       ` Jens Axboe [this message]
2002-07-28 23:32         ` Linus Torvalds
2002-07-29  5:39           ` Jens Axboe
2002-07-29  5:50             ` Linus Torvalds
2002-07-29 10:24         ` Marcin Dalecki
2002-07-29 10:44           ` Jens Axboe
2002-07-29 11:05             ` Marcin Dalecki
2002-07-26  6:48 ` [PATCH] 2.5.28 IDE 102 Marcin Dalecki
2002-07-26  7:10 ` [PATCH] 2.5.28 IDE 103 Marcin Dalecki
2002-07-26  7:23 ` [PATCH] IDE 104 Marcin Dalecki
2002-07-26 10:13   ` Alan Cox
2002-07-26  9:07     ` Marcin Dalecki
2002-07-26 10:46       ` Alan Cox
2002-07-26  9:56         ` Marcin Dalecki
2002-07-26  7:57 ` Linux-2.5.28 Marcin Dalecki
2002-07-26  8:43 ` [PATCH] IDE 106 Marcin Dalecki
2002-07-26 13:34 ` [PATCH] IDE 107 Marcin Dalecki
  -- strict thread matches above, loose matches on Subject: below --
2002-07-28 20:13 [PATCH] 2.5.28 small REQ_SPECIAL abstraction James Bottomley
2002-07-29  5:37 ` Jens Axboe
2002-07-29  5:55   ` Jens Axboe
2002-07-29  6:23     ` Linus Torvalds
2002-07-29  6:34       ` Jens Axboe
2002-07-29  6:58         ` Linus Torvalds
2002-07-29 10:43           ` Jens Axboe
2002-07-29 13:44             ` James Bottomley
2002-07-29 13:50               ` Marcin Dalecki
2002-07-28 23:59 Andries.Brouwer
2002-07-29  0:33 ` Linus Torvalds
2002-07-29  0:52   ` Dave Jones
2002-07-30  0:50 ` Rob Landley

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=20020728212523.A3460@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    --cc=torvalds@transmeta.com \
    /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