[PATCH 5/5] nvme: Add two-pass shutdown support.

Sagi Grimberg sagi at grimberg.me
Thu Jan 4 05:14:16 PST 2024


On 1/3/24 23:04, Jeremy Allison wrote:
> This works with the two-pass shutdown mechanism setup for the PCI
> drivers and participates to provide the shutdown_wait
> method at the pci_driver structure level.
> 
> Adds the new NVME_DISABLE_SHUTDOWN_ASYNC to enum shutdown_type.
> Changes the nvme shutdown() method to set the
> NVME_CC_SHN_NORMAL bit and then return to the caller when
> requested by NVME_DISABLE_SHUTDOWN_ASYNC.
> 
> nvme_shutdown_wait() is added to synchronously wait for
> the NVME_CSTS_SHST_CMPLT bit.
> 
> This change speeds up the shutdown in a system which hosts
> many controllers.

I think that patch 4 can be folded in here.

> 
> Signed-off-by: Jeremy Allison <jallison at ciq.com>
> Signed-off-by: Tanjore Suresh <tansuresh at google.com>



More information about the Linux-nvme mailing list