[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 4 Apr 2018 15:39:02 +0300
From: Sagi Grimberg <sagi@...mberg.me>
To: Baegjae Sung <baegjae@...il.com>, keith.busch@...el.com,
axboe@...com, hch@....de
Cc: linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme-multipath: implement active-active round-robin path
selector
> @@ -85,7 +121,14 @@ static blk_qc_t nvme_ns_head_make_request(struct request_queue *q,
> int srcu_idx;
>
> srcu_idx = srcu_read_lock(&head->srcu);
> - ns = nvme_find_path(head);
> + switch (head->mpath_policy) {
> + case NVME_MPATH_ROUND_ROBIN:
> + ns = nvme_find_path_rr(head);
> + break;
> + case NVME_MPATH_ACTIVE_STANDBY:
> + default:
> + ns = nvme_find_path(head);
> + }
If we grow multiple path selectors, would be more elegant to
use a callout mechanism.
Powered by blists - more mailing lists