Skip to content

Commit

Permalink
mtd: mark block device queue as non-rotational
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan McGee authored and Artem Bityutskiy committed Oct 14, 2011
1 parent 1bba688 commit 16f7eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 16f7eca

Please sign in to comment.