namespace's request queue is frozen and quiesced during error recovering, writeback IO is blocked in bio_queue_enter(), so fsync_bdev() <- del_gendisk() can't move on, and causes IO hang. Removal could be from sysfs, hard unplug or error handling.
Fix this kind of issue by marking controller as DEAD if removal breaks error recovery.
This ways is reasonable too, because controller can't be recovered any more after being removed.
This looks fine to me Ming, Reviewed-by: Sagi Grimberg sagi@grimberg.me
I still want your patches for tcp/rdma that move the freeze. If you are not planning to send them, I swear I will :)