lkml.org 
[lkml]   [2014]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] blk-mq: replace blk_mq_init_commands with a ->init_request method
On Wed, Mar 19, 2014 at 11:08:20AM +0800, Ming Lei wrote:
> > + blk_rq_init(q, q->flush_rq);
> > + if (reg->cmd_size)
> > + q->flush_rq->special =
> > + blk_mq_rq_to_pdu(q->flush_rq);
> > +
> > + if (reg->ops->init_request(driver_data,
> > + NULL, q->flush_rq, -1))
> > + goto err_flush_rq;
> > + }
>
> The above looks a bit weird because q->flush_rq is invisible to
> driver and should always be initialized no matter if driver defines
> its .init_request callback or not.

You mean the blk_rq_init? We already do a real initialization before
actually using it, it's just there to prevent passing a half-initialized
one to the driver.



\
 
 \ /
  Last update: 2014-03-19 09:41    [W:0.045 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site