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

Benjamin Marzinski bmarzins at redhat.com
Wed Feb 25 19:37:03 PST 2026


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.

-Ben

> +	}
> +}
> +




More information about the Linux-nvme mailing list