diff options
author | Jarkko Lavinen <jarkko.lavinen@nokia.com> | 2011-02-14 09:16:10 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 09:22:46 -0500 |
commit | 115ee88c15b55859a8b59c5dccb3882bbd47e542 (patch) | |
tree | 12eea6cd84f3af3b0672e29edfa310f121623a8c /drivers/mtd/mtd_blkdevs.c | |
parent | c7519dbf6f4b4408229d279d799c938ffdd06f21 (diff) |
mtd_blkdevs: Set the maximum discards size
Set max_discard_sectors to UINT_MAX.
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index e0b5f6442171..650511304030 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c | |||
@@ -405,9 +405,10 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) | |||
405 | new->rq->queuedata = new; | 405 | new->rq->queuedata = new; |
406 | blk_queue_logical_block_size(new->rq, tr->blksize); | 406 | blk_queue_logical_block_size(new->rq, tr->blksize); |
407 | 407 | ||
408 | if (tr->discard) | 408 | if (tr->discard) { |
409 | queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, | 409 | queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq); |
410 | new->rq); | 410 | new->rq->limits.max_discard_sectors = UINT_MAX; |
411 | } | ||
411 | 412 | ||
412 | gd->queue = new->rq; | 413 | gd->queue = new->rq; |
413 | 414 | ||