All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: "'Jaegeuk Kim'" <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: RE: [f2fs-dev] [PATCH 2/2] f2fs: do checkpoint when umount flag is not set
Date: Fri, 23 Jan 2015 18:39:25 +0800	[thread overview]
Message-ID: <000501d036f8$f5e99660$e1bcc320$@samsung.com> (raw)
In-Reply-To: <1421971730-17024-2-git-send-email-jaegeuk@kernel.org>

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Friday, January 23, 2015 8:09 AM
> To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> Cc: Jaegeuk Kim
> Subject: [f2fs-dev] [PATCH 2/2] f2fs: do checkpoint when umount flag is not set
> 
> If the previous checkpoint was done without CP_UMOUNT flag, it needs to do
> checkpoint with CP_UMOUNT for the next fast boot.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao2.yu@samsung.com>

> ---
>  fs/f2fs/checkpoint.c | 3 ++-
>  fs/f2fs/super.c      | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 9f5317c..231d8c9 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -1043,7 +1043,8 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
> 
>  	mutex_lock(&sbi->cp_mutex);
> 
> -	if (!sbi->s_dirty && cpc->reason != CP_DISCARD)
> +	if (!sbi->s_dirty &&
> +			cpc->reason != CP_DISCARD && cpc->reason != CP_UMOUNT)
>  		goto out;
>  	if (unlikely(f2fs_cp_error(sbi)))
>  		goto out;
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 84f95cd..6ef1458 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -448,7 +448,8 @@ static void f2fs_put_super(struct super_block *sb)
>  	stop_gc_thread(sbi);
> 
>  	/* We don't need to do checkpoint when it's clean */

Better to update the annotation above.

Thanks,
Yu

> -	if (sbi->s_dirty) {
> +	if (sbi->s_dirty ||
> +			!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG)) {
>  		struct cp_control cpc = {
>  			.reason = CP_UMOUNT,
>  		};
> --
> 2.1.1
> 


  reply	other threads:[~2015-01-23 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23  0:08 [PATCH 1/2] f2fs: trigger correct checkpoint during umount Jaegeuk Kim
2015-01-23  0:08 ` [PATCH 2/2] f2fs: do checkpoint when umount flag is not set Jaegeuk Kim
2015-01-23 10:39   ` Chao Yu [this message]
2015-01-23 19:03     ` [f2fs-dev] " Jaegeuk Kim
2015-01-23 10:37 ` [f2fs-dev] [PATCH 1/2] f2fs: trigger correct checkpoint during umount Chao Yu

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='000501d036f8$f5e99660$e1bcc320$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.