mtd: mark block device queue as non-rotational

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:36 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=16f7eca5871ad09b8f6c44ba8cb4d8185833a1ee
Commit:     16f7eca5871ad09b8f6c44ba8cb4d8185833a1ee
Parent:     1bba688b5a32079db616f281c13f00944d74020b
Author:     Dan McGee <dpmcgee at gmail.com>
AuthorDate: Wed Sep 28 00:21:42 2011 -0500
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Fri Oct 14 11:22:48 2011 +0300

    mtd: mark block device queue as non-rotational
    
    This is similar to what the nbd driver does, among others.
    
    Signed-off-by: Dan McGee <dpmcgee at gmail.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at intel.com>
---
 drivers/mtd/mtd_blkdevs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index ca38569..ed8b5e7 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -426,6 +426,8 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
 	new->rq->queuedata = new;
 	blk_queue_logical_block_size(new->rq, tr->blksize);
 
+	queue_flag_set_unlocked(QUEUE_FLAG_NONROT, new->rq);
+
 	if (tr->discard) {
 		queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
 		new->rq->limits.max_discard_sectors = UINT_MAX;



More information about the linux-mtd-cvs mailing list