diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-07-20 20:57:38 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-24 22:46:39 +0200 |
commit | 42c9cdfe1e11e083dceb0f0c4977b758cf7403b9 (patch) | |
tree | c5f0822ca961b526f1a36d376bb469718f2c3fa9 /block/blk-settings.c | |
parent | block: unexport bio_clone_bioset (diff) | |
download | linux-42c9cdfe1e11e083dceb0f0c4977b758cf7403b9.tar.xz linux-42c9cdfe1e11e083dceb0f0c4977b758cf7403b9.zip |
block: allow max_discard_segments to be stacked
Set max_discard_segments to USHRT_MAX in blk_set_stacking_limits() so
that blk_stack_limits() can stack up this limit for stacked devices.
before:
$ cat /sys/block/nvme0n1/queue/max_discard_segments
256
$ cat /sys/block/dm-0/queue/max_discard_segments
1
after:
$ cat /sys/block/nvme0n1/queue/max_discard_segments
256
$ cat /sys/block/dm-0/queue/max_discard_segments
256
Fixes: 1e739730c5b9e ("block: optionally merge discontiguous discard bios into a single request")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index 053de87d1fda..ffd459969689 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -128,7 +128,7 @@ void blk_set_stacking_limits(struct queue_limits *lim) /* Inherit limits from component devices */ lim->max_segments = USHRT_MAX; - lim->max_discard_segments = 1; + lim->max_discard_segments = USHRT_MAX; lim->max_hw_sectors = UINT_MAX; lim->max_segment_size = UINT_MAX; lim->max_sectors = UINT_MAX; |