Skip to content
Snippets Groups Projects
Commit 115ee88c authored by Jarkko Lavinen's avatar Jarkko Lavinen Committed by David Woodhouse
Browse files

mtd_blkdevs: Set the maximum discards size


Set max_discard_sectors to UINT_MAX.

Signed-off-by: default avatarJarkko Lavinen <jarkko.lavinen@nokia.com>
Tested-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent c7519dbf
No related branches found
No related tags found
No related merge requests found
...@@ -405,9 +405,10 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) ...@@ -405,9 +405,10 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
new->rq->queuedata = new; new->rq->queuedata = new;
blk_queue_logical_block_size(new->rq, tr->blksize); blk_queue_logical_block_size(new->rq, tr->blksize);
if (tr->discard) if (tr->discard) {
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
new->rq); new->rq->limits.max_discard_sectors = UINT_MAX;
}
gd->queue = new->rq; gd->queue = new->rq;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment