diff options
author | Jens Axboe <axboe@fb.com> | 2015-07-14 08:15:12 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-07-17 08:41:53 -0600 |
commit | 2bb4cd5cc472b191a46938becb7dafdd44644329 (patch) | |
tree | 8fabaacb2c5aebf2cc7b18dc59898a234985dbbd /drivers/md/bcache | |
parent | 6c71013ecb7e2bddbed9f5b95e7aed22c491daa9 (diff) | |
download | linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.gz linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.bz2 linux-2bb4cd5cc472b191a46938becb7dafdd44644329.zip |
block: have drivers use blk_queue_max_discard_sectors()
Some drivers use it now, others just set the limits field manually.
But in preparation for splitting this into a hard and soft limit,
ensure that they all call the proper function for setting the hw
limit for discards.
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r-- | drivers/md/bcache/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 94980bfca434..fc8e545ced18 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -830,7 +830,7 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size, q->limits.max_sectors = UINT_MAX; q->limits.max_segment_size = UINT_MAX; q->limits.max_segments = BIO_MAX_PAGES; - q->limits.max_discard_sectors = UINT_MAX; + blk_queue_max_discard_sectors(q, UINT_MAX); q->limits.discard_granularity = 512; q->limits.io_min = block_size; q->limits.logical_block_size = block_size; |