Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1213406

Re: [PATCH 2/2] f2fs: fix to release inode correctly

From Jaegeuk Kim <jaegeuk@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] f2fs: fix to release inode correctly
Date 2015-08-26 00:20 +0200
Message-ID <q1uJs-3bA-11@gated-at.bofh.it> (permalink)
References <q0Wy5-3WH-5@gated-at.bofh.it> <q13gf-56Y-37@gated-at.bofh.it> <q1bx7-oq-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] f2fs: fix to release inode correctly Chao Yu <chao2.yu@samsung.com> - 2015-08-24 11:50 +0200
  Re: [PATCH 2/2] f2fs: fix to release inode correctly Jaegeuk Kim <jaegeuk@kernel.org> - 2015-08-24 19:00 +0200
    Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to release inode correctly Jaegeuk Kim <jaegeuk@kernel.org> - 2015-08-25 01:00 +0200
      RE: [f2fs-dev] [PATCH 2/2] f2fs: fix to release inode correctly Chao Yu <chao2.yu@samsung.com> - 2015-08-25 08:50 +0200
        Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to release inode correctly Jaegeuk Kim <jaegeuk@kernel.org> - 2015-08-26 00:50 +0200
          RE: [f2fs-dev] [PATCH 2/2] f2fs: fix to release inode correctly Chao Yu <chao2.yu@samsung.com> - 2015-08-26 14:50 +0200
    RE: [PATCH 2/2] f2fs: fix to release inode correctly Chao Yu <chao2.yu@samsung.com> - 2015-08-25 03:50 +0200
      Re: [PATCH 2/2] f2fs: fix to release inode correctly Jaegeuk Kim <jaegeuk@kernel.org> - 2015-08-26 00:20 +0200

csiph-web