Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2019-09-10 09:23:09 +0200
committerHannes Reinecke <hare@suse.de>2019-09-10 09:23:09 +0200
commit6528cae766079909d5b82f71ec10bfbb1740dcd8 (patch)
treea3c48e8895617d16a963e5e4c1cc654d44870f6b
parent36f14300399b7e0eccd59486f28840ba3878413a (diff)
- nvme-multipath: relax ANA state check (bsc#1123105).
- Delete patches.suse/nvme-schedule-requeue-whenever-a-LIVE-state-is-enter.patch. suse-commit: b1415e9bd97fd7f04909473a67ee0e1d1fbd7ce1
-rw-r--r--drivers/nvme/host/multipath.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 70ae22569947..a133e22392cc 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -364,6 +364,8 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
dev->groups = nvme_ns_id_attr_groups;
device_add_disk(&head->subsys->dev, head->disk);
}
+
+ kblockd_schedule_work(&ns->head->requeue_work);
}
static int nvme_parse_ana_log(struct nvme_ctrl *ctrl, void *data,
@@ -414,19 +416,13 @@ static inline bool nvme_state_is_live(enum nvme_ana_state state)
static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc,
struct nvme_ns *ns)
{
- enum nvme_ana_state old;
-
mutex_lock(&ns->head->lock);
- old = ns->ana_state;
ns->ana_grpid = le32_to_cpu(desc->grpid);
ns->ana_state = desc->state;
clear_bit(NVME_NS_ANA_PENDING, &ns->flags);
- if (nvme_state_is_live(ns->ana_state)) {
- if (!nvme_state_is_live(old))
- nvme_mpath_set_live(ns);
- kblockd_schedule_work(&ns->head->requeue_work);
- }
+ if (nvme_state_is_live(ns->ana_state))
+ nvme_mpath_set_live(ns);
mutex_unlock(&ns->head->lock);
}
@@ -609,7 +605,6 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
mutex_lock(&ns->head->lock);
ns->ana_state = NVME_ANA_OPTIMIZED;
nvme_mpath_set_live(ns);
- kblockd_schedule_work(&ns->head->requeue_work);
mutex_unlock(&ns->head->lock);
}
}