Re: [PATCH v7 5/8] nbd: skip queue freeze when setting size at device startup
"yu kuai" <[email protected]> Wed, 5 Aug 2026 16:37:29 +0800
| Newsgroups | org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
在 2026/8/5 14:58, Yang Erkun 写道:
> Commit 242a49e5c878 ("nbd: freeze the queue for queue limits updates")
> added the freeze to keep in-flight commands from seeing
> torn queue_limits. But at startup the capacity is still 0
> (invalidate_disk cleared it) and the write cache is off (the previous
> patch cleared it on disconnect, and nbd_set_size sets it back only after
> the commit), so submit_bio_noacct() rejects any bio before it reaches
> the driver and no I/O is in flight. Drop the freeze by checking
> capacity and write cache state in nbd_set_size.
>
> Signed-off-by: Yang Erkun<[email protected]>
> ---
> drivers/block/nbd.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Yu Kuai <[email protected]>
--
Thanks,
Kuai