Re: [PATCH v5 07/27] libmultipath: Add sysfs helpers

John Garry <[email protected]>
Newsgroups org.kernel.vger.linux-scsi,dev.linux.lists.sashiko-reviews
Organization Oracle Corporation
Message-ID <[email protected]>
On 27/07/2026 16:03, [email protected] wrote:
>> +bool mpath_iopolicy_store(enum mpath_iopolicy_e *iopolicy, const char *buf)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < ARRAY_SIZE(mpath_iopolicy_names); i++) {
>> +		if (sysfs_streq(buf, mpath_iopolicy_names[i])) {
>> +			mpath_iopolicy_update(iopolicy, i);
>> +			return true;
>> +		}
>> +	}
>> +
>> +	return false;
>> +}
> [Severity: Medium]
> When updating the multipath iopolicy via mpath_iopolicy_store(), does this
> leave stale paths in the current_path arrays?
> 
> If the policy is changed (e.g., from round-robin to NUMA), the policy enum is
> updated but the cached current_path is not cleared. When mpath_numa_path()

It is the job of the driver to do any path clearing or similar - see 
scsi_mpath_device_iopolicy_store()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.