]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
nbd: don't update block size after device is started
authorMing Lei <ming.lei@redhat.com>
Wed, 28 Oct 2020 07:24:34 +0000 (15:24 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:06:05 +0000 (12:06 +0100)
commit11538003bde871e04d2e8f7f58622d89c9e81395
treea1fda39f82fb3a431c392de0b2b71b4ed821112d
parentc2e72a4b3d557fe0c4c052c402df5ca3a72e12e4
nbd: don't update block size after device is started

BugLink: https://bugs.launchpad.net/bugs/1905618
[ Upstream commit b40813ddcd6bf9f01d020804e4cb8febc480b9e4 ]

Mounted NBD device can be resized, one use case is rbd-nbd.

Fix the issue by setting up default block size, then not touch it
in nbd_size_update() any more. This kind of usage is aligned with loop
which has same use case too.

Cc: stable@vger.kernel.org
Fixes: c8a83a6b54d0 ("nbd: Use set_blocksize() to set device blocksize")
Reported-by: lining <lining2020x@163.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Jan Kara <jack@suse.cz>
Tested-by: lining <lining2020x@163.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/block/nbd.c