public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Chandra Seetharaman <sekharan@us.ibm.com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: Hannes Reinecke <hare@suse.de>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 6/9] scsi_dh: add generic SPC-3 alua handler
Date: Tue, 01 Jul 2008 11:46:09 -0700	[thread overview]
Message-ID: <1214937969.27507.15.camel@chandra-ubuntu> (raw)
In-Reply-To: <48650C6B.4030404@cs.wisc.edu>


On Fri, 2008-06-27 at 10:51 -0500, Mike Christie wrote:
> Hannes Reinecke wrote:
> > Mike Christie wrote:
> >> Hannes Reinecke wrote:
> >>> +
> >>> +static struct request *get_alua_req(struct scsi_device *sdev,
> >>> +                    void *buffer, unsigned buflen, int rw)
> >>> +{
> >>> +    struct request *rq;
> >>> +    struct request_queue *q = sdev->request_queue;
> >>> +
> >>> +    rq = blk_get_request(q, rw, GFP_KERNEL);
> >>> +
> >>> +    if (!rq) {
> >>> +        sdev_printk(KERN_INFO, sdev,
> >>> +                "%s: blk_get_request failed\n", __FUNCTION__);
> >>> +        return NULL;
> >>> +    }
> >>> +
> >>> +    if (buflen && blk_rq_map_kern(q, rq, buffer, buflen, GFP_KERNEL)) {
> >>> +        blk_put_request(rq);
> >>> +        sdev_printk(KERN_INFO, sdev,
> >>> +                "%s: blk_rq_map_kern failed\n", __FUNCTION__);
> >>> +        return NULL;
> >>> +    }
> >>> +
> >>> +    rq->cmd_type = REQ_TYPE_BLOCK_PC;
> >>> +    rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE;
> >>> +    rq->retries = ALUA_FAILOVER_RETRIES;
> >>> +    rq->timeout = ALUA_FAILOVER_TIMEOUT;
> >>> +
> >>> +    return rq;
> >>> +}
> >>
> >>
> >> It looks like this can be called from alua_activate, and we cannot use 
> >> GFP_KERNEL in the same IO path something could get written to.
> >>
> > Is something like GFP_ATOMIC more appropriate?
> > 
> 
> 
> It will work. I thought we would want to have used GFP_NOIO though since 
> we are running from work queue. I do not know why we have been using 
> GFP_ATOMIC in the other handlers. Chandra?

Mike,

I do not recall discussing about this. But, my memory is not that good
anyways :)...

As it stands now, the current code is all GFP_ATOMIC. I agree with you
that the workqueue allocs could be made GFP_NOIO. I can roll up a patch
(on top of Hannes's) to fix those.

Thanks,

chandra
> 
> 
> Oh yeah, I was wondering what is up with EMC? Do they need a different 
> alua handler? Is that needed to handle some quirks in it or something?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


      reply	other threads:[~2008-07-01 18:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 10:05 [PATCH 6/9] scsi_dh: add generic SPC-3 alua handler Hannes Reinecke
2008-06-26  0:57 ` Chandra Seetharaman
2008-06-26 23:22 ` Mike Christie
2008-06-27 14:33   ` Hannes Reinecke
2008-06-27 14:38     ` James Bottomley
2008-06-27 15:51     ` Mike Christie
2008-07-01 18:46       ` Chandra Seetharaman [this message]

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=1214937969.27507.15.camel@chandra-ubuntu \
    --to=sekharan@us.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.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