Skip to content

Commit cc2278c

Browse files
martin-gpyChristoph Hellwig
authored andcommitted
nvme-multipath: relax ANA state check
When undergoing state transitions I/O might be requeued, hence we should always call nvme_mpath_set_live() to schedule requeue_work whenever the nvme device is live, independent on whether the old state was live or not. Signed-off-by: Martin George <marting@netapp.com> Signed-off-by: Gargi Srinivas <sring@netapp.com> Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 988aef9 commit cc2278c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/nvme/host/multipath.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,12 @@ static inline bool nvme_state_is_live(enum nvme_ana_state state)
404404
static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc,
405405
struct nvme_ns *ns)
406406
{
407-
enum nvme_ana_state old;
408-
409407
mutex_lock(&ns->head->lock);
410-
old = ns->ana_state;
411408
ns->ana_grpid = le32_to_cpu(desc->grpid);
412409
ns->ana_state = desc->state;
413410
clear_bit(NVME_NS_ANA_PENDING, &ns->flags);
414411

415-
if (nvme_state_is_live(ns->ana_state) && !nvme_state_is_live(old))
412+
if (nvme_state_is_live(ns->ana_state))
416413
nvme_mpath_set_live(ns);
417414
mutex_unlock(&ns->head->lock);
418415
}

0 commit comments

Comments
 (0)