public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: Hugh Daschbach <hdasch@broadcom.com>,
	Chandra Seetharaman <sekharan@us.ibm.com>,
	Eddie Williams <Eddie.Williams@steeleye.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH] Don't change direction flags in struct request.
Date: Wed, 03 Mar 2010 15:59:50 +0530	[thread overview]
Message-ID: <1267612190.15025.60.camel@mulgrave.site> (raw)
In-Reply-To: <4B8CC43D.9000108@cs.wisc.edu>

On Tue, 2010-03-02 at 01:54 -0600, Mike Christie wrote:
> On 03/01/2010 11:26 PM, James Bottomley wrote:
> > On Thu, 2010-03-18 at 22:31 -0700, Hugh Daschbach wrote:
> >> The EMC multipath device handler should not change the I/O direction
> >> flags of its trespass command request.
> >>
> >> The CFQ elevator may BUG if the direction flags on an I/O request are
> >> changed after allocation.  cfq_set_request() and cfq_put_request()
> >> count READ and WRITE requests separately.  Changing the I/O request
> >> direction after blk_get_request() allocates the request throws off
> >> this CFQ accounting.
> >
> > This description doesn't really match what the problem seems to be
> > below:
> >
> >> Signed-off-by: Hugh Daschbach<hdasch@broadcom.com>
> >> ---
> >>   drivers/scsi/device_handler/scsi_dh_emc.c |    8 ++++----
> >>   1 files changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
> >> index 6196675..3709342 100644
> >> --- a/drivers/scsi/device_handler/scsi_dh_emc.c
> >> +++ b/drivers/scsi/device_handler/scsi_dh_emc.c
> >> @@ -269,10 +269,12 @@ static struct request *get_req(struct scsi_device *sdev, int cmd,
> >>   				unsigned char *buffer)
> >>   {
> >>   	struct request *rq;
> >> +	int mode = READ;
> >>   	int len = 0;
> >>
> >> -	rq = blk_get_request(sdev->request_queue,
> >> -			(cmd == MODE_SELECT) ? WRITE : READ, GFP_NOIO);
> >> +	if (cmd == MODE_SELECT || cmd == MODE_SELECT_10)
> >> +		mode = WRITE;
> >> +	rq = blk_get_request(sdev->request_queue, mode, GFP_NOIO);
> >
> > So the actual bug is failure to set WRITE for MODE_SELECT_10.
> >
> 
> I think we have a fix for this and some len issues in that module that 
> was sent here:
> http://marc.info/?l=linux-scsi&m=125978574800618&w=2

Yes, you did ... the need to change the From: field caused me to mark it
in a different way and ultimately lose it ... I'll add it this time ...

James

  reply	other threads:[~2010-03-03 10:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02  0:04 PROBLEM: kernel BUG at block/cfq-iosched.c:3402 Hugh Daschbach
2010-03-02  0:04 ` [PATCH] Don't change direction flags in struct request Hugh Daschbach
2010-03-02  0:04 ` Hugh Daschbach
2010-03-02  5:26   ` James Bottomley
2010-03-02  7:54     ` Mike Christie
2010-03-03 10:29       ` James Bottomley [this message]
2010-03-12 22:04   ` Mike Christie
2010-03-12 22:26     ` Hugh Daschbach
2010-03-19  2:21     ` Hugh Daschbach
2010-03-02  0:20 ` PROBLEM: kernel BUG at block/cfq-iosched.c:3402 Dmitry Torokhov

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=1267612190.15025.60.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=Eddie.Williams@steeleye.com \
    --cc=hare@suse.de \
    --cc=hdasch@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=sekharan@us.ibm.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