Skip to contentSkip to conversation

mtd: mark block device queue as non-rotational

PATCH Applied Dan McGee 2 participants 2 messages Sep 28, 2011 – Oct 14, 2011 Memory technology devices (MTD)

lore
Share & tools
lore

Dan McGee

author
#0 lore raw

PATCH 1/1 mtd: mark block device queue as non-rotational

This is similar to what the nbd driver does, among others.

---
 drivers/mtd/mtd_blkdevs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/mtd_blkdevs.c +2 -0
index ca38569..ed8b5e7 100644
@@ -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;
Signature · 1 line
1.7.6.4