[f2fs-dev] [PATCH v2] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Chao Yu
Previously if inode is with inline data, we will try to invalid partial inline data in page #0 when we truncate size of inode in truncate_partial_data_page(). And then we set page #0 to dirty, after this we can synchronize inode page with page #0 at ->writepage(). But sometimes we will fail to ope

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Tuesday, March 10, 2015 11:00 AM > To: Chao Yu > Cc: 'Changman Lee'; linux-f2fs-devel@lists.sourceforge.net; > linux-ker...@vger.kernel.org > Subject: Re: [PATCH] f2fs: fix to truncate inline data pas

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Jaegeuk Kim
Hi Chao, On Tue, Mar 10, 2015 at 10:02:46AM +0800, Chao Yu wrote: > Hi Jaegeuk, > [snip] > > > > +static int truncate_partial_data_page(struct inode *inode, u64 from, > > > > bool force) > > > > { > > > > unsigned offset = from & (PAGE_CACHE_SIZE - 1); > > > > struct page *pag

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Tuesday, March 10, 2015 12:16 AM > To: Chao Yu > Cc: 'Changman Lee'; linux-f2fs-devel@lists.sourceforge.net; > linux-ker...@vger.kernel.org > Subject: Re: [PATCH] f2fs: fix to truncate inline data pas

Re: [f2fs-dev] [PATCH] f2fs: fix reference leaks in f2fs_acl_create

2015-03-09 Thread Changman Lee
Reviewed-by: Changman Lee On Mon, Mar 09, 2015 at 06:18:19PM +0800, Chao Yu wrote: > Our f2fs_acl_create is copied and modified from posix_acl_create to avoid > deadlock bug when inline_dentry feature is enabled. > > Now, we got reference leaks in posix_acl_create, and this has been fixed in > c

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Jaegeuk Kim
Hi Chao, On Mon, Mar 09, 2015 at 04:30:32PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Monday, March 09, 2015 11:49 AM > > To: Chao Yu > > Cc: 'Changman Lee'; linux-f2fs-devel@lists.sourceforge.net; > > linux-k

[f2fs-dev] [PATCH] f2fs: fix reference leaks in f2fs_acl_create

2015-03-09 Thread Chao Yu
Our f2fs_acl_create is copied and modified from posix_acl_create to avoid deadlock bug when inline_dentry feature is enabled. Now, we got reference leaks in posix_acl_create, and this has been fixed in commit fed0b588be2f ("posix_acl: fix reference leaks in posix_acl_create") by Omar Sandoval. htt

Re: [f2fs-dev] [PATCH 2/3] f2fs: fix get stale meta pages when build free nids

2015-03-09 Thread Chao Yu
Hi Wanpeng, > -Original Message- > From: Wanpeng Li [mailto:wanpeng...@linux.intel.com] > Sent: Monday, March 09, 2015 12:25 PM > To: Jaegeuk Kim > Cc: Changman Lee; Chao Yu; linux-f2fs-devel@lists.sourceforge.net; > linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; Wanpeng Li >

[f2fs-dev] [PATCH] f2fs: fix to calculate max length of contiguous free slots correctly

2015-03-09 Thread Chao Yu
When lookuping for creating, we will try to record the level of current dentry hash table if current dentry has enough contiguous slots for storing name of new file which will be created later, this can save our lookup time when add a link into parent dir. But currently in find_target_dentry, our

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Monday, March 09, 2015 11:49 AM > To: Chao Yu > Cc: 'Changman Lee'; linux-f2fs-devel@lists.sourceforge.net; > linux-ker...@vger.kernel.org > Subject: Re: [PATCH] f2fs: fix to truncate inline data past