From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao2.yu@samsung.com>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] f2fs: fix to release inode correctly
Date: Tue, 25 Aug 2015 15:17:36 -0700 [thread overview]
Message-ID: <20150825221736.GA12070@jaegeuk-mac02.mot.com> (raw)
In-Reply-To: <000001d0ded7$1aa9e0a0$4ffda1e0$@samsung.com>
On Tue, Aug 25, 2015 at 09:39:55AM +0800, Chao Yu wrote:
> Hi Jaegeuk,
>
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > Sent: Tuesday, August 25, 2015 12:54 AM
> > To: Chao Yu
> > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH 2/2] f2fs: fix to release inode correctly
> >
>
> [snip]
>
> > > + * if we skip truncate_node in remove_inode_page bacause we failed
> > > + * before, it's better to find another way to release resource of
> > > + * this inode (e.g. valid block count, node block or nid). Here we
> > > + * choose to add this inode to orphan list, so that we can call iput
> > > + * for releasing in orphan recovery flow.
> > > + *
> > > + * Note: we should add inode to orphan list before f2fs_unlock_op()
> > > + * so we can prevent losing this orphan when encoutering checkpoint
> > > + * and following suddenly power-off.
> > > + */
> > > + if (err && err != -ENOENT) {
> > > + err = acquire_orphan_inode(sbi);
> > > + if (!err)
> > > + add_orphan_inode(sbi, inode->i_ino);
> >
> > Need this too?
> >
> > if (err)
> > set_sbi_flag(sbi, SBI_NEED_FSCK);
>
> We have another chance to release inode resource in following path:
> - handle_failed_inode
> - iput
> - f2fs_evict_inode
> - f2fs_truncate
> - remove_inode_page
>
> So I choose to set SBI_NEED_FSCK in the end of f2fs_evict_inode.
Oh, got it. :)
>
> Thanks,
prev parent reply other threads:[~2015-08-25 22:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 9:40 Chao Yu
2015-08-24 16:54 ` Jaegeuk Kim
2015-08-24 22:52 ` [f2fs-dev] " Jaegeuk Kim
2015-08-25 6:38 ` Chao Yu
2015-08-25 22:40 ` Jaegeuk Kim
2015-08-26 12:46 ` Chao Yu
2015-08-25 1:39 ` Chao Yu
2015-08-25 22:17 ` Jaegeuk Kim [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=20150825221736.GA12070@jaegeuk-mac02.mot.com \
--to=jaegeuk@kernel.org \
--cc=chao2.yu@samsung.com \
--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®