On Fri, Apr 08, 2022 at 04:25:12PM -0700, Bart Van Assche wrote: > One of the functions in the above call stack is sd_remove(). sd_remove() > calls del_gendisk() just before calling sd_shutdown(). sd_shutdown() > submits the SYNCHRONIZE CACHE command. In del_gendisk() I found the > following comment: "Fail any new I/O". Do you agree that failing new I/O > before sd_shutdown() is called is wrong? Is there any other way to fix this > than moving the blk_queue_start_drain() etc. calls out of del_gendisk() and > into a new function? That SYNCHRONIZE CACHE is a passthrough command sent on the request_queue and should not be affected by stopping all file system I/O.