[PATCH V3 03/10] nvme: centralize queue action nvme_kill_queues()

Keith Busch kbusch at kernel.org
Tue Jul 14 21:36:07 EDT 2020


On Tue, Jul 14, 2020 at 04:30:50PM -0700, Chaitanya Kulkarni wrote:
> There is no point in having 7 different functions which are differing
> with just one line.
> 
> The helper functions for ctrl queue management can be centralized with
> the help of the descriptive enums for action. This avoids code
> duplication which spans across the 7 functions as compare to one
> function and exporting 7 symbols as compare to one symbol.
> 
> This patch merges nvme_kill_queue() into newly introduced
> nvme_queue_act() which handles the queue management.

This should be separate from the xarray conversion part of this series.

And if we're going to collapse these, I would prefer to create a generic
API to iterate namespaces, something like "nvme_ns_iter()" that takes a
callback function parameter.



More information about the Linux-nvme mailing list