From: Dan McGee Date: Wed, 28 Sep 2011 05:21:42 +0000 (-0500) Subject: mtd: mark block device queue as non-rotational X-Git-Tag: next-20111025~55^2~8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=16f7eca5871ad09b8f6c44ba8cb4d8185833a1ee;p=karo-tx-linux.git mtd: mark block device queue as non-rotational This is similar to what the nbd driver does, among others. Signed-off-by: Dan McGee Signed-off-by: Artem Bityutskiy --- 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) 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;