From: Changman Lee <cm224.lee@samsung.com>
To: majianpeng <majianpeng@gmail.com>
Cc: "jaegeuk.kim" <jaegeuk.kim@samsung.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix bad unlock balance detected.
Date: Tue, 29 Jan 2013 10:21:27 +0900 [thread overview]
Message-ID: <1359422487.19945.23.camel@lcm> (raw)
In-Reply-To: <201301281903308261110@gmail.com>
The blocked means gc can't proceed anymore due to not enough free sections.
Look at the f2fs_gc -> do_garbage_collect -> gc_node_segment and gc_data_segment.
Before returning GC_BLOCKED as gc_status, mutex_lock(&sbi->cp_mutex) and blokc_operation(sbi) is called.
So unblock_operations should always be called.
On 월, 2013-01-28 at 19:03 +0800, majianpeng wrote:
> Only !blocked is true,it can call the unblock_operations in func write_checkpoint.
>
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> fs/f2fs/checkpoint.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index ff3c843..76308d3 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -760,8 +760,10 @@ void write_checkpoint(struct f2fs_sb_info *sbi, bool blocked, bool is_umount)
> /* unlock all the fs_lock[] in do_checkpoint() */
> do_checkpoint(sbi, is_umount);
>
> - unblock_operations(sbi);
> - mutex_unlock(&sbi->cp_mutex);
> + if (!blocked) {
> + unblock_operations(sbi);
> + mutex_unlock(&sbi->cp_mutex);
> + }
> }
>
> void init_orphan_info(struct f2fs_sb_info *sbi)
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
parent reply other threads:[~2013-01-29 1:22 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <201301281903308261110@gmail.com>]
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=1359422487.19945.23.camel@lcm \
--to=cm224.lee@samsung.com \
--cc=jaegeuk.kim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=majianpeng@gmail.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).