Re: [PATCH 6/8] nvme: move the NS_DEAD flag to the controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




-
+    if (!test_and_set_bit(NVME_CTRL_NS_DEAD, &ctrl->flags)) {
+        list_for_each_entry(ns, &ctrl->namespaces, list)
+            nvme_set_queue_dying(ns);
+    }

Looking at it now, I'm not sure I understand the need for this flag. It
seems to make nvme_kill_queues reentrant safe, but the admin queue
unquiesce can still end up unbalanced under reentrance?

How is this not broken today (or ever since quiesce/unquiesce started
accounting)? Maybe I lost some context on the exact subtlety of how
nvme-pci uses this interface...

Yes, this also looks weird and I had a TODO list entry for myself
to look into what is going on here.  The whole interaction
with nvme_remove_namespaces is pretty weird to start with,

git blame points to:
0ff9d4e1a284 ("NVMe: Short-cut removal on surprise hot-unplug")

But it is unclear as to why it sits in nvme_remove_namespaces instead
of somewhere before that in nvme_remove()...

Keith?



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux