lkml.org 
[lkml]   [2011]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 7/7] zram: mark the disk as non-rotating media

On Wed, Jan 26, 2011 at 11:27:44AM -0600, Robert Jennings wrote:
> Adding QUEUE_FLAG_NONROT for the in the request_queue flags. When used
^^^^^^^^^^^^^^
"to the" perhaps?

> as a swap device, scan_swap_map will avoid the extra work of optimizing
> for rotating media.
>
> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
> ---
> drivers/staging/zram/zram_drv.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
> index d5e0275..450c618 100644
> --- a/drivers/staging/zram/zram_drv.c
> +++ b/drivers/staging/zram/zram_drv.c
> @@ -593,6 +593,7 @@ static int create_device(struct zram *zram, int device_id)
> goto out;
> }
>
> + zram->queue->queue_flags ^= QUEUE_FLAG_NONROT;

QUEUE_FLAG_NONROT is 14. We want to set the 14 bit. This won't work.

Use queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zram->queue);

regards,
dan carpenter




\
 
 \ /
  Last update: 2011-01-26 18:51    [W:0.090 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site