Thread (46 messages) 46 messages, 6 authors, 2018-06-05

RE: [PATCH 08/14] nvmet: implement the changed namespaces log

From: Verkamp, Daniel <hidden>
Date: 2018-05-29 16:59:05
Also in: linux-nvme

 [...]
+static void nvmet_add_to_changed_ns_log(struct nvmet_ctrl *ctrl, u32 nsi=
d)
+{
+	mutex_lock(&ctrl->lock);
+	if (ctrl->nr_changed_ns < NVME_MAX_CHANGED_NAMESPACES) {
+		ctrl->changed_ns_list[ctrl->nr_changed_ns++] =3D
+			cpu_to_le32(nsid);
+	} else if (ctrl->nr_changed_ns =3D=3D NVME_MAX_CHANGED_NAMESPACES) {
+		ctrl->changed_ns_list[0] =3D cpu_to_le32(0xffffffff);
+	}
Unless I'm missing it happening somewhere else, the list-full case that set=
s element 0 to 0xffffffff should also explicitly zero out the rest of the l=
ist to satisfy the "remainder of the list shall be zero-filled" wording in =
the spec, since the other changed_ns_list entries will be filled with non-z=
ero NSIDs when we get here.

-- Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help