aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtd_blkdevs.c
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2011-09-28 01:21:42 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-10-14 04:22:48 -0400
commit16f7eca5871ad09b8f6c44ba8cb4d8185833a1ee (patch)
tree95222ff6638c560d8d798da5ff5d55d8ec56eb46 /drivers/mtd/mtd_blkdevs.c
parent1bba688b5a32079db616f281c13f00944d74020b (diff)
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@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r--drivers/mtd/mtd_blkdevs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index ca385697446e..ed8b5e744b12 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)
426 new->rq->queuedata = new; 426 new->rq->queuedata = new;
427 blk_queue_logical_block_size(new->rq, tr->blksize); 427 blk_queue_logical_block_size(new->rq, tr->blksize);
428 428
429 queue_flag_set_unlocked(QUEUE_FLAG_NONROT, new->rq);
430
429 if (tr->discard) { 431 if (tr->discard) {
430 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq); 432 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
431 new->rq->limits.max_discard_sectors = UINT_MAX; 433 new->rq->limits.max_discard_sectors = UINT_MAX;