mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: <jaegeuk@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] f2fs: set dirty state for filesystem only when updating meta data
Date: Thu, 18 Aug 2016 17:45:12 +0800	[thread overview]
Message-ID: <88352fee-4f32-1600-60e3-3bd30a98f96f@huawei.com> (raw)
In-Reply-To: <20160818090523.57556-1-yuchao0@huawei.com>

On 2016/8/18 17:05, Chao Yu wrote:
> We don't guarantee integrity of user data after checkpoint, since we only
> guarantee meta data integrity for data consistency of filesystem.
> 
> Due to above reason, we only need to set fs as dirty when meta data is
> updated, so that we can skip writing checkpoint in some case of non-meta
> data is updated.
> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
>  fs/f2fs/f2fs.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 5a10bce..1659d10 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1220,7 +1220,9 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
>  static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
>  {
>  	percpu_counter_inc(&sbi->nr_pages[count_type]);
> -	set_sbi_flag(sbi, SBI_IS_DIRTY);
> +	if (count_type == F2FS_DIRTY_DENTS || count_type == F2FS_DIRTY_NODES ||
> +			count_type == F2FS_DIRTY_META)

Sorry, I miss one condition here, please ignore this patch.

Thanks,

> +		set_sbi_flag(sbi, SBI_IS_DIRTY);
>  }
>  
>  static inline void inode_inc_dirty_pages(struct inode *inode)
> 

      reply	other threads:[~2016-08-18  9:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18  9:05 Chao Yu
2016-08-18  9:45 ` Chao Yu [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=88352fee-4f32-1600-60e3-3bd30a98f96f@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®