[PATCH] nvme-rdma: stop keep_alive before nvme_uninit_ctrl

Christoph Hellwig hch at lst.de
Wed Jul 5 10:41:08 PDT 2017


This idea looks fine - please send it out in a separate thread.

A few minor comments below:

> -void nvme_uninit_ctrl(struct nvme_ctrl *ctrl)
> +void __nvme_stop_ctrl(struct nvme_ctrl *ctrl)
>  {
> +       nvme_stop_keep_alive(ctrl);
>         flush_work(&ctrl->async_event_work);
>         flush_work(&ctrl->scan_work);
> +}
> +EXPORT_SYMBOL_GPL(__nvme_stop_ctrl);

I don't really like the __nvme_stop_ctrl name for something that
is called all the time.  I think this should be nvme_stop_ctrl.

> +
> +void nvme_stop_ctrl(struct nvme_ctrl *ctrl)
> +{
> +       __nvme_stop_ctrl(ctrl);
>         nvme_remove_namespaces(ctrl);
> +}
> +EXPORT_SYMBOL_GPL(nvme_stop_ctrl);

And then this becomes nvme_remove_ctrl?

> +       nvme_start_ctrl(&ctrl->ctrl);
> +       if (ctrl->ctrl.queue_count > 1)
>                 nvme_start_queues(&ctrl->ctrl);

Maybe add a nvme_restart_ctrl for this always duplicated sequence?



More information about the Linux-nvme mailing list