Re: [PATCH 3/3] block: use blk_mq_no_io() for avoiding lock dependency

Nilay Shroff
2025-04-02T13:44:10Z

On 4/2/25 10:08 AM, Ming Lei wrote:
> Use blk_mq_no_io() to prevent IO from entering queue for avoiding lock
> dependency between freeze lock and elevator lock, and we have got many
> such reports:
>
> Reported-by: syzbot+4c7e0f9b94ad65811efb@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/linux-block/67e6b425.050a0220.2f068f.007b.GAE@google.com/
> Reported-by: Valdis Klētnieks <valdis.kletnieks@vt.edu>
> Closes: https://lore.kernel.org/linux-block/7755.1743228130@turing-police/#t
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

I tested this series on my system and this works well as we cut dependency
between ->elevator_lock and ->freeze_lock. However don't we plan to now
model blk_mq_enter_no_io and blk_mq_exit_no_io as lock/unlock for supporting
lockdep? Maybe we don't.

Overall changes looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>