diff options
author | Jens Axboe <axboe@fb.com> | 2015-07-14 17:15:12 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-07-17 17:41:53 +0300 |
commit | 2bb4cd5cc472b191a46938becb7dafdd44644329 (patch) | |
tree | 8fabaacb2c5aebf2cc7b18dc59898a234985dbbd /drivers/block/nvme-core.c | |
parent | 6c71013ecb7e2bddbed9f5b95e7aed22c491daa9 (diff) | |
download | linux-2bb4cd5cc472b191a46938becb7dafdd44644329.tar.xz |
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/nvme-core.c')
-rw-r--r-- | drivers/block/nvme-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 7920c2741b47..d844ec4a2b85 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1935,7 +1935,7 @@ static void nvme_config_discard(struct nvme_ns *ns) ns->queue->limits.discard_zeroes_data = 0; ns->queue->limits.discard_alignment = logical_block_size; ns->queue->limits.discard_granularity = logical_block_size; - ns->queue->limits.max_discard_sectors = 0xffffffff; + blk_queue_max_discard_sectors(ns->queue, 0xffffffff); queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, ns->queue); } |