[PATCH 03/13] libmultipath: Add path selection support

John Garry john.g.garry at oracle.com
Thu Feb 26 01:26:02 PST 2026


On 26/02/2026 03:37, Benjamin Marzinski wrote:
> On Wed, Feb 25, 2026 at 03:32:15PM +0000, John Garry wrote:
>> +__maybe_unused
>> +static struct mpath_device *mpath_find_path(struct mpath_head *mpath_head)
>> +{
>> +	enum mpath_iopolicy_e iopolicy =
>> +			mpath_head->mpdt->get_iopolicy(mpath_head);
>> +
>> +	switch (iopolicy) {
>> +	case MPATH_IOPOLICY_QD:
>> +		return mpath_queue_depth_path(mpath_head);
>> +	case MPATH_IOPOLICY_RR:
>> +		return mpath_round_robin_path(mpath_head, iopolicy);
>> +	default:
>> +		return mpath_numa_path(mpath_head, iopolicy);
> When we're in mpath_round_robin_path() and mpath_numa_path(), we know the
> iopolicy, so we don't really need to pass it in.

Sure, I don't need to pass that around.

Thanks!



More information about the Linux-nvme mailing list