linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [f2fs-dev] [PATCH] f2fs: Fix bad unlock balance detected.
       [not found] <201301281903308261110@gmail.com>
@ 2013-01-29  1:21 ` Changman Lee
  0 siblings, 0 replies; only message in thread
From: Changman Lee @ 2013-01-29  1:21 UTC (permalink / raw)
  To: majianpeng; +Cc: jaegeuk.kim, linux-fsdevel, linux-f2fs-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-29  1:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201301281903308261110@gmail.com>
2013-01-29  1:21 ` [f2fs-dev] [PATCH] f2fs: Fix bad unlock balance detected Changman Lee

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).