Re: [f2fs-dev] [PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-27 Thread Haicheng Li
On Fri, Dec 27, 2013 at 06:22:03PM +0900, Jaegeuk Kim wrote: > Hi, > > Could you refer the following patch that I sent? > > Re: [PATCH 5/6] f2fs: add the number of inline_data files to status info yes, your patch should have fixed it. thanks.

[f2fs-dev] [PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-26 Thread Haicheng Li
f2fs/data.c: In function 'f2fs_direct_IO': > >> fs/f2fs/f2fs.h:1302:12: error: inlining failed in call to > >> always_inline 'f2fs_has_inline_data': function body not available > inline int f2fs_has_inline_data(struct inode *); ..snip.. Signed-off-by: Haicheng

Re: [f2fs-dev] [PATCH 1/2] f2fs: disable the extent cache ops on high fragmented files

2013-11-20 Thread Haicheng Li
> Signed-off-by: Jaegeuk Kim Function looks good to me. But some nitpicking below for code cleanup.. > @@ -71,6 +71,9 @@ static int check_extent_cache(struct inode *inode, pgoff_t > pgofs, return value could be boolean? > pgoff_t start_fofs, end_fofs; > block_t start_blkaddr; > >

[f2fs-dev] [PATCH] f2fs: use bool for booleans

2013-10-22 Thread Haicheng Li
Signed-off-by: Haicheng Li --- fs/f2fs/checkpoint.c |4 ++-- fs/f2fs/f2fs.h |4 ++-- fs/f2fs/node.c |4 ++-- fs/f2fs/recovery.c |8 fs/f2fs/super.c |2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs

Re: [f2fs-dev] [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 01:34:26PM +0800, Gu Zheng wrote: > On 10/22/2013 01:16 PM, Haicheng Li wrote: > > > On Tue, Oct 22, 2013 at 11:49:58AM +0800, Gao feng wrote: > >> On 10/21/2013 03:24 PM, Gu Zheng wrote: > >>> +static inline void *f2fs_kmem_cach

Re: [f2fs-dev] [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 10:45:48AM +0800, Haicheng Li wrote: > Looks neat. > > Reviewed-by: Haicheng Li pls. ignore this mail. -- October Webinars: Code for Performance Free Intel webinars can help you a

Re: [f2fs-dev] [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 11:49:58AM +0800, Gao feng wrote: > On 10/21/2013 03:24 PM, Gu Zheng wrote: > > +static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, > > + gfp_t flags) > > +{ > > + void *entry = kmem_cache_alloc(cachep, flags); >

Re: [f2fs-dev] [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
Looks neat. Reviewed-by: Haicheng Li On Mon, Oct 21, 2013 at 03:24:55PM +0800, Gu Zheng wrote: > Introduce the unfailed version of kmem_cache_alloc named f2fs_kmem_cache_alloc > to hide the retry routine and make the code a bit cleaner. > > Signed-off-by: Gu Zheng >

[f2fs-dev] [PATCH 2/2] f2fs: no need to check other dirty_segmap when the seg has been found

2013-10-18 Thread Haicheng Li
Because one dirty seg can only be mapped to one dirty_type. Otherwise, it's a bug. Signed-off-by: Haicheng Li --- fs/f2fs/segment.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 862fef3..5ff0524 100644 --- a/fs

[f2fs-dev] [PATCH 1/2] f2fs: use true and false for boolean value

2013-10-18 Thread Haicheng Li
Signed-off-by: Haicheng Li --- fs/f2fs/segment.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 3b20359..862fef3 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1277,9 +1277,9 @@ static bool flush_sits_in_journal

[f2fs-dev] [PATCH 1/3] f2fs: remove unnecessary parameter "offset" from __add_sum_entry()

2013-06-13 Thread Haicheng Li
We can get the value directly from pointer "curseg". Signed-off-by: Haicheng Li --- fs/f2fs/segment.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index be668ff..77f31c0 100644 --- a/fs/f2fs/segment.c +++

[f2fs-dev] [PATCH 3/3] f2fs: optimize do_write_data_page()

2013-06-13 Thread Haicheng Li
Since "need_inplace_update() == true" is a very rare case, using unlikely() to give compiler a chance to optimize the code. Signed-off-by: Haicheng Li --- fs/f2fs/data.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c ind

[f2fs-dev] [PATCH 2/3] f2fs: make locate_dirty_segment() as static

2013-06-13 Thread Haicheng Li
It's used only locally and could be static. Signed-off-by: Haicheng Li --- fs/f2fs/f2fs.h|1 - fs/f2fs/segment.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index a05aa65..3e7cb33 100644 --- a/fs/f2fs/f2fs.h +++ b/fs

[f2fs-dev] [PATCH 0/3] some optimization & code cleanup

2013-06-13 Thread Haicheng Li
Fix some issues found by code review. Haicheng Li (3): f2fs: remove unnecessary parameter "offset" from __add_sum_entry() f2fs: make locate_dirty_segment() as static f2fs: optimize do_write_data_page() fs/f2fs/data.c|5 +++-- fs/f2fs/f2fs.h|1 - fs/f2fs/segmen

Re: [f2fs-dev] [RFC 0/5] Enable f2fs support inline data

2013-06-03 Thread Haicheng Li
00, Huajun Li: > >> f2fs inode is so large, small files can be stored directly in the inode, > >> rather than just storing a single block address and storing the data > >> elsewhere. > >> > >> This RFC patch set is just to enable f2fs support inline da

Re: [f2fs-dev] [RFC 5/5] f2fs: add tracepoints to debug inline data operations

2013-06-03 Thread Haicheng Li
On Mon, Jun 03, 2013 at 09:50:00AM -0400, Steven Rostedt wrote: > Can you convert the above to use DECLARE_EVENT_CLASS() and > DEFINE_EVENT(), as the above three are basically the same. You'll save a > few K in text by doing so. sure, thank you for the review. > > > + > > #endif /* _TRACE_F2FS