[PATCH 2/5] nvme-rdma: rework create_ctrl error flow

Sagi Grimberg sagi at grimberg.me
Mon Oct 23 08:25:42 PDT 2017


>> Now that we have nvme_init/uninit_ctrl doing the right thing, we
>> can fix this by making the error sequence sane and simple (just
>> undo what we did until the error).
>>
>> Also, allocate ctrl->queues before calling nvme_init_ctrl, just
>> to separate the driver private resource allocation and the core
>> resource allocations.
> 
> Once we did the init we'll have to do a put and not just free it.
> That will become even more important when using a struct device for
> refcounting the controller.

:(

I want to get to a point where the transports allocate everything they
need in their private struct, and then do nvme common things. This
asymmetric behavior is going hard to keep correct once got right.



More information about the Linux-nvme mailing list