* [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode @ 2014-07-31 13:13 Chao Yu 2014-08-02 14:42 ` [f2fs-dev][PATCH " Jaegeuk Kim 0 siblings, 1 reply; 5+ messages in thread From: Chao Yu @ 2014-07-31 13:13 UTC (permalink / raw) To: Jaegeuk Kim, Changman Lee; +Cc: linux-f2fs-devel, linux-fsdevel, linux-kernel When inode is evicted, all the page cache belong to this inode should be released including the xattr node page. But previously we didn't do this, this patch fixed this issue. Signed-off-by: Chao Yu <chao2.yu@samsung.com> --- fs/f2fs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 0e69aa9..8a5403b 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -267,10 +267,16 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) void f2fs_evict_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); + struct f2fs_inode_info *fi = F2FS_I(inode); trace_f2fs_evict_inode(inode); + truncate_inode_pages_final(&inode->i_data); + if (fi->i_xattr_nid) + invalidate_mapping_pages(NODE_MAPPING(sbi), + fi->i_xattr_nid, fi->i_xattr_nid); + if (inode->i_ino == F2FS_NODE_INO(sbi) || inode->i_ino == F2FS_META_INO(sbi)) goto out_clear; -- 2.0.1.474.g72c7794 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] f2fs: invalidate xattr node page when evict inode 2014-07-31 13:13 [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode Chao Yu @ 2014-08-02 14:42 ` Jaegeuk Kim 0 siblings, 0 replies; 5+ messages in thread From: Jaegeuk Kim @ 2014-08-02 14:42 UTC (permalink / raw) To: Chao Yu; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel Hi Chao, On Thu, Jul 31, 2014 at 09:13:11PM +0800, Chao Yu wrote: > When inode is evicted, all the page cache belong to this inode should be > released including the xattr node page. But previously we didn't do this, this > patch fixed this issue. > > Signed-off-by: Chao Yu <chao2.yu@samsung.com> > --- > fs/f2fs/inode.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c > index 0e69aa9..8a5403b 100644 > --- a/fs/f2fs/inode.c > +++ b/fs/f2fs/inode.c > @@ -267,10 +267,16 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) > void f2fs_evict_inode(struct inode *inode) > { > struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); > + struct f2fs_inode_info *fi = F2FS_I(inode); > > trace_f2fs_evict_inode(inode); > + > truncate_inode_pages_final(&inode->i_data); > > + if (fi->i_xattr_nid) > + invalidate_mapping_pages(NODE_MAPPING(sbi), > + fi->i_xattr_nid, fi->i_xattr_nid); It would be good to place this below with invalidate_mapping_paages(ino). Since, in the case of deletion, we need to get the xattr node page again on the remove_inode_page call path. Thanks, > + > if (inode->i_ino == F2FS_NODE_INO(sbi) || > inode->i_ino == F2FS_META_INO(sbi)) > goto out_clear; > -- > 2.0.1.474.g72c7794 ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode @ 2014-08-02 14:42 ` Jaegeuk Kim 0 siblings, 0 replies; 5+ messages in thread From: Jaegeuk Kim @ 2014-08-02 14:42 UTC (permalink / raw) To: Chao Yu; +Cc: Changman Lee, linux-f2fs-devel, linux-fsdevel, linux-kernel Hi Chao, On Thu, Jul 31, 2014 at 09:13:11PM +0800, Chao Yu wrote: > When inode is evicted, all the page cache belong to this inode should be > released including the xattr node page. But previously we didn't do this, this > patch fixed this issue. > > Signed-off-by: Chao Yu <chao2.yu@samsung.com> > --- > fs/f2fs/inode.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c > index 0e69aa9..8a5403b 100644 > --- a/fs/f2fs/inode.c > +++ b/fs/f2fs/inode.c > @@ -267,10 +267,16 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) > void f2fs_evict_inode(struct inode *inode) > { > struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); > + struct f2fs_inode_info *fi = F2FS_I(inode); > > trace_f2fs_evict_inode(inode); > + > truncate_inode_pages_final(&inode->i_data); > > + if (fi->i_xattr_nid) > + invalidate_mapping_pages(NODE_MAPPING(sbi), > + fi->i_xattr_nid, fi->i_xattr_nid); It would be good to place this below with invalidate_mapping_paages(ino). Since, in the case of deletion, we need to get the xattr node page again on the remove_inode_page call path. Thanks, > + > if (inode->i_ino == F2FS_NODE_INO(sbi) || > inode->i_ino == F2FS_META_INO(sbi)) > goto out_clear; > -- > 2.0.1.474.g72c7794 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] f2fs: invalidate xattr node page when evict inode 2014-08-02 14:42 ` [f2fs-dev][PATCH " Jaegeuk Kim @ 2014-08-04 1:42 ` Chao Yu -1 siblings, 0 replies; 5+ messages in thread From: Chao Yu @ 2014-08-04 1:42 UTC (permalink / raw) To: 'Jaegeuk Kim'; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Saturday, August 02, 2014 10:42 PM > To: Chao Yu > Cc: Changman Lee; linux-f2fs-devel@lists.sourceforge.net; linux-fsdevel@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: Re: [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode > > Hi Chao, > > On Thu, Jul 31, 2014 at 09:13:11PM +0800, Chao Yu wrote: > > When inode is evicted, all the page cache belong to this inode should be > > released including the xattr node page. But previously we didn't do this, this > > patch fixed this issue. > > > > Signed-off-by: Chao Yu <chao2.yu@samsung.com> > > --- > > fs/f2fs/inode.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c > > index 0e69aa9..8a5403b 100644 > > --- a/fs/f2fs/inode.c > > +++ b/fs/f2fs/inode.c > > @@ -267,10 +267,16 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) > > void f2fs_evict_inode(struct inode *inode) > > { > > struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); > > + struct f2fs_inode_info *fi = F2FS_I(inode); > > > > trace_f2fs_evict_inode(inode); > > + > > truncate_inode_pages_final(&inode->i_data); > > > > + if (fi->i_xattr_nid) > > + invalidate_mapping_pages(NODE_MAPPING(sbi), > > + fi->i_xattr_nid, fi->i_xattr_nid); > > It would be good to place this below with invalidate_mapping_paages(ino). > Since, in the case of deletion, we need to get the xattr node page again > on the remove_inode_page call path. Yes, IMO, it will be OK now when using above implementation because we will invalidate this xattr page in truncate_node(), but I'd like use your method because it's better to guarantee invalidating xattr page by evict_inode itself. I will send a v2 patch, and thanks for your suggestion. Regards, Yu > > Thanks, > > > + > > if (inode->i_ino == F2FS_NODE_INO(sbi) || > > inode->i_ino == F2FS_META_INO(sbi)) > > goto out_clear; > > -- > > 2.0.1.474.g72c7794 ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode @ 2014-08-04 1:42 ` Chao Yu 0 siblings, 0 replies; 5+ messages in thread From: Chao Yu @ 2014-08-04 1:42 UTC (permalink / raw) To: 'Jaegeuk Kim' Cc: 'Changman Lee', linux-f2fs-devel, linux-fsdevel, linux-kernel Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Saturday, August 02, 2014 10:42 PM > To: Chao Yu > Cc: Changman Lee; linux-f2fs-devel@lists.sourceforge.net; linux-fsdevel@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: Re: [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode > > Hi Chao, > > On Thu, Jul 31, 2014 at 09:13:11PM +0800, Chao Yu wrote: > > When inode is evicted, all the page cache belong to this inode should be > > released including the xattr node page. But previously we didn't do this, this > > patch fixed this issue. > > > > Signed-off-by: Chao Yu <chao2.yu@samsung.com> > > --- > > fs/f2fs/inode.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c > > index 0e69aa9..8a5403b 100644 > > --- a/fs/f2fs/inode.c > > +++ b/fs/f2fs/inode.c > > @@ -267,10 +267,16 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) > > void f2fs_evict_inode(struct inode *inode) > > { > > struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); > > + struct f2fs_inode_info *fi = F2FS_I(inode); > > > > trace_f2fs_evict_inode(inode); > > + > > truncate_inode_pages_final(&inode->i_data); > > > > + if (fi->i_xattr_nid) > > + invalidate_mapping_pages(NODE_MAPPING(sbi), > > + fi->i_xattr_nid, fi->i_xattr_nid); > > It would be good to place this below with invalidate_mapping_paages(ino). > Since, in the case of deletion, we need to get the xattr node page again > on the remove_inode_page call path. Yes, IMO, it will be OK now when using above implementation because we will invalidate this xattr page in truncate_node(), but I'd like use your method because it's better to guarantee invalidating xattr page by evict_inode itself. I will send a v2 patch, and thanks for your suggestion. Regards, Yu > > Thanks, > > > + > > if (inode->i_ino == F2FS_NODE_INO(sbi) || > > inode->i_ino == F2FS_META_INO(sbi)) > > goto out_clear; > > -- > > 2.0.1.474.g72c7794 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-08-04 1:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-31 13:13 [f2fs-dev][PATCH 2/2] f2fs: invalidate xattr node page when evict inode Chao Yu 2014-08-02 14:42 ` [PATCH " Jaegeuk Kim 2014-08-02 14:42 ` [f2fs-dev][PATCH " Jaegeuk Kim 2014-08-04 1:42 ` [PATCH " Chao Yu 2014-08-04 1:42 ` [f2fs-dev][PATCH " Chao Yu
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.