]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nbd: use bd_set_size when updating disk size
authorJosef Bacik <jbacik@fb.com>
Wed, 16 May 2018 18:51:19 +0000 (14:51 -0400)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 9 Nov 2018 19:00:20 +0000 (17:00 -0200)
commitc149f85421936cca068d90f33ea7b8783ab2c331
tree8785348ee1e11897b907a353a44a9e5b582eafa2
parente08b4e5f8207f657ed3abe2df93a0300f1b86427
nbd: use bd_set_size when updating disk size

BugLink: http://bugs.launchpad.net/bugs/1800537
commit 9e2b19675d1338d2a38e99194756f2db44a081df upstream.

When we stopped relying on the bdev everywhere I broke updating the
block device size on the fly, which ceph relies on.  We can't just do
set_capacity, we also have to do bd_set_size so things like parted will
notice the device size change.

Fixes: 29eaadc ("nbd: stop using the bdev everywhere")
cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/block/nbd.c