]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nbd: update size when connected
authorJosef Bacik <jbacik@fb.com>
Wed, 16 May 2018 18:51:18 +0000 (14:51 -0400)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 9 Nov 2018 19:00:19 +0000 (17:00 -0200)
commite08b4e5f8207f657ed3abe2df93a0300f1b86427
tree3bfc93d3ce82e4c8e4f3b0b8116d78c570a14518
parent1f9267eee8aac3359711a101dada57d8f92fd7e0
nbd: update size when connected

BugLink: http://bugs.launchpad.net/bugs/1800537
commit c3f7c9397609705ef848cc98a5fb429b3e90c3c4 upstream.

I messed up changing the size of an NBD device while it was connected by
not actually updating the device or doing the uevent.  Fix this by
updating everything if we're connected and we change the size.

cc: stable@vger.kernel.org
Fixes: 639812a ("nbd: don't set the device size until we're connected")
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