[PATCHv2] nvme: add 'iopolicy' module parameter

Hannes Reinecke hare at suse.de
Mon Dec 20 01:27:32 PST 2021


On 12/17/21 7:03 PM, Daniel Wagner wrote:
> On Fri, Dec 17, 2021 at 04:02:22PM +0100, Hannes Reinecke wrote:
>> +static int iopolicy = NVME_IOPOLICY_NUMA;
>> +module_param(iopolicy, int, 0444);
>> +MODULE_PARM_DESC(iopolicy,
>> +	"Default multipath I/O policy; 0 - NUMA (default), 1 - Round-robin");
>> +
>> +void nvme_mpath_default_iopolicy(struct nvme_subsystem *subsys)
>> +{
>> +	subsys->iopolicy = iopolicy;
> 
> Wouldn't make sense to check if iopolicy has a valid value too?
> 
At this time it doesn't matter, as the only values we're checking of are 
'0' or '1' (or, rather, any non-zero value).
But yeah, one probably should check here.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list