On Tue, Oct 18, 2022 at 12:06:41PM +0300, Sagi Grimberg wrote: >> + /* >> + * Mark the disk dead to prevent new opens, and set the capacity to 0 >> + * to end buffered writers dirtying pages that can't be synced. >> + */ >> blk_mark_disk_dead(ns->disk); >> - nvme_start_ns_queue(ns); >> - >> set_capacity_and_notify(ns->disk, 0); >> + >> + /* forcibly unquiesce queues to avoid blocking dispatch */ >> + nvme_start_ns_queue(ns); >> } > > If we no longer have this ordering requirement, then I don't see why > the unquiesce cannot move before or after nvme_set_queue_dying and apply > a tagset-wide quiesce/unquiesce... Yes. After this patch we can simply do the tagset-wide unquiesce after the loop calling blk_mark_disk_dead and set_capacity_and_notify. We can then also move the NЅ_DEAD flag to the controller..