Re: [syzbot] [block?] INFO: task hung in blkdev_flush_mapping

From: Edward Adam Davis
Date: Tue Dec 19 2023 - 00:30:25 EST


please test task hung in blkdev_flush_mapping

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5bd7ef53ffe5
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index b6414e1e645b..31656364d8a3 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1394,6 +1394,9 @@ static int nbd_start_device(struct nbd_device *nbd)
}
set_bit(NBD_RT_HAS_PID_FILE, &config->runtime_flags);

+ if (num_connections == 1 && !nbd->tag_set.timeout)
+ nbd->tag_set.timeout = HZ * 1024;
+
nbd_dev_dbg_init(nbd);
for (i = 0; i < num_connections; i++) {
struct recv_thread_args *args;