]> git.baikalelectronics.ru Git - 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)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Oct 2020 13:25:43 +0000 (07:25 -0600)
commit1cb38d5e655d68fb293cc9689710176ad13de29a
treeb2562d2892b8ff2ea7790c8fa4b6ec925eec9986
parent994f7923ff5840c0ecd1938e12b6baa7dfbed529
nbd: don't update block size after device is started

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: 2e72031e35e4 ("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>
drivers/block/nbd.c