All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] brd: Mark as non-rotational
@ 2018-05-03  9:53 SeongJae Park
  2018-05-09  4:07 ` SeongJae Park
  2018-05-09 14:44 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: SeongJae Park @ 2018-05-03  9:53 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel, SeongJae Park

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

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 drivers/block/brd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 66cb0f857f64..39c5b90cc187 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -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:
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] brd: Mark as non-rotational
  2018-05-03  9:53 [PATCH] brd: Mark as non-rotational SeongJae Park
@ 2018-05-09  4:07 ` SeongJae Park
  2018-05-09 14:44 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: SeongJae Park @ 2018-05-09  4:07 UTC (permalink / raw)
  To: axboe, dan.j.williams, mpatocka; +Cc: linux-block, linux-kernel

I'm sending this mail for another chance of review.


Thanks,
SeongJae Park
On Thu, May 3, 2018 at 6:53 PM SeongJae Park <sj38.park@gmail.com> wrote:

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

> Signed-off-by: SeongJae Park <sj38.park@gmail.com>
> ---
>   drivers/block/brd.c | 4 ++++
>   1 file changed, 4 insertions(+)

> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 66cb0f857f64..39c5b90cc187 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -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:
> --
> 2.13.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] brd: Mark as non-rotational
  2018-05-03  9:53 [PATCH] brd: Mark as non-rotational SeongJae Park
  2018-05-09  4:07 ` SeongJae Park
@ 2018-05-09 14:44 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2018-05-09 14:44 UTC (permalink / raw)
  To: SeongJae Park; +Cc: linux-block, linux-kernel

On 5/3/18 3:53 AM, SeongJae Park wrote:
> This commit sets QUEUE_FLAG_NONROT and clears up QUEUE_FLAG_ADD_RANDOM
> to mark the ramdisks as non-rotational device.

Applied for 4.18, thanks.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-09 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03  9:53 [PATCH] brd: Mark as non-rotational SeongJae Park
2018-05-09  4:07 ` SeongJae Park
2018-05-09 14:44 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.