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] [day] [month] [year] [list]
Date:	Sun, 03 Mar 2013 13:17:37 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	Namjae Jeon <namjae.jeon@...sung.com>,
	Amit Sahrawat <a.sahrawat@...sung.com>
Subject: Re: [PATCH 1/5] f2fs: change victim segmap test condition in
 get_victim_by_default

2013-03-02 (토), 12:40 +0900, Namjae Jeon:
> From: Namjae Jeon <namjae.jeon@...sung.com>
> 
> Instead of checking for victim_segmap(FG_GC) OR
> (gc_type == BG_GC) && victim_segmap(BG_GC);
> to continue for the victim selection. The 2 conditions
> can simply be merged and decision can directly be made using 'gc_type'.
> 
> Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com>
> Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com>
> ---
>  fs/f2fs/gc.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 94b8a0c..16b4148 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -266,10 +266,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
>  		}
>  		p.offset = ((segno / p.ofs_unit) * p.ofs_unit) + p.ofs_unit;
>  
> -		if (test_bit(segno, dirty_i->victim_segmap[FG_GC]))
> -			continue;
> -		if (gc_type == BG_GC &&
> -				test_bit(segno, dirty_i->victim_segmap[BG_GC]))
> +		if (test_bit(segno, dirty_i->victim_segmap[gc_type]))

Negative.
We should check FG_GC all the time.
Thanks,

>  			continue;
>  		if (IS_CURSEC(sbi, GET_SECNO(sbi, segno)))
>  			continue;

-- 
Jaegeuk Kim
Samsung

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ