[PATCH WIP/RFC v2 6/6] nvme-rdma: use ib_client API to detect device removal
Sagi Grimberg
sagi at grimberg.me
Tue Aug 30 08:56:13 PDT 2016
>> Will this code work?
>>
>> mutex_lock(&nvme_rdma_ctrl_mutex);
>> list_for_each_entry(ctrl, &nvme_rdma_ctrl_list, list) {
>> if (ctrl->device->dev != ib_device)
>> continue;
>>
>> __nvme_rdma_del_ctrl(ctrl);
>> }
>> mutex_unlock(&nvme_rdma_ctrl_mutex);
>>
>> flush_workqueue(nvme_rdma_wq);
>
> I'll try this. It is cleaner/easier to understand.
>
> I'm also moving the controller list to per-device as Christoph recommends.
I'm still not sure if it's a real must. This will only save us the
condition (as we'll get the device in the client data)
More information about the Linux-nvme
mailing list