Patch "nbd: don't set the device size until we're connected" has been added to the 4.13-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
nbd: don't set the device size until we're connected
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nbd-don-t-set-the-device-size-until-we-re-connected.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
639812a1ed9bf49ae2c026086fbf975339cd1eefMon Sep 17 00:00:00 2001
From: Josef Bacik <[email protected]>
Date: Mon, 9 Oct 2017 13:12:10 -0400
Subject: nbd: don't set the device size until we're connected
From: Josef Bacik <[email protected]>
commit 639812a1ed9bf49ae2c026086fbf975339cd1eef upstream.
A user reported a regression with using the normal ioctl interface on newer kernels. This happens because I was setting the device size before the device was actually connected, which caused us to error out and close everything down. This didn't happen on netlink because we hold the device lock the whole time we're setting things up, but we don't do that for the ioctl path. This fixes the problem.
--- drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/nbd.c +1 -1
@@ -243,7 +243,6 @@ static void nbd_size_set(struct nbd_devistruct nbd_config *config = nbd->config; config->blksize = blocksize; config->bytesize = blocksize * nr_blocks; -nbd_size_update (nbd); }static void nbd_complete_rq (struct request *req)
@@ -1090,6 +1089,7 @@ static int nbd_start_device(struct nbd_d args->index = i;queue_work (recv_workqueue, &args->work); } +nbd_size_update (nbd);return error; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.13/nbd-don-t-set-the-device-size-until-we-re-connected.patch