Re: [f2fs-dev] [PATCH V2] f2fs: check all ones or zeros bitmap with bitops for better mount performance

2013-10-28 Thread Chao Yu
Hi Lee, > -Original Message- > From: 이창만 [mailto:cm224@samsung.com] > Sent: Monday, October 28, 2013 10:20 AM > To: 'Chao Yu'; jaegeuk@samsung.com > Cc: linux-fsde...@vger.kernel.org; '谭姝'; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: RE: [f2fs-

[f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-28 Thread Shifei Ge
truncate_partial_nodes puts pages incorrectly in two cases.note that the value for argc 'depth' can only be 2 or 3(see truncate_inode_blocks --->truncate_partial_nodes ). first case:err happened in the first 'for' loop assume depth is 2,when err happened,pages[0] is invalid,so this page

[f2fs-dev] [PATCH] f2fs: change the method of calculating the number summary blocks

2013-10-28 Thread Fan Li
Title: Samsung Enterprise Portal mySingle This patch changes the method of calculating the number of summary blocks in function  npages_for_summary_flush. npages_for_summary_flush uses (SUMMARY_SIZE + 1) as the size of a f2fs_summary while the actual size is just SUMMARY_SIZE. As a result, occasio

[f2fs-dev] [PATCH] f2fs: change the method of calculating the number summary blocks

2013-10-28 Thread Fan Li
"There is a HTML error in the previous email, so I send this one.If you already received this before, please ignore it.Sorry for the inconvenience" This patch change the method of calculating the number of summary blocks in function npages_for_summary_flush. npages_for_summary_flush uses (SUMMA

Re: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-28 Thread Jaegeuk Kim
Hi, 2013-10-28 (월), 08:15 +, Shifei Ge: > truncate_partial_nodes puts pages incorrectly in two cases.note that the > value for argc 'depth' can only be 2 or 3(see truncate_inode_blocks > --->truncate_partial_nodes ). > first case:err happened in the first 'for' loop > assume depth is 2

Re: [f2fs-dev] [PATCH] f2fs: change the method of calculating the number summary blocks

2013-10-28 Thread Jaegeuk Kim
Hi, 2013-10-28 (월), 08:54 +, Fan Li: > "There is a HTML error in the previous email, so I send this one.If you > already received this before, please ignore it.Sorry for the inconvenience" > > This patch change the method of calculating the number of summary blocks in > function npages_for

Re: [f2fs-dev] [f2fs-dev 3/5] f2fs: Add a new function: f2fs_reserve_block()

2013-10-28 Thread Jaegeuk Kim
2013-10-28 (월), 21:16 +0900, Jaegeuk Kim: Hi, > > 2013-10-26 (토), 00:01 +0800, Huajun Li: > > From: Huajun Li > > > > Add the function f2fs_reserve_block() to easily reserve new blocks. > > > > Signed-off-by: Huajun Li > > Signed-off-by: Haicheng Li > > Signed-off-by: Weihong Xu > > --- > >

Re: [f2fs-dev] [f2fs-dev 4/5] f2fs: Key functions to handle inline data

2013-10-28 Thread Jaegeuk Kim
Hi, 2013-10-26 (토), 00:01 +0800, Huajun Li: > From: Huajun Li > > Functions to implement inline data read/write, and move inline data to > normal data block when file size exceeds inline data limitation. > > Signed-off-by: Huajun Li > Signed-off-by: Haicheng Li > Signed-off-by: Weihong Xu >

Re: [f2fs-dev] [f2fs-dev 5/5] f2fs: Handle inline data operations

2013-10-28 Thread Jaegeuk Kim
Hi, 2013-10-26 (토), 00:01 +0800, Huajun Li: > From: Huajun Li > [snip] > > @@ -538,7 +553,7 @@ static int f2fs_write_data_page(struct page *page, > loff_t i_size = i_size_read(inode); > const pgoff_t end_index = ((unsigned long long) i_size) >

Re: [f2fs-dev] [f2fs-dev 3/5] f2fs: Add a new function: f2fs_reserve_block()

2013-10-28 Thread Huajun Li
Hi Jaegeuk, Thanks for your kindly review and comments. On Mon, Oct 28, 2013 at 8:28 PM, Jaegeuk Kim wrote: > 2013-10-28 (월), 21:16 +0900, Jaegeuk Kim: > Hi, > >> >> 2013-10-26 (토), 00:01 +0800, Huajun Li: >> > From: Huajun Li >> > >> > Add the function f2fs_reserve_block() to easily reserve ne

Re: [f2fs-dev] [f2fs-dev 5/5] f2fs: Handle inline data operations

2013-10-28 Thread Huajun Li
On Mon, Oct 28, 2013 at 8:44 PM, Jaegeuk Kim wrote: > Hi, > > 2013-10-26 (토), 00:01 +0800, Huajun Li: >> From: Huajun Li >> > > [snip] > >> >> @@ -538,7 +553,7 @@ static int f2fs_write_data_page(struct page *page, >> loff_t i_size = i_size_read(inode); >> const pgoff_t end_index = ((u

Re: [f2fs-dev] [f2fs-dev 4/5] f2fs: Key functions to handle inline data

2013-10-28 Thread Huajun Li
On Mon, Oct 28, 2013 at 8:43 PM, Jaegeuk Kim wrote: > Hi, > > 2013-10-26 (토), 00:01 +0800, Huajun Li: >> From: Huajun Li >> >> Functions to implement inline data read/write, and move inline data to >> normal data block when file size exceeds inline data limitation. >> >> Signed-off-by: Huajun Li

Re: [f2fs-dev] [f2fs-dev 3/5] f2fs: Add a new function: f2fs_reserve_block()

2013-10-28 Thread Jaegeuk Kim
Hi Huajun, 2013-10-29 (화), 00:53 +0800, Huajun Li: > Hi Jaegeuk, > > Thanks for your kindly review and comments. > > On Mon, Oct 28, 2013 at 8:28 PM, Jaegeuk Kim wrote: > > 2013-10-28 (월), 21:16 +0900, Jaegeuk Kim: > > Hi, > > > >> > >> 2013-10-26 (토), 00:01 +0800, Huajun Li: > >> > From: Huaju

Re: [f2fs-dev] [f2fs-dev 4/5] f2fs: Key functions to handle inline data

2013-10-28 Thread Jaegeuk Kim
Hi, 2013-10-29 (화), 01:20 +0800, Huajun Li: > On Mon, Oct 28, 2013 at 8:43 PM, Jaegeuk Kim wrote: > > Hi, > > > > 2013-10-26 (토), 00:01 +0800, Huajun Li: > >> From: Huajun Li > >> > >> Functions to implement inline data read/write, and move inline data to > >> normal data block when file size ex

[f2fs-dev] [PATCH] f2fs: fix calculating incorrect free size when update xattr in __f2fs_setxattr

2013-10-28 Thread Chao Yu
During xattr updating, free size should be corrected to remainder free size + old entry size. It can avoid ENOSPC error when we update old entry with the same size new entry at fully filled xattr. Signed-off-by: Chao Yu --- fs/f2fs/xattr.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[f2fs-dev] [PATCH V2 RESEND] f2fs: check all ones or zeros bitmap with bitops for better mount performance

2013-10-28 Thread Chao Yu
Previously, check_block_count check valid_map with bit data type in common scenario that sit has all ones or zeros bitmap, it makes low mount performance. So let's check the special bitmap with integer data type instead of the bit one. v1-->v2: use find_next_{zero_}bit_le for better performan

[f2fs-dev] [PATCH 2/2] f2fs: add an option to avoid unnecessary BUG_ONs

2013-10-28 Thread Jaegeuk Kim
If you want to remove unnecessary BUG_ONs, you can just turn off F2FS_CHECK_FS in your kernel config. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 10 +- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c| 2 +- fs/f2fs/f2fs.h | 22 ++ fs/f2fs/file.

[f2fs-dev] [PATCH 1/2] f2fs: introduce CONFIG_F2FS_CHECK_FS for BUG_ON control

2013-10-28 Thread Jaegeuk Kim
This config will support an option to remove so many BUG_ONs that degrade the performance potentially. Signed-off-by: Jaegeuk Kim --- fs/f2fs/Kconfig | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig index e06e099..214fe10 100644 --- a/fs/f2fs/Kconfig