mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
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>
This commit is contained in:
parent
1bba688b5a
commit
16f7eca587
1 changed files with 2 additions and 0 deletions
|
@ -426,6 +426,8 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
|
||||||
new->rq->queuedata = new;
|
new->rq->queuedata = new;
|
||||||
blk_queue_logical_block_size(new->rq, tr->blksize);
|
blk_queue_logical_block_size(new->rq, tr->blksize);
|
||||||
|
|
||||||
|
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, new->rq);
|
||||||
|
|
||||||
if (tr->discard) {
|
if (tr->discard) {
|
||||||
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
|
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
|
||||||
new->rq->limits.max_discard_sectors = UINT_MAX;
|
new->rq->limits.max_discard_sectors = UINT_MAX;
|
||||||
|
|
Loading…
Add table
Reference in a new issue