diff options
author | Jens Axboe <axboe@fb.com> | 2015-07-14 16:15:12 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-07-17 16:41:53 +0200 |
commit | 2bb4cd5cc472b191a46938becb7dafdd44644329 (patch) | |
tree | 8fabaacb2c5aebf2cc7b18dc59898a234985dbbd /drivers/block/brd.c | |
parent | block: partition: convert percpu ref (diff) | |
download | linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.xz 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/block/brd.c')
-rw-r--r-- | drivers/block/brd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 64ab4951e9d6..e573e470bd8a 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -500,7 +500,7 @@ static struct brd_device *brd_alloc(int i) blk_queue_physical_block_size(brd->brd_queue, PAGE_SIZE); brd->brd_queue->limits.discard_granularity = PAGE_SIZE; - brd->brd_queue->limits.max_discard_sectors = UINT_MAX; + blk_queue_max_discard_sectors(brd->brd_queue, UINT_MAX); brd->brd_queue->limits.discard_zeroes_data = 1; queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, brd->brd_queue); |