Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3f7c939 authored by Josef Bacik's avatar Josef Bacik Committed by Jens Axboe
Browse files

nbd: update size when connected



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: 639812a1 ("nbd: don't set the device size until we're connected")
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8364da47
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -246,6 +246,8 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize,
	struct nbd_config *config = nbd->config;
	config->blksize = blocksize;
	config->bytesize = blocksize * nr_blocks;
	if (nbd->task_recv != NULL)
		nbd_size_update(nbd);
}

static void nbd_complete_rq(struct request *req)