From: Jeff Garzik <jeff@garzik.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@suse.de>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] SCSI queuecommand API change for 2.6.37-rc1
Date: Fri, 12 Nov 2010 21:03:07 -0500 [thread overview]
Message-ID: <4CDDF1DB.1020707@garzik.org> (raw)
In-Reply-To: <AANLkTinj2BM2eGo2yyfzs=t+nu79WLW_bGYota9sDZwH@mail.gmail.com>
On 11/12/2010 08:42 PM, Linus Torvalds wrote:
> On Fri, Nov 12, 2010 at 3:55 PM, James Bottomley
> <James.Bottomley@suse.de> wrote:
>>
>> This patch set contains a single patch modifying the SCSI queuecommand
>> host template API to go from being called with the host lock held to
>> being called locklessly. The transformation is a directly equivalent
>> one (i.e. the locking is simply pushed into each HBA) but will form the
>> basis for optimising locking in the driver patch for the next merge
>> window.
>
> Ok, so we talked about this patch at the KS, but I never saw it.
>
> And now seeing it, I do detest it.
>
> Why? Because if some driver gets missed for any reason (notably if
> it's currently out of tree, and gets merged later), afaik there will
> be ABSOLUTELY ZERO compiler warnings or anything about it, because you
> kept the "queuecommand" function exactly the same. Whether it's a
> locked or non-locked one, it always is of type
[...]
> So please: when you change the semantics of a function, just change
> the function prototype (or function name) at the same time. Especially
> when it comes to a driver interface, so that the drivers don't get
> taken by surprise.
>
> Type safety and automatic compiler warnings really are our friends.
> Especially when the patch was presumably mostly auto-generated, and
> maybe the script missed something, and missing some conversion has
> such subtle effects.
That is precisely what I mentioned in the original patch:
http://marc.info/?l=linux-ide&m=128891665713984&w=2
And brought this up again when James merged my patch:
http://marc.info/?l=linux-scsi&m=128943169802009&w=2
I even volunteer[ed] to do the work to make it happen...
Jeff
P.S. My patch was not auto-generated. One of the two previous attempts
at this change was scripted w/ coccinelle, and it created obvious
locking problems.
next prev parent reply other threads:[~2010-11-13 2:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 23:55 [GIT PULL] SCSI queuecommand API change for 2.6.37-rc1 James Bottomley
2010-11-13 0:38 ` Nicholas A. Bellinger
2010-11-13 1:42 ` Linus Torvalds
2010-11-13 2:03 ` Jeff Garzik [this message]
2010-11-13 2:09 ` Jeff Garzik
2010-11-13 2:30 ` Linus Torvalds
2010-11-13 4:28 ` Matthew Wilcox
2010-11-13 4:42 ` Linus Torvalds
2010-11-13 5:26 ` Jeff Garzik
2010-11-13 6:01 ` James Bottomley
2010-11-13 6:07 ` Jeff Garzik
2010-11-13 7:18 ` Nicholas A. Bellinger
2010-11-16 6:57 ` Jeff Garzik
2010-11-16 7:08 ` Jeff Garzik
2010-11-13 5:16 ` [PATCH v4] SCSI host lock push-down Jeff Garzik
2010-11-13 6:01 ` Jeff Garzik
2010-11-16 7:10 ` [PATCH v5] " Jeff Garzik
2010-11-16 7:31 ` Jeff Garzik
2010-11-16 17:25 ` Linus Torvalds
2010-11-16 17:36 ` James Bottomley
2010-11-16 21:30 ` Linus Torvalds
2010-11-16 21:32 ` James Bottomley
2010-11-16 21:26 ` Jeff Garzik
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=4CDDF1DB.1020707@garzik.org \
--to=jeff@garzik.org \
--cc=James.Bottomley@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=torvalds@linux-foundation.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).