From: Jarkko Lavinen <jarkko.lavinen@nokia.com>
To: linux-mtd@lists.infradead.org
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Subject: [PATCH 2/3] mtd_blkdevs: Set the maximum discards size
Date: Mon, 14 Feb 2011 16:16:10 +0200 [thread overview]
Message-ID: <1297692971-7399-3-git-send-email-jarkko.lavinen@nokia.com> (raw)
In-Reply-To: <1297692971-7399-1-git-send-email-jarkko.lavinen@nokia.com>
Set max_discard_sectors to UINT_MAX.
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
---
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 69d8c27..6ba450a 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)
new->rq->queuedata = new;
blk_queue_logical_block_size(new->rq, tr->blksize);
- if (tr->discard)
- queue_flag_set_unlocked(QUEUE_FLAG_DISCARD,
- new->rq);
+ if (tr->discard) {
+ queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
+ new->rq->limits.max_discard_sectors = UINT_MAX;
+ }
gd->queue = new->rq;
--
1.7.2.3
next prev parent reply other threads:[~2011-02-14 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 14:16 Jarkko Lavinen
2011-02-14 14:16 ` [PATCH 1/3] mtd_blkdevs: Add background processing support Jarkko Lavinen
2011-02-14 14:16 ` Jarkko Lavinen [this message]
2011-02-14 14:16 ` [PATCH 3/3] mtd: Add mtdswap block driver Jarkko Lavinen
2011-02-18 14:14 ` Artem Bityutskiy
2011-02-22 16:21 ` Jarkko Lavinen
2011-02-25 11:03 ` Artem Bityutskiy
2011-03-09 8:08 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297692971-7399-3-git-send-email-jarkko.lavinen@nokia.com \
--to=jarkko.lavinen@nokia.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.