linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@gmail.com>
To: Changman Lee <cm224.lee@samsung.com>
Cc: jaegeuk.kim@samsung.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func
Date: Mon, 4 Feb 2013 11:01:48 +0900	[thread overview]
Message-ID: <CAKYAXd8pnjAPNkSO4rrjupnbvP9S+8hEta_NMM_oT--yGVhF4w@mail.gmail.com> (raw)
In-Reply-To: <1359941761.2739.39.camel@lcm>

2013/2/4, Changman Lee <cm224.lee@samsung.com>:
> As you know, f2fs_balance_fs conducts gc if f2fs has not enough free
> sections. But, the purpose of background gc is to conduct gc during idle
> time without checking free sections so that f2fs can solve defragment
> condition.
>
> Could you review this?
Yes, right. make sense.
This patch also looks good to me.
Thanks a lot !
>
> --> 8 --
>
> From fbda3262dac81c4f0d7ae8b9b757c820da593120 Mon Sep 17 00:00:00 2001
> From: Changman Lee <cm224.lee@samsung.com>
> Date: Mon, 4 Feb 2013 10:05:09 +0900
> Subject: [PATCH] f2fs: remove unnecessary gc option check and balance_fs
>
>  1. If f2fs is mounted with background_gc_off option, checking
>     BG_GC is not redundant.
>  2. f2fs_balance_fs is checked in f2fs_gc, so this is also redundant.
>
> Signed-off-by: Changman Lee <cm224.lee@samsung.com>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
> ---
>  fs/f2fs/gc.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 8fe43f3..e5c47f6 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -49,11 +49,6 @@ static int gc_thread_func(void *data)
>  			continue;
>  		}
>
> -		f2fs_balance_fs(sbi);
> -
> -		if (!test_opt(sbi, BG_GC))
> -			continue;
> -
>  		/*
>  		 * [GC triggering condition]
>  		 * 0. GC is not conducted currently.
> @@ -96,6 +91,8 @@ int start_gc_thread(struct f2fs_sb_info *sbi)
>  {
>  	struct f2fs_gc_kthread *gc_th;
>
> +	if (!test_opt(sbi, BG_GC))
> +		return 0;
>  	gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL);
>  	if (!gc_th)
>  		return -ENOMEM;
> --
> 1.7.10.4
>
>
>
>

      reply	other threads:[~2013-02-04  2:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 14:52 [PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func Namjae Jeon
2013-02-04  1:36 ` Changman Lee
2013-02-04  2:01   ` Namjae Jeon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKYAXd8pnjAPNkSO4rrjupnbvP9S+8hEta_NMM_oT--yGVhF4w@mail.gmail.com \
    --to=linkinjeon@gmail.com \
    --cc=a.sahrawat@samsung.com \
    --cc=cm224.lee@samsung.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).