[PATCH V6 5/5] nvme: centralize setting req end_io_data

Christoph Hellwig hch at lst.de
Thu Nov 5 02:28:56 EST 2020


On Wed, Nov 04, 2020 at 02:17:05PM -0800, Sagi Grimberg wrote:
>> The host side code allocates the request in several places using
>> nvme_alloc_request() and initialises the allocated request->end_io_data,
>> which repeats the code and will have duplicate code in the future.
>>
>> Add an end_io_data request parameter which initializes the block
>> layer request in nvme_alloc_request(), update the respective callers
>> and remove the duplicate code.
>
> There are less callers that actually put something there so not sure
> if this is an improvement.. The alloc signature is getting kinda bloated
> now...

Yes, I don't really see the point - the request is available to the
caller, so they can trivially assign it.



More information about the Linux-nvme mailing list