Thread (8 messages) 8 messages, 3 authors, 2016-08-02
STALE3637d

[PATCH v3] nvmet-rdma: Correctly handle RDMA device hot removal

From: sagi@grimberg.me (Sagi Grimberg)
Date: 2016-08-01 11:30:37
Also in: linux-rdma

This looks reasonable to me, but a little question below:
quoted
@@ -1442,7 +1491,8 @@ static void nvmet_rdma_remove_port(struct nvmet_port *port)
 {
 	struct rdma_cm_id *cm_id = port->priv;

-	rdma_destroy_id(cm_id);
+	if (cm_id)
+		rdma_destroy_id(cm_id);
 }
How is ->remove_port synchronized vs the RDMA/CM even handler?
Easy, it isn't :)

So we have three choices here:
1. Add a lock in nvmet_port that only rdma will use for now (don't like
it)
or
2. Add nvmet_rdma_port as nvmet_port->priv with a lock (don't like it)
or
3. take the global nvmet_config_sem (hate it)

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