diff options
author | Josef Bacik <jbacik@fb.com> | 2017-03-24 21:08:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-25 16:23:41 +0300 |
commit | 521a7e3dad6b216eb0058db5c64a1e706e514fc0 (patch) | |
tree | 34251ebffb792521356d4b98bda8b80cc05b6b47 /drivers/block | |
parent | f4fcc56632cfd6d204ca6d64ad0912e626016b65 (diff) | |
download | linux-521a7e3dad6b216eb0058db5c64a1e706e514fc0.tar.xz |
nbd: set queue timeout properly
[ Upstream commit f8586855031a1d6b243f013c3082631346fddfad ]
We can't just set the timeout on the tagset, we have to set it on the
queue as it would have been setup already at this point.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nbd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 98b767d3171e..7d506cb73e54 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -654,7 +654,10 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, return nbd_size_set(nbd, bdev, nbd->blksize, arg); case NBD_SET_TIMEOUT: - nbd->tag_set.timeout = arg * HZ; + if (arg) { + nbd->tag_set.timeout = arg * HZ; + blk_queue_rq_timeout(nbd->disk->queue, arg * HZ); + } return 0; case NBD_SET_FLAGS: |