Thread (7 messages) 7 messages, 3 authors, 2021-08-24

Re: [PATCH v3] nvme: revalidate paths during rescan

From: Daniel Wagner <hidden>
Date: 2021-08-24 13:45:01
Also in: lkml

On Mon, Aug 23, 2021 at 10:16:23AM -0700, Sagi Grimberg wrote:
quoted
+void nvme_mpath_revalidate_paths(struct nvme_ns *ns)
+{
+	struct nvme_ns_head *head = ns->head;
+	sector_t capacity = get_capacity(head->disk);
+	int node;
+
+	for_each_node(node)
+		rcu_assign_pointer(head->current_path[node], NULL);
+
+	list_for_each_entry_rcu(ns, &head->list, siblings) {
+		if (capacity != get_capacity(ns->disk))
+			clear_bit(NVME_NS_READY, &ns->flags);
+	}
Shouldn't the null setting to current_path come after
we clear NVME_NS_READY on the ns? Otherwise we may still
submit and current_path will be populated with the ns
again...
Ahh, I got it this time! Yes, you are right. I think Christoph has
dropped this patch from the nvme-5.15 queue anyway. I'll resend a new
version with the order changed.

Daniel

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help