From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaegeuk Kim Subject: Re: [PATCH 1/5] f2fs: change victim segmap test condition in get_victim_by_default Date: Sun, 03 Mar 2013 13:17:37 +0900 Message-ID: <1362284257.14386.1.camel@kjgkr> References: <1362195637-20683-1-git-send-email-linkinjeon@gmail.com> Reply-To: jaegeuk.kim@samsung.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-NP34TRCN5Ug5KlyNlq3B" Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Namjae Jeon , Amit Sahrawat To: Namjae Jeon Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:40017 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578Ab3CCEST (ORCPT ); Sat, 2 Mar 2013 23:18:19 -0500 In-reply-to: <1362195637-20683-1-git-send-email-linkinjeon@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --=-NP34TRCN5Ug5KlyNlq3B Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2013-03-02 (=ED=86=A0), 12:40 +0900, Namjae Jeon: > From: Namjae Jeon >=20 > Instead of checking for victim_segmap(FG_GC) OR > (gc_type =3D=3D 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'. >=20 > Signed-off-by: Namjae Jeon > Signed-off-by: Amit Sahrawat > --- > fs/f2fs/gc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) >=20 > 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 =3D ((segno / p.ofs_unit) * p.ofs_unit) + p.ofs_unit; > =20 > - if (test_bit(segno, dirty_i->victim_segmap[FG_GC])) > - continue; > - if (gc_type =3D=3D 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; --=20 Jaegeuk Kim Samsung --=-NP34TRCN5Ug5KlyNlq3B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJRMs7hAAoJEEAUqH6CSFDSrasP/iT9hNl8lRF1ERl8oV8iYdp0 JUwIS3LITxjGRKX8LowuaYsAjRvZcn0yv/B8XKZ7UNgt+sTTg8/DSpqmOq8xmw3x JvKIOl2tu+iQ/yaWPIdfJ7Ie2NUOyb4u1dyvGtFcxnTfHQNj4aKMdm92xxsWw0lg S6I0Rx12RDOKMt89El5aLQ2HSfc/4jYkSjxptlfnmi7SYd52a6ihliH1jz4/eGDS hbTaxX2hhD9V6k48RY5qELbODz8/qV5IleEh78BbcfAiccnYnQaWCaTZwgA6yIkH n9/VMcOmoQ1NJbV8oHIhOHvPo3v/vEa135NH9EzIV/w5nV20srGwM8ywwHw3s8RG jgZpNU8KtoO6xs7pEJiOazeT+u7SYIt3KejEAWJccH/6Ul72q+Kj5R1qPNt02pEY H8PNs5jtdFkZEfwP3PU/IhOjuO5mt6Z2Af/VEqrJfDqe5QqD21qcQetZ6kIQjwCE x9OreKLc2AOz5vlRopZzCzcds+x7kjmJjFSLwb814eIVrKi3Hc4cJnp51ccsD+oH rrY5Fqf1YI4WwJ7JzRI5k1Ze1hpJhRJ6n32RJGc5NFfGHnuQDtp+9YSKGTV8E2SR 5iOU5lTq9shaDjarAH7F5q3Bzigp9jB7vHBajbG2hxsRZb3xWOTU+Ddt1OH3wYJH 4uEA8HKeOOtSzKkwYRqH =Qxf1 -----END PGP SIGNATURE----- --=-NP34TRCN5Ug5KlyNlq3B--