lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/10] block: pass around REQ_* flags instead of broken down booleans during request alloc/free
Hello,

On Wed, Oct 19, 2011 at 09:44:24AM -0400, Vivek Goyal wrote:
> > static struct request *
> > -blk_alloc_request(struct request_queue *q, int flags, int priv, gfp_t gfp_mask)
> > +blk_alloc_request(struct request_queue *q, unsigned int flags, gfp_t gfp_mask)
> > {
> > struct request *rq = mempool_alloc(q->rq.rq_pool, gfp_mask);
> >
> > @@ -586,12 +586,10 @@ blk_alloc_request(struct request_queue *q, int flags, int priv, gfp_t gfp_mask)
> >
> > rq->cmd_flags = flags | REQ_ALLOCED;
> >
> > - if (priv) {
> > - if (unlikely(elv_set_request(q, rq, gfp_mask))) {
> > - mempool_free(rq, q->rq.rq_pool);
> > - return NULL;
> > - }
> > - rq->cmd_flags |= REQ_ELVPRIV;
>
> Don't we need to set REQ_ELVPRIV in rq->cmd_flags in this new code?

The caller is now supposed to set REQ_ELVPRIV in @flags if it wants
elevator initialized, so the above "rq->cmd_flags = flags | REQ_ALLOCED"
should be enough.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-10-19 18:35    [W:0.112 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site