From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao2.yu@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 08/13] f2fs: do checkpoint at f2fs_put_super
Date: Fri, 15 Aug 2014 14:54:00 -0700 [thread overview]
Message-ID: <20140815215027.GA53769@jaegeuk-mac02.mot.com> (raw)
In-Reply-To: <000401cfb76b$a3957b20$eac07160$@samsung.com>
Hi Chao,
On Thu, Aug 14, 2014 at 10:57:10AM +0800, Chao Yu wrote:
> Hi Jaegeuk,
>
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > Sent: Wednesday, August 13, 2014 3:49 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 08/13] f2fs: do checkpoint at f2fs_put_super
> >
> > The generic_shutdown_super calls sync_filesystem, evict_inode, and then
> > f2fs_put_super. In f2fs_evict_inode, we remain some dirty inode information
> > so we should release them at f2fs_put_super.
> >
> > But normally, it's more reasonable to set its superblock as dirty when
> > evict_inode is called.
>
> After applying this patch, when we mount and then umount f2fs image without
> modification, we will write checkpoint in f2fs_put_super even though we have
> no more dirty data to sync, it's not needed.
>
> "some dirty inode information" you mentioned is inode information in ->ino_root of
> sbi, right?
Actually this patch is intended to call release_dirty_inode() in
write_checkpoint, since evict_inode remains information by calling
add_dirty_inode().
Oh, it'd better set sb dirty only when add_dirty_inode is called.
Let me send v2 for this. :)
Thanks,
>
> Regards,
> Yu
>
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> > fs/f2fs/inode.c | 1 +
> > fs/f2fs/super.c | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> > index 2c39999..eeaf5aa 100644
> > --- a/fs/f2fs/inode.c
> > +++ b/fs/f2fs/inode.c
> > @@ -303,6 +303,7 @@ no_delete:
> > add_dirty_inode(sbi, inode->i_ino, APPEND_INO);
> > if (is_inode_flag_set(F2FS_I(inode), FI_UPDATE_WRITE))
> > add_dirty_inode(sbi, inode->i_ino, UPDATE_INO);
> > + F2FS_SET_SB_DIRT(sbi);
> > out_clear:
> > clear_inode(inode);
> > }
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index 633315a..60e3554 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -432,7 +432,7 @@ static void f2fs_put_super(struct super_block *sb)
> > stop_gc_thread(sbi);
> >
> > /* We don't need to do checkpoint when it's clean */
> > - if (sbi->s_dirty && get_pages(sbi, F2FS_DIRTY_NODES))
> > + if (sbi->s_dirty)
> > write_checkpoint(sbi, true);
> >
> > iput(sbi->node_inode);
> > --
> > 1.8.5.2 (Apple Git-48)
> >
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Linux-f2fs-devel mailing list
> > Linux-f2fs-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2014-08-15 21:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 19:49 [PATCH 01/13] f2fs: should convert inline_data during the mkwrite Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 02/13] f2fs: make clear on test condition and return types Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 03/13] f2fs: fix the initial inode page for recovery Jaegeuk Kim
2014-08-13 10:17 ` [f2fs-dev] " Chao Yu
2014-08-12 19:49 ` [PATCH 04/13] f2fs: clear FI_INC_LINK during the recovery Jaegeuk Kim
2014-08-13 10:18 ` [f2fs-dev] " Chao Yu
2014-08-12 19:49 ` [PATCH 05/13] f2fs: should clear the inline_xattr flag Jaegeuk Kim
2014-08-13 10:19 ` [f2fs-dev] " Chao Yu
2014-08-12 19:49 ` [PATCH 06/13] f2fs: fix to recover inline_xattr/data and blocks Jaegeuk Kim
2014-08-13 10:20 ` [f2fs-dev] " Chao Yu
2014-08-12 19:49 ` [PATCH 07/13] f2fs: avoid bug_on when error is occurred Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 08/13] f2fs: do checkpoint at f2fs_put_super Jaegeuk Kim
2014-08-14 2:57 ` [f2fs-dev] " Chao Yu
2014-08-15 21:54 ` Jaegeuk Kim [this message]
2014-08-15 21:58 ` [PATCH 08/13 v2] " Jaegeuk Kim
2014-08-19 6:41 ` [f2fs-dev] " Chao Yu
2014-08-19 16:11 ` Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 09/13] f2fs: give a chance to mount again when encountering errors Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 10/13] f2fs: introduce f2fs_cp_error for readability Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 11/13] f2fs: unlock_page when node page is redirtied out Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 12/13] f2fs: check s_dirty under cp_mutex Jaegeuk Kim
2014-08-12 19:49 ` [PATCH 13/13] f2fs: handle EIO not to break fs consistency Jaegeuk Kim
2014-08-20 10:35 ` [f2fs-dev] " Chao Yu
2014-08-21 20:33 ` Jaegeuk Kim
2014-08-22 7:57 ` Chao Yu
2014-08-13 7:20 ` [f2fs-dev] [PATCH 01/13] f2fs: should convert inline_data during the mkwrite 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=20140815215027.GA53769@jaegeuk-mac02.mot.com \
--to=jaegeuk@kernel.org \
--cc=chao2.yu@samsung.com \
--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 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®