Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 316ba573 authored by SeongJae Park's avatar SeongJae Park Committed by Jens Axboe
Browse files

brd: Mark as non-rotational



This commit sets QUEUE_FLAG_NONROT and clears up QUEUE_FLAG_ADD_RANDOM
to mark the ramdisks as non-rotational device.

Signed-off-by: default avatarSeongJae Park <sj38.park@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 522a7775
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -402,6 +402,10 @@ static struct brd_device *brd_alloc(int i)
	set_capacity(disk, rd_size * 2);
	disk->queue->backing_dev_info->capabilities |= BDI_CAP_SYNCHRONOUS_IO;

	/* Tell the block layer that this is not a rotational device */
	blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue);
	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, disk->queue);

	return brd;

out_free_queue: