Re: [PATCH] blk-mq: use NOIO context to prevent deadlock during debugfs creation

From: Ming Lei

Date: Thu Feb 12 2026 - 23:44:30 EST


On Thu, Feb 12, 2026 at 04:01:35PM +0800, Yu Kuai wrote:
> Creating debugfs entries can trigger fs reclaim, which can enter back
> into the block layer request_queue. This can cause deadlock if the
> queue is frozen.
>
> Previously, a WARN_ON_ONCE check was used in debugfs_create_files()
> to detect this condition, but it was racy since the queue can be frozen
> from another context at any time.

debugfs lock doesn't depend on queue freeze, so the implied deadlock isn't
obvious.

Can you explain a bit why freeze from another context may cause dead lock?


Thanks,
Ming