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>
This commit is contained in:
@@ -165,7 +165,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
|
||||
return;
|
||||
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
|
||||
q->limits.max_discard_sectors = max_discard;
|
||||
blk_queue_max_discard_sectors(q, max_discard);
|
||||
if (card->erased_byte == 0 && !mmc_can_discard(card))
|
||||
q->limits.discard_zeroes_data = 1;
|
||||
q->limits.discard_granularity = card->pref_erase << 9;
|
||||
|
Reference in New Issue
Block a user