diff options
author | Josef Bacik <jbacik@fb.com> | 2017-03-24 14:08:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-03-24 15:42:47 -0600 |
commit | f8586855031a1d6b243f013c3082631346fddfad (patch) | |
tree | d4a70943fcc2ed1934d1389c84d4da9ac8c12fbc /drivers | |
parent | c103b4dac8f69ca55196afcd57c4cdd6d3ab88eb (diff) | |
download | linux-stable-f8586855031a1d6b243f013c3082631346fddfad.tar.gz linux-stable-f8586855031a1d6b243f013c3082631346fddfad.tar.bz2 linux-stable-f8586855031a1d6b243f013c3082631346fddfad.zip |
nbd: set queue timeout properly
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>
Diffstat (limited to 'drivers')
-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 dbc22f4bed3d..b0003dab90b9 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -844,7 +844,10 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, nbd_size_set(nbd, bdev, nbd->blksize, arg); return 0; 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: |