summaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.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/rbd.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/rbd.c')
-rw-r--r--drivers/block/rbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index d94529d5c8e9..dcc86937f55c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3803,7 +3803,7 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
q->limits.discard_granularity = segment_size;
q->limits.discard_alignment = segment_size;
- q->limits.max_discard_sectors = segment_size / SECTOR_SIZE;
+ blk_queue_max_discard_sectors(q, segment_size / SECTOR_SIZE);
q->limits.discard_zeroes_data = 1;
blk_queue_merge_bvec(q, rbd_merge_bvec);
OpenPOWER on IntegriCloud