Re: [f2fs-dev] [PATCH 1/2] f2fs: add remount_fs callback support

2013-06-03 Thread Gu Zheng
On 06/01/2013 03:20 PM, Namjae Jeon wrote: From: Namjae Jeon namjae.j...@samsung.com Add the f2fs_remount function call which will be used during the filesystem remounting. This function will help us to change the mount options specific to f2fs. Also modify the f2fs background_gc mount

[f2fs-dev] [PATCH RESEND] f2fs: Remove the unused argument sbi of func destroy_fsync_dnodes()

2013-06-26 Thread Gu Zheng
As destroy_fsync_dnodes() is a simple list-cleanup func, so delete the unused and unrelated f2fs_sb_info argument of it. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/recovery.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs

[f2fs-dev] [PATCH] f2fs: add a help func F2FS_STAT() to get the f2fs_stat_info

2013-07-12 Thread Gu Zheng
Add a help func F2FS_STAT() to get the f2fs_stat_info. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/debug.c | 16 fs/f2fs/f2fs.h | 11 --- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index

Re: [f2fs-dev] [PATCH RESEND] f2fs: Modify do_garbage_collect() to collect all the segs in once

2013-07-14 Thread Gu Zheng
+0800, Gu Zheng: Current do_garbage_collect() collect per segment per time. If there are more than one segments in section, we need to call do_garbage_collect() many times to collect all the segments(current is a for loop). We can move the loop into the do_garbage_collect(), so that we can

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-10 Thread Gu Zheng
Hi Jaegeuk, On 09/10/2013 08:59 AM, Jaegeuk Kim wrote: Hi, 2013-09-07 (토), 08:00 +, Chao Yu: Hi Knize, Thanks for your reply, I think it's actually meaningless that it's being named after spin_lock, it's better to rename this spinlock to round_robin_lock. This patch can

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-10 Thread Gu Zheng
Hi Jaegeuk, Chao, On 09/10/2013 08:52 AM, Jaegeuk Kim wrote: Hi, At first, thank you for the report and please follow the email writing rules. :) Anyway, I agree to the below issue. One thing that I can think of is that we don't need to use the spin_lock, since we don't care about the

[f2fs-dev] [PATCH V2] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Gu Zheng
-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 608f0df..7fd99d8 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -544,15 +544,15 @@ static inline void mutex_unlock_all

Re: [f2fs-dev] [PATCH RESEND] f2fs: avoid allocating failure in bio_alloc

2013-09-15 Thread Gu Zheng
Hi Chao, On 09/16/2013 11:26 AM, Chao Yu wrote: Hi Gu -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Monday, September 16, 2013 10:09 AM To: Chao Yu Cc: Kim Jaegeuk; linux-f2fs-devel@lists.sourceforge.net; linux-fsde...@vger.kernel.org; linux-ker

Re: [f2fs-dev] [RFC 1/1] f2fs: don't GC or take an fs_lock from f2fs_initxattrs()

2013-09-24 Thread Gu Zheng
. Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/xattr.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 1ac8a5f..3d900ea 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c

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

2013-10-08 Thread Gu Zheng
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 period (e.g. HZ / 50 ) for waiting. For this reason,

[f2fs-dev] [PATCH] f2fs: introduce function read_raw_super_block()

2013-10-08 Thread Gu Zheng
Introduce function read_raw_super_block() to hide reading raw super block and the retry routine if the first sb is invalid. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/super.c | 54 +- 1 files changed, 33 insertions(+), 21

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

2013-10-08 Thread Gu Zheng
in my patch. Saw it.:) But one problem is that the checkpoint routine always is singleton, so the wait queue just services only one body, it seems not very worthy. How about just schedule and wake up it directly? See the following one. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs

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

2013-10-10 Thread Gu Zheng
-fsde...@vger.kernel.org; shu@samsung.com Subject: Re: [f2fs-dev] [PATCH v2] f2fs: avoid congestion_wait when do_checkpoint for better performance Hi Yuan, On 10/08/2013 07:30 PM, Yuan Zhong wrote: ... Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 11

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

2013-10-10 Thread Gu Zheng
Hi Yuan, On 10/08/2013 07:30 PM, Yuan Zhong wrote: ... Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 11 +-- fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 4 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH] f2fs: avoid wait if IO end up when do_checkpoint for better performance

2013-10-14 Thread Gu Zheng
on, and in the end IO path, wake up checkpoint task when IO ends up. Thanks to Yuan Zhong's pre work about this problem. Reported-by: Yuan Zhong yuan.mark.zh...@samsung.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 11 +-- fs/f2fs/f2fs.h |1 + fs/f2fs

[f2fs-dev] [PATCH RESEND] f2fs: introduce function read_raw_super_block()

2013-10-14 Thread Gu Zheng
Introduce function read_raw_super_block() to hide reading raw super block and the retry routine if the first sb is invalid. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/super.c | 54 +- 1 files changed, 33 insertions(+), 21

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

2013-10-21 Thread Gu Zheng
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 guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 26 +++--- fs/f2fs/f2fs.h | 13 + fs/f2fs

[f2fs-dev] [PATCH] f2fs: delete and free dirty dir freeing inode entry when sync dirty dir inodes

2013-10-21 Thread Gu Zheng
. So add the delete and free step to fix it. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 8d16071..f61838f 100644 --- a/fs/f2fs

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

2013-10-21 Thread Gu Zheng
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_cache_alloc(struct kmem_cache *cachep, + gfp_t flags) +{ + void *entry

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

2013-10-21 Thread Gu Zheng
On 10/22/2013 11:49 AM, 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); +retry: retry after

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

2013-10-22 Thread Gu Zheng
On 10/22/2013 02:15 PM, Haicheng Li wrote: 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_cache_alloc(struct

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

2013-10-22 Thread Gu Zheng
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. v2: Fix the wrong use of 'retry' tag pointed out by Gao feng. Use more neat code to remove redundant tag suggested by Haicheng Li. Signed-off-by: Gu

Re: [f2fs-dev] [PATCH] f2fs: delete and free dirty dir freeing inode entry when sync dirty dir inodes

2013-10-23 Thread Gu Zheng
Hi Kim, On 10/22/2013 07:15 PM, Jaegeuk Kim wrote: 2013-10-21 (월), 15:19 +0800, Gu Zheng: In sync_dirty_dir_inodes(), remove_dirty_dir_inode() will be called in the callback of filemap_flush to delete and free dirty dir inode entry. But for the freeing inode entry, missed this step after

Re: [f2fs-dev] [PATCH] f2fs: clean up several status-related operations

2013-10-23 Thread Gu Zheng
On 10/23/2013 05:46 PM, Jaegeuk Kim wrote: This patch cleans up improper definitions that update some status information. Nice, it makes the code more neat. Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 8

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

2013-10-24 Thread Gu Zheng
Hi Yu, On 10/24/2013 04:21 PM, Chao Yu wrote: 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. v2:

Re: [f2fs-dev] [PATCH] f2fs: avoid to use a NULL point in destroy_segment_manager

2013-11-05 Thread Gu Zheng
On 11/06/2013 09:12 AM, Chao Yu wrote: A NULL point should avoid to be used in destroy_segment_manager after allocating memory fail for f2fs_sm_info. Though without this patch it still can work well, because if it failed to allocate f2fs_sm_info, the sit_info, free_info... all were NULL, and

Re: [f2fs-dev] [PATCH] f2fs: avoid to use a NULL point in destroy_segment_manager

2013-11-05 Thread Gu Zheng
On 11/06/2013 01:10 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Wednesday, November 06, 2013 11:41 AM To: Chao Yu Cc: ???; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read

2013-11-18 Thread Gu Zheng
as the one for write. Please consider 80 columns for the description. I cannot fix this at every time though. :( Got it, sorry about my carelessness in previous patch. v1--v2: o add declarations here as Gu Zheng suggested. Signed-off-by: Chao Yu chao2...@samsung.com Acked-by: Gu Zheng

[f2fs-dev] [PATCH 0/5] f2fs: some minor cleanups and logic fixes

2013-11-19 Thread Gu Zheng
Gu Zheng (5): f2fs: convert remove_inode_page to void f2fs: convert dev_valid_block_count to void f2fs: convert inc/dec_valid_node_count to inc/dec one count f2fs: simplify write_orphan_inodes for better readable f2fs: move the list_head initialization into the lock protection

[f2fs-dev] [PATCH 3/5] f2fs: convert inc/dec_valid_node_count to inc/dec one count

2013-11-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h | 32 +++- fs/f2fs/node.c |6 +++--- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index d0c6738..125bef0 100644 --- a/fs/f2fs/f2fs.h +++ b/fs

[f2fs-dev] [PATCH 1/5] f2fs: convert remove_inode_page to void

2013-11-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |2 +- fs/f2fs/node.c | 12 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 89dc750..94fbec3 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1027,7

[f2fs-dev] [PATCH 2/5] f2fs: convert dev_valid_block_count to void

2013-11-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 94fbec3..d0c6738 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -585,7 +585,7 @@ static inline bool

[f2fs-dev] [PATCH 4/5] f2fs: simplify write_orphan_inodes for better readable

2013-11-19 Thread Gu Zheng
Simplify write_orphan_inodes for better readable. Because we hold the orphan_inode_mutex, so it's safe to use list_for_each_entry instead of list_for_each_safe. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 38 ++ 1 files

[f2fs-dev] [PATCH 5/5] f2fs: move the list_head initialization into the lock protection region

2013-11-19 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index f884589..1de70cc 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c

Re: [f2fs-dev] [PATCH] f2fs: remove the own bi_private allocation

2013-12-01 Thread Gu Zheng
. - Since we have no dependancies to remove bi_private now, let's just use bi_private pointer as the completion pointer. Cool, looks good to me.:) Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/segment.c | 43

Re: [f2fs-dev] [PATCH] f2fs: refactor bio-related operations

2013-12-01 Thread Gu Zheng
to submit the merged bio. 4. Change f2fs_readpage to f2fs_submit_page_bio. 5. Introduce f2fs_submit_page_mbio to integrate previous submit_read_page and submit_write_page. Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com Reviewed-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs

[f2fs-dev] [PATCH] f2fs: move all the bio initialization into __bio_alloc

2013-12-18 Thread Gu Zheng
Move all the bio initialization into __bio_alloc, and some minor cleanups are also added. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/data.c | 93 ++-- 1 files changed, 43 insertions(+), 50 deletions(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH v2] f2fs: move all the bio initialization into __bio_alloc

2013-12-19 Thread Gu Zheng
Move all the bio initialization into __bio_alloc, and some minor cleanups are also added. v2: Use 'is_read' rather than 'rw' as Yu Chao suggested. Remove the needless initialization of bio-bi_private. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/data.c | 92

[f2fs-dev] [PATCH] f2fs: remove the rw_flag domain from f2fs_io_info

2013-12-20 Thread Gu Zheng
When using the f2fs_io_info in the low level, we still need to merge the rw and rw_flag, so use the rw to hold all the io flags directly, and remove the rw_flag field. ps.It is based on the previous patch: f2fs: move all the bio initialization into __bio_alloc Signed-off-by: Gu Zheng guz.f

[f2fs-dev] [PATCH] f2fs: convert max_orphans to a field of f2fs_sb_info

2013-12-26 Thread Gu Zheng
Previously, we need to calculate the max orphan num when we try to acquire an orphan inode, but it's a stable value since the super block was inited. So converting it to a field of f2fs_sb_info and use it directly when needed seems a better choose. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com

[f2fs-dev] [PATCH 3/3] f2fs: use spinlock rather than mutex for better speed

2014-01-10 Thread Gu Zheng
With the 2 previous changes, all the long time operations are moved out of the protection region, so here we can use spinlock rather than mutex (orphan_inode_mutex) for lower overhead. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 24 fs

[f2fs-dev] [PATCH V2 1/3] f2fs: move grabbing orphan pages out of protection region

2014-01-13 Thread Gu Zheng
Move grabbing orphan block page out of protection region, and grab all the orphan block pages ahead. v2: Remove the redundant code as Chao Yu suggested. Reviewed-by: Chao Yu chao2...@samsung.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c | 16

Re: [f2fs-dev] f2fs: f2fs unmount hangs if f2fs_init_acl() fails during mkdir syscall

2014-02-13 Thread Gu Zheng
Hi, On 02/13/2014 05:40 PM, Andrey Tsyvarev wrote: Hi, BTW, have you tested the case that added remove_dirty_dir_inode() into the fail path of init_inode_metadata? diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index e095a4f..d5a2c9e 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@

[f2fs-dev] [RFC PATCH 2/2] f2fs: simplify free nid management

2014-02-21 Thread Gu Zheng
, it also rename the function name for better descriptive. alloc_nid--get_free_nid alloc_nid_failed--put_back_free_nid Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |5 +-- fs/f2fs/namei.c | 18 +-- fs/f2fs/node.c | 62

[f2fs-dev] [PATCH 1/2] f2fs: introduce help macro on_build_free_nids()

2014-02-21 Thread Gu Zheng
Introduce help macro on_build_free_nids() which just uses build_lock to judge whether the building free nid is going, so that we can remove the on_build_free_nids field from f2fs_sb_info. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |2 -- fs/f2fs/node.c |6

[f2fs-dev] [PATCH 0/5] f2fs: some minor fix and clean up

2014-03-07 Thread Gu Zheng
Gu Zheng (5): f2fs: update start nid once each circle f2fs: remove the unused ctor argument of f2fs_kmem_cache_create() f2fs: format segment_info's show for better legibility f2fs: optimize restore_node_summary slightly f2fs: add a wait queue to avoid unnecessary build_free_nid fs

[f2fs-dev] [PATCH 1/5] f2fs: update start nid only once each circle

2014-03-07 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/node.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 8c14110..9653096 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1875,11 +1875,15 @@ void

[f2fs-dev] [PATCH 2/5] f2fs: remove the unused ctor argument of f2fs_kmem_cache_create()

2014-03-07 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/checkpoint.c |4 ++-- fs/f2fs/f2fs.h |4 ++-- fs/f2fs/gc.c |2 +- fs/f2fs/node.c |4 ++-- fs/f2fs/recovery.c |2 +- fs/f2fs/segment.c|2 +- fs/f2fs/super.c |2 +- 7 files

[f2fs-dev] [PATCH 4/5] f2fs: optimize restore_node_summary slightly

2014-03-07 Thread Gu Zheng
in the following circle. Only reporting ENOMEM upstream if we really can not alloc any available page. And another fix is ignoring dealing with the following pages if an EIO occurs when reading page from page_list. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/node.c| 44

[f2fs-dev] [PATCH 3/5] f2fs: format segment_info's show for better legibility

2014-03-07 Thread Gu Zheng
/proc/fs/f2fs/loop0/segment_info 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .. 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 [root@guz Demoes]# Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/super.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git

[f2fs-dev] [PATCH 5/5] f2fs: add a wait queue to avoid unnecessary, build_free_nid

2014-03-07 Thread Gu Zheng
. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |1 + fs/f2fs/node.c | 10 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index f845e92..7ae193e 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -256,6 +256,7

Re: [f2fs-dev] [PATCH 1/5] f2fs: update start nid only once each circle

2014-03-09 Thread Gu Zheng
On 03/08/2014 07:46 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Friday, March 07, 2014 6:43 PM To: Kim Cc: linux-kernel; f2fs Subject: [f2fs-dev] [PATCH 1/5] f2fs: update start nid only once each circle Signed-off-by: Gu

Re: [f2fs-dev] [PATCH 5/5] f2fs: add a wait queue to avoid unnecessary, build_free_nid

2014-03-09 Thread Gu Zheng
Hi Changman, On 03/10/2014 12:09 PM, Changman Lee wrote: On 금, 2014-03-07 at 18:43 +0800, Gu Zheng wrote: Previously, when we try to alloc free nid while the build free nid is going, the allocer will be run into the flow that waiting for nm_i-build_lock, see following: /* We should

Re: [f2fs-dev] [PATCH 5/5] f2fs: add a wait queue to avoid unnecessary, build_free_nid

2014-03-09 Thread Gu Zheng
Hi Kim, On 03/10/2014 12:50 PM, Jaegeuk Kim wrote: Hi Gu, 2014-03-07 (금), 18:43 +0800, Gu Zheng: Previously, when we try to alloc free nid while the build free nid is going, the allocer will be run into the flow that waiting for nm_i-build_lock, see following: /* We should not use

Re: [f2fs-dev] [PATCH 4/5] f2fs: optimize restore_node_summary slightly

2014-03-09 Thread Gu Zheng
Hi Kim, On 03/10/2014 12:45 PM, Jaegeuk Kim wrote: Hi Gu, 2014-03-07 (금), 18:43 +0800, Gu Zheng: Previously, we ra_sum_pages to pre-read contiguous pages as more as possible, and if we fail to alloc more pages, an ENOMEM error will be reported upstream, even though we have alloced some

Re: [f2fs-dev] [PATCH 3/5] f2fs: format segment_info's show for better legibility

2014-03-13 Thread Gu Zheng
Hi, On 03/13/2014 05:13 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Friday, March 07, 2014 6:44 PM To: Kim Cc: linux-kernel; f2fs Subject: [f2fs-dev] [PATCH 3/5] f2fs: format segment_info's show for better legibility

Re: [f2fs-dev] [PATCH 2/2] f2fs: use list_for_each_entry{_safe} for simplyfying code

2014-03-31 Thread Gu Zheng
Hi Yu, On 03/29/2014 11:33 AM, Chao Yu wrote: This patch use list_for_each_entry{_safe} instead of list_for_each{_safe} for simplfying code. Signed-off-by: Chao Yu chao2...@samsung.com --- fs/f2fs/checkpoint.c | 37 ++--- fs/f2fs/node.c | 16

Re: [f2fs-dev] [PATCH 2/2] f2fs: use list_for_each_entry{_safe} for simplyfying code

2014-03-31 Thread Gu Zheng
Hi Yu, On 04/01/2014 09:45 AM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Monday, March 31, 2014 6:07 PM To: Chao Yu Cc: ???; linux-f2fs-devel@lists.sourceforge.net; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org

[f2fs-dev] [PATCH 5/7] f2fs: add the flush_merge handle in the remount flow

2014-04-11 Thread Gu Zheng
Add the *remount* handle of flush_merge option, so that the users can enable flush_merge in the runtime, such as the underlying device handles the cache_flush command relatively slowly. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h|1 + fs/f2fs/segment.c |2

[f2fs-dev] [PATCH 6/7] f2fs: introduce struct flush_cmd_control to wrap the, flush_merge fields

2014-04-11 Thread Gu Zheng
Split the flush_merge fields from sm_i, and use the new struct flush_cmd_control to wrap it, so that we can igonre these fileds if flush_merge is disable, and it alse can the structs more neat. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h| 14 +++ fs/f2fs

[f2fs-dev] [PATCH 0/7] f2fs: some fix and cleanup about flush_merge

2014-04-11 Thread Gu Zheng
Gu Zheng (7): f2fs: put the bio when issue_flush completed f2fs: remove the unuseful issue_tail list f2fs: use __GFP_ZERO to avoid appending set-NULL f2fs: enable flush_merge only in f2fs is not read-only f2fs: add the flush_merge handle in the remount flow f2fs: introduce struct

[f2fs-dev] [PATCH 2/7] f2fs: remove the unuseful issue_tail list

2014-04-11 Thread Gu Zheng
With the issue_list and dispatch_list, we can handle flush_merge already, so remove the useless issue_tail list. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h|1 - fs/f2fs/segment.c |5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/f2fs

Re: [f2fs-dev] [PATCH 0/7] f2fs: some fix and cleanup about flush_merge

2014-04-13 Thread Gu Zheng
Hi All, There seems to be a mistake in [PATCH 2/7]f2fs: remove the unuseful issue_tail list, and the whole patchset needs to be reworked. So please ignore this one. Sorry for the noise. Regards, Gu On 04/11/2014 05:49 PM, Gu Zheng wrote: Gu Zheng (7): f2fs: put the bio when issue_flush

Re: [f2fs-dev] [PATCH 0/7] f2fs: some fix and cleanup about flush_merge

2014-04-13 Thread Gu Zheng
cmds merging operation when doing tests, it seems that some of the outstanding flush cmds(in the issue_list) will be ignored when new cmd added. I'll review and test it more. Anyway, thank you for your work. :) Regards, Gu 2014-04-14 (월), 09:18 +0800, Gu Zheng: Hi All, There seems

[f2fs-dev] [PATCH 1/2] f2fs: introduce struct flush_cmd_control to wrap the flush_merge fields

2014-04-27 Thread Gu Zheng
Split the flush_merge fields from sm_i, and use the new struct flush_cmd_control to wrap it, so that we can igonre these fileds if flush_merge is disable, and it alse can the structs more neat. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h| 17 fs/f2fs

[f2fs-dev] [PATCH 1/4] f2fs: remove the redundant validation check of acl

2014-06-24 Thread Gu Zheng
From the userspace side, VFS layer does the check; and from the kernel side(xx_init_acl), the acl is get/cloned from the parent dir's, which is credible. So remove the redundant validation check of acl here. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/acl.c |6 -- 1 files

[f2fs-dev] [PATCH 2/4] f2fs: remove the needless point-cast

2014-06-24 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/dir.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 087b03d..3edd561 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -298,14 +298,13 @@ static int

[f2fs-dev] [PATCH 4/4] f2fs: arguments cleanup of finding file flow functions

2014-06-24 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/dir.c | 28 +--- fs/f2fs/f2fs.h |2 +- fs/f2fs/hash.c |4 +++- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index ba510fb..06f4833 100644 --- a/fs/f2fs

Re: [f2fs-dev] [PATCH 2/4] f2fs: remove the needless point-cast

2014-06-24 Thread Gu Zheng
Hi Yu, On 06/25/2014 09:55 AM, Chao Yu wrote: Hi Gu, I found kaddr in f2fs_delete_entry is unneeded, maybe this trivial problem could be fixed in this patch together. :) Yeah, I'll add this fix together.;) Regards, Gu Thanks. -Original Message- From: Gu Zheng [mailto:guz.f

Re: [f2fs-dev] [PATCH 3/4] f2fs: use find_next_bit_le rather than test_bit_le in, find_in_block

2014-06-24 Thread Gu Zheng
Hi Yu, On 06/25/2014 10:30 AM, Chao Yu wrote: Hi Gu, Just one nitpick. -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Tuesday, June 24, 2014 6:21 PM To: Jaegeuk Kim Cc: fsdevel; f2fs Subject: [f2fs-dev] [PATCH 3/4] f2fs: use find_next_bit_le rather

Re: [f2fs-dev] [PATCH 3/4] f2fs: use find_next_bit_le rather than test_bit_le in, find_in_block

2014-07-02 Thread Gu Zheng
our qualm. Sorry, I should have reported this quickly. It's not late.:) Thanks, Gu On Tue, Jun 24, 2014 at 06:20:41PM +0800, Gu Zheng wrote: Use find_next_bit_le rather than test_bit_le to improve search speed lightly. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/dir.c

Re: [f2fs-dev] [PATCH 3/4] f2fs: use find_next_bit_le rather than test_bit_le in, find_in_block

2014-07-02 Thread Gu Zheng
like 01. Agree. Well, IMO the former case would be a little bit more common. Gu, Can you provide some performance numbers wrt this? OK. I'll do it.:) Thanks, Gu On Tue, Jun 24, 2014 at 06:20:41PM +0800, Gu Zheng wrote: Use find_next_bit_le rather than test_bit_le to improve

[f2fs-dev] [PATCH 2/2] f2fs: remove the unused stat_lock

2014-07-11 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ae3b4ac..8f507d4 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1298,7 +1298,6 @@ bool space_for_roll_forward

Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-21 Thread Gu Zheng
Hi Andrey, On 07/21/2014 06:56 PM, Andrey Tsyvarev wrote: Hello, Using memory error detector reveals the following use-after-free error in 3.15.0: AddressSanitizer: heap-use-after-free in f2fs_evict_inode Read of size 8 by thread T22279: [a02d8702]

Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-22 Thread Gu Zheng
Hi, On 07/23/2014 10:12 AM, Chao Yu wrote: Hi Andrey Gu, -Original Message- From: Andrey Tsyvarev [mailto:tsyva...@ispras.ru] Sent: Tuesday, July 22, 2014 6:04 PM To: Gu Zheng Cc: Jaegeuk Kim; linux-kernel; Alexey Khoroshilov; linux-f2fs-devel@lists.sourceforge.net Subject: Re

Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-25 Thread Gu Zheng
: Andrey Tsyvarev [mailto:tsyva...@ispras.ru] Sent: Thursday, July 24, 2014 6:15 PM To: Gu Zheng; Chao Yu Cc: 'Jaegeuk Kim'; 'linux-kernel'; 'Alexey Khoroshilov'; linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem Hi, With patch

Re: [f2fs-dev] [PATCH] f2fs: use lock-less list(llist) to simplify the flush cmd management

2014-09-05 Thread Gu Zheng
Hi Yu, On 09/05/2014 03:07 PM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Wednesday, September 03, 2014 5:16 PM To: jaeg...@kernel.org Cc: Gu Zheng; linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net Subject

[f2fs-dev] [PATCH V2] f2fs: use lock-less list(llist) to simplify the flush cmd management

2014-09-05 Thread Gu Zheng
. --- v2: -use llist_for_each_entry_safe to fix possible use-after-free issue. -remove the unused field from struct flush_cmd. Thanks for Yu's suggestion. --- Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h|8 +++- fs/f2fs/segment.c | 29

Re: [f2fs-dev] [PATCH 4/5] f2fs: fix to clean previous mount option when remount_fs

2014-09-15 Thread Gu Zheng
On 09/16/2014 11:05 AM, Chao Yu wrote: Hi Gu, -Original Message- From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] Sent: Tuesday, September 16, 2014 9:51 AM To: Chao Yu Cc: Jaegeuk Kim; Changman Lee; linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org Subject: Re

[f2fs-dev] [PATCH 5/6] f2fs: remove the redundant function cond_clear_inode_flag

2014-10-20 Thread Gu Zheng
Use clear_inode_flag to replace the redundant cond_clear_inode_flag. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/acl.c |4 ++-- fs/f2fs/f2fs.h |9 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index 83b9b5a

[f2fs-dev] [PATCH 6/6] f2fs: set raw_super default to NULL to avoid compile warning

2014-10-20 Thread Gu Zheng
Set raw_super default to NULL to avoid the possibly used uninitialized warning, though we may never hit it in fact. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c

[f2fs-dev] [PATCH 2/6] f2fs: use current_sit_addr to replace the open code

2014-10-20 Thread Gu Zheng
Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/segment.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 923cb76..6fb7446 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1524,17 +1524,7 @@ int

[f2fs-dev] [PATCH 1/6] f2fs: remove the seems unneeded argument 'type' from __get_victim

2014-10-20 Thread Gu Zheng
Remove the unneeded argument 'type' from __get_victim, use NO_CHECK_TYPE directly when calling v_ops-get_victim(). Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/gc.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index

[f2fs-dev] [PATCH 3/6] f2fs: introduce f2fs_change_bit to simplify the change bit logic

2014-10-20 Thread Gu Zheng
Introduce f2fs_change_bit to simplify the change bit logic in function set_to_next_nat{sit}. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- fs/f2fs/f2fs.h|9 + fs/f2fs/node.h|5 + fs/f2fs/segment.h |5 + 3 files changed, 11 insertions(+), 8 deletions