[PATCHv2 0/3] nvme: rework __nvme_submit_sync_cmd()

Jens Axboe axboe at kernel.dk
Wed Feb 8 07:30:53 PST 2023


On 2/8/23 8:17?AM, Hannes Reinecke wrote:
> Hi all,
> 
> as Jens and hch complained about the argument list to __nvme_submit_sync_cmd()
> getting too long, here's now a patchset to clean things up.
> The first patch is to split off __nvme_alloc_rq() from __nvme_submit_sync_cmd(),
> which serves to reduce the number of arguments; it's also a nice cleanup as this
> function can be utilized to replace some open-coded versions.
> The second patch is to introduce a 'retry' argument to __nvme_alloc_rq(), to
> indicate whether retries for this command should be allowd.
> And the third is another cleanup; the 'at_head' argument to __nvme_submit_sync_cmd()
> really should be a boolean, as it can take only two values, and it's being
> converted into a boolean within __nvme_submit_sync_cmd() anyway.

This looks WAY better than piling on to __nvme_submit_sync_cmd(). I
haven't taken a closer look yet, just a note that I'd reorder patch 2
and 3 so that you just have two prep patches and then the final patch is
what you really wanted to do. Doing cleanup, change, cleanup is a bit
odd.

-- 
Jens Axboe



More information about the Linux-nvme mailing list