From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] blk-mq: replace blk_mq_init_commands with a ->init_request method
Date: Wed, 19 Mar 2014 00:54:28 -0700 [thread overview]
Message-ID: <20140319075428.GA25529@infradead.org> (raw)
In-Reply-To: <CACVXFVMsFzyiR5gqyGk6jc0pRZP-3CZSvxr+oi36umVWJPjWZw@mail.gmail.com>
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.
next prev parent reply other threads:[~2014-03-19 7:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 13:18 [PATCH 0/4] blk-mq updates Christoph Hellwig
2014-03-17 13:18 ` [PATCH 1/4] blk-mq: fix blk_mq_end_io_partial Christoph Hellwig
2014-03-17 13:18 ` [PATCH 2/4] blk-mq: initialize resid_len Christoph Hellwig
2014-03-17 13:18 ` [PATCH 3/4] blk-mq: replace blk_mq_init_commands with a ->init_request method Christoph Hellwig
2014-03-19 3:08 ` Ming Lei
2014-03-19 7:54 ` Christoph Hellwig [this message]
2014-03-19 8:48 ` Ming Lei
2014-03-19 16:08 ` Christoph Hellwig
2014-03-17 13:18 ` [PATCH 4/4] blk-mq: add a exit_request method Christoph Hellwig
2014-03-19 5:22 ` Ming Lei
2014-03-19 7:56 ` Christoph Hellwig
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=20140319075428.GA25529@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.leiming@gmail.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