lkml.org 
[lkml]   [2018]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nvme-multipath: implement active-active round-robin path selector
From
Date

> @@ -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.

\
 
 \ /
  Last update: 2018-04-04 14:39    [W:0.122 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site