Make NVME shutdown two-pass - Version 6

David Jeffery djeffery at redhat.com
Thu Feb 8 10:02:37 PST 2024


On Wed, Feb 7, 2024 at 5:03 PM Jeremy Allison <jra at samba.org> wrote:
>
> On Wed, Feb 07, 2024 at 04:00:48PM -0600, Bjorn Helgaas wrote:
> >On Wed, Feb 07, 2024 at 01:40:39PM -0800, Jeremy Allison wrote:
> >> This is version 6 of a patchset originally written by
> >> Tanjore Suresh <tansuresh at google.com> to make shutdown
> >> of nvme devices two-pass.
...
> >>
> >> NB. An alternate patchset from David Jeffery <djeffery at redhat.com>
> >> has been proposed that covers much of the same ground.
> >
> >Would be useful to have a link to David's patchset for comparison.
>
> Sorry, here it is:
>
> https://lore.kernel.org/linux-nvme/20240207184100.18066-1-djeffery@redhat.com/
>

Hi Jeremy,

I'm fine with merging our efforts. From reviewing your patch set, the
main problem I have is with the core patch compared to my initial 2
patches. Yours runs shutdown_wait calls after shutdown for all
devices. This design won't work for example with the scsi system sd
async shutdown. Scsi HBA shutdown calls may stop the HBA or firmware,
leaving the async flush for sd in an unknowable state as to if the
command succeeded or even made it to storage. My patches by ensuring
all shutdown for child devices is finished before a parent device's
shutdown may be called allows the ordering to work.

I'm not attached to a particular async API. If nvme and core devs are
fine with the shutdown_wait api, I can alter my core shutdown and
scsi/sd patches to match.

David Jeffery




More information about the Linux-nvme mailing list