lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150529034141.GA1157@swordfish>
Date:	Fri, 29 May 2015 12:41:41 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:	Weijie Yang <weijie.yang@...sung.com>
Cc:	'Minchan Kim' <minchan@...nel.org>,
	'Andrew Morton' <akpm@...ux-foundation.org>,
	sergey.senozhatsky.work@...il.com, ngupta@...are.org,
	'Weijie Yang' <weijie.yang.kh@...il.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] zram: clear disk io accounting when reset zram device

On (05/29/15 11:23), Weijie Yang wrote:
> This patch clears zram disk io accounting when reset the zram device,
> if don't do this, the residual io accounting stat will affect the
> diskstat in the next zram active cycle.
> 

thanks. my bad.

Acked-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>

	-ss

> Signed-off-by: Weijie Yang <weijie.yang@...sung.com>
> ---
>  drivers/block/zram/zram_drv.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 8dcbced..6e134f4 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -805,7 +805,9 @@ static void zram_reset_device(struct zram *zram)
>  	memset(&zram->stats, 0, sizeof(zram->stats));
>  	zram->disksize = 0;
>  	zram->max_comp_streams = 1;
> +
>  	set_capacity(zram->disk, 0);
> +	part_stat_set_all(&zram->disk->part0, 0);
>  
>  	up_write(&zram->init_lock);
>  	/* I/O operation under all of CPU are done so let's free */
> -- 
> 1.7.10.4
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ