提交 16f7eca5 编写于 作者: D Dan McGee 提交者: Artem Bityutskiy

mtd: mark block device queue as non-rotational

This is similar to what the nbd driver does, among others.
Signed-off-by: NDan McGee <dpmcgee@gmail.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
上级 1bba688b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册