[PATCH v2 1/2] nvme: switch to RCU freeing the namespace

Christoph Hellwig hch at lst.de
Mon May 23 03:38:58 PDT 2016


On Fri, May 20, 2016 at 10:16:50AM -0400, Keith Busch wrote:
> +static int nvme_reset_ctrl(struct nvme_ctrl *ctrl)
> +{
> +	ctrl->state = NVME_CTRL_NEW;

Please always go through nvme_change_ctrl_state for state machine
changes - this function documents the possible ѕtate transitions.

Also I don't think returning to state called _new is a good idea,
I'd rather have a different name for a state like that.  That being
said I thinkg we absolutely need a state for the time between
scheduling a reset and changing the state to NVME_CTRL_RESETTING
in nvme_reset_work.  I just can't think of a really food name for it.
NVME_CTRL_PRE_RESET?  NVME_CTRL_RESET_PENDING?



More information about the Linux-nvme mailing list