summaryrefslogtreecommitdiffstats
path: root/drivers/block/brd.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-07-14 08:15:12 -0600
committerJens Axboe <axboe@fb.com>2015-07-17 08:41:53 -0600
commit2bb4cd5cc472b191a46938becb7dafdd44644329 (patch)
tree8fabaacb2c5aebf2cc7b18dc59898a234985dbbd /drivers/block/brd.c
parent6c71013ecb7e2bddbed9f5b95e7aed22c491daa9 (diff)
downloadblackbird-op-linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.gz
blackbird-op-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.c2
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);
OpenPOWER on IntegriCloud