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

2013-10-29 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 chao2...@samsung.com --- fs/f2fs/xattr.c |2 +- 1 file changed, 1

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

2013-10-29 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

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

2013-10-29 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 jaegeuk@samsung.com --- fs/f2fs/checkpoint.c | 10 +- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c| 2 +- fs/f2fs/f2fs.h | 22

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

2013-10-29 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 jaegeuk@samsung.com --- fs/f2fs/Kconfig | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig index e06e099..214fe10

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

2013-10-29 Thread shifei10.ge
Hi,I think we don't need to put the invalid page that get_node_page returned. So I add idx = i-- based on your version.Following is the patch: --- fs/f2fs/node.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index

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

2013-10-29 Thread Changman Lee
Review attached patch, please. -Original Message- From: Chao Yu [mailto:chao2...@samsung.com] Sent: Tuesday, October 29, 2013 3:51 PM To: jaegeuk@samsung.com Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net Subject: [f2fs-dev]

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

2013-10-29 Thread Fan Li
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

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

2013-10-29 Thread Jaegeuk Kim
Hi, 2013-10-29 (화), 15:32 +0800, shifei10.ge: Hi,I think we don't need to put the invalid page that get_node_page returned. So I add idx = i-- based on your version.Following is the patch: --- fs/f2fs/node.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

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

2013-10-29 Thread shifei10.ge
-Original Message- From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] Sent: Tuesday, October 29, 2013 3:43 PM To: shifei10.ge Cc: '??'; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; linux- f2fs-de...@lists.sourceforge.net Subject: RE: [f2fs-dev] [PATCH] f2fs:fix

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

2013-10-29 Thread Fan Li
npages_for_summary_flush uses (SUMMARY_SIZE + 1) as the size of a f2fs_summary while its actual size is SUMMARY_SIZE. So the result sometimes is bigger than actual number by one, which causes checkpoint can't be written into disk contiguously, and sometimes summary blocks can't be compacted

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

2013-10-29 Thread Chao Yu
Hi Lee, It's a good point. Firstly, In your patch: /* check bitmap with valid block count */ for (i = 0; i sbi-blocks_per_seg; i++) - if (f2fs_test_bit(i, raw_sit-valid_map)) - valid_blocks++; + valid_blocks +=

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

2013-10-29 Thread Huajun Li
On Tue, Oct 29, 2013 at 8:56 AM, Jaegeuk Kim jaegeuk@samsung.com wrote: 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 jaegeuk@samsung.com wrote: 2013-10-28 (월), 21:16 +0900,

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

2013-10-29 Thread Changman Lee
Firstly, Thanks. You're right. And I don't know it would be optimized but considering pipeline. for ( i =0; i SIT_VBLOCK_MAP_SIZE; i += 4) { valid_blocks += bit_count_byte(raw_sit-valid_map[i]; valid_blocks += bit_count_byte(raw_sit-valid_map[i+1]; valid_blocks +=

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

2013-10-29 Thread Changman Lee
As you know, if any data or function are used once, we can use some keywords like __initdata for data and __init for function. -Original Message- From: Chao Yu [mailto:chao2...@samsung.com] Sent: Tuesday, October 29, 2013 7:52 PM To: 'Changman Lee'; jaegeuk@samsung.com Cc:

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

2013-10-29 Thread Chao Yu
Hi Lee, -Original Message- From: Changman Lee [mailto:cm224@samsung.com] Sent: Wednesday, October 30, 2013 7:25 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: