[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2fbaacc-62a1-4a98-4157-2637b7f242b7@huaweicloud.com>
Date: Sat, 28 Jun 2025 08:48:33 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Ming Lei <ming.lei@...hat.com>, Yu Kuai <yukuai1@...weicloud.com>
Cc: josef@...icpanda.com, axboe@...nel.dk, hch@...radead.org,
nilay@...ux.ibm.com, hare@...e.de, linux-block@...r.kernel.org,
nbd@...er.debian.org, linux-kernel@...r.kernel.org, yi.zhang@...wei.com,
yangerkun@...wei.com, johnny.chenyi@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH] nbd: fix false lockdep deadlock warning
Hi,
在 2025/06/27 19:04, Ming Lei 写道:
> I guess the patch in the following link may be simper, both two take
> similar approach:
>
> https://lore.kernel.org/linux-block/aFjbavzLAFO0Q7n1@fedora/
I this the above approach has concurrent problems if nbd_start_device
concurrent with nbd_start_device:
t1:
nbd_start_device
lock
num_connections = 1
unlock
t2:
nbd_add_socket
lock
config->num_connections++
unlock
t3:
nbd_start_device
lock
num_connections = 2
unlock
blk_mq_update_nr_hw_queues
blk_mq_update_nr_hw_queues
//nr_hw_queues updated to 1 before failure
return -EINVAL
Thanks,
Kuai
Powered by blists - more mailing lists