Page MenuHomeFreeBSD

nvme: delete the I/O queues in the system shutdown path
Needs ReviewPublic

Authored by seuros on Sun, Sep 13, 9:19 AM.
Referenced Files
F171864010: D59633.diff
Mon, Sep 14, 4:29 AM
Unknown Object (File)
Sun, Sep 13, 11:54 AM
Unknown Object (File)
Sun, Sep 13, 11:48 AM
Subscribers
None

Details

Reviewers
imp
adrian
dab
Summary

A normal shutdown deletes all I/O submission and completion queues
before setting CC.SHN, as the suspend path already does. The
device_shutdown path went straight to the shutdown notification with
the queues live, which some drives take slowly or record as an
unclean stop. Skipped the deletion for failed, removed, or
never-initialized controllers.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 76823
Build 73706: arc lint + arc unit

Event Timeline

seuros created this revision.

I love it... if it works. You may need to move it later for my suggested test to success.

sys/dev/nvme/nvme.c
55

This might need to be in a shutdown handler.

The way to test is to see if we can still take a kernel crash dump to an NVMe drive on panic... Use the sysctl to panic knob to test :).