[f2fs-dev] [PATCH 1/3 v2] f2fs:remove unnecessary condition judgment

2015-03-08 Thread Yuan Zhong
Remove the unnecessary condition judgment, because 'max_slots' has been initialized to '0' at the beginging of the function, as following: if (max_slots) *max_slots = 0; Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c |2 +- 1 file changed, 1 insertion(+),

Re: Re: [f2fs-dev] [PATCH 1/3] f2fs:remove unnecessary condition judgment

2015-03-08 Thread Yuan Zhong
Hi Lee, >On Sat, Mar 07, 2015 at 10:05:25AM +0000, Yuan Zhong wrote: >> Remove the unnecessary condition judgment, because >> 'max_slots' has been initialized to '0' at the beginging >> of the function, as following: >> if (max_slots) >>

[f2fs-dev] [PATCH 3/3] f2fs:use enum dentrt_ptr type to replace constant use

2015-03-07 Thread Yuan Zhong
The function make_dentry_ptr has an argument 'int type'. This argument is used to distinguish 'block dentry' and 'inline dentry'. We used 1 and 2 as the type. To make code more readable, we use enum type to replace constant use. Signed-off-by: Yuan Zhong

[f2fs-dev] [PATCH 2/3] f2fs:set the correct place of initializing *res_page

2015-03-07 Thread Yuan Zhong
The function 'find_in_inline_dir()' contain 'res_page' as an argument. So, we should initiaize 'res_page' before this function. Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2

[f2fs-dev] [PATCH 1/3] f2fs:remove unnecessary condition judgment

2015-03-07 Thread Yuan Zhong
Remove the unnecessary condition judgment, because 'max_slots' has been initialized to '0' at the beginging of the function, as following: if (max_slots) max_len = 0; Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c |2 +- 1 file changed, 1 insertion(+),

[f2fs-dev] [PATCH] f2fs: remove the needless parameter of f2fs_wait_on_page_writeback

2014-01-09 Thread Yuan Zhong
"boo sync" parameter is never referenced in f2fs_wait_on_page_writeback. We should remove this parameter. Signed-off-by: Yuan Zhong --- fs/f2fs/data.c|2 +- fs/f2fs/f2fs.h|2 +- fs/f2fs/gc.c |4 ++-- fs/f2fs/inline.c |2 +- fs/f2fs/inode.c |2 +

Re: [f2fs-dev] [PATCH v2] f2fs: avoid congestion_wait when do_checkpoint for better performance

2013-10-08 Thread Yuan Zhong
Hi Gu, > Hi Yuan, > On 10/08/2013 07:30 PM, Yuan Zhong wrote: > >> Hi Gu, >> >>> Hi Yuan, >>> On 10/08/2013 04:30 PM, Yuan Zhong wrote: >> >>>> Previously, do_checkpoint() will call congestion_wait() for waiting the >>>&g

Re: [f2fs-dev] [PATCH v2] f2fs: avoid congestion_wait when do_checkpoint for better performance

2013-10-08 Thread Yuan Zhong
Hi Gu, > Hi Yuan, > On 10/08/2013 04:30 PM, Yuan Zhong wrote: > > Previously, do_checkpoint() will call congestion_wait() for waiting the > > pages (previous submitted node/meta/data pages) to be written back. > > Because congestion_wait() will set a regular pe

[f2fs-dev] [PATCH v2] f2fs: avoid congestion_wait when do_checkpoint for better performance

2013-10-08 Thread Yuan Zhong
written back, and will be waked up by contrast. Signed-off-by: Yuan Zhong --- fs/f2fs/checkpoint.c |3 +-- fs/f2fs/f2fs.h | 19 +++ fs/f2fs/segment.c|1 + fs/f2fs/super.c |1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/fs/f2fs

[f2fs-dev][PATCH]f2fs: avoid congestion_wait when do_checkpoint for better performance

2013-09-30 Thread Yuan Zhong
written back, and will be waked up by contrast. Signed-off-by: Yuan Zhong --- fs/f2fs/checkpoint.c | 3 +-- fs/f2fs/f2fs.h | 19 +++ fs/f2fs/segment.c| 1 + fs/f2fs/super.c | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c