]> git.baikalelectronics.ru Git - 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)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 May 2018 18:54:09 +0000 (12:54 -0600)
commitfcf873cae216c5e3d5aaa16839bd7048d5abf3ae
treee20ae29f7a80b8b2b28a2356f05bf4b77941dcbf
parent6590f67763cc683983bf4788bef4ef7e3dd142c9
nbd: use bd_set_size when updating disk size

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