lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Mar 2014 16:48:47 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Jens Axboe <axboe@...nel.dk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] blk-mq: replace blk_mq_init_commands with a
 ->init_request method

On Wed, Mar 19, 2014 at 3:54 PM, Christoph Hellwig <hch@...radead.org> wrote:
> 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.
>

OK.

Actually it doesn't matter because flush_rq will be reinitialized
before using, not like common request. And driver should only
initialize req->special instead of the request itself, maybe it is
better to document the fact.


Thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ