Re: [f2fs-dev] [PATCH V2 4/6] f2fs: Key functions to handle inline data

2013-11-14 Thread Jaegeuk Kim
Hi Huajun, [snip] > +static int __f2fs_convert_inline_data(struct inode *inode, struct page *page) > +{ > + int err; > + struct page *ipage; > + struct dnode_of_data dn; > + void *src_addr, *dst_addr; > + block_t old_blk_addr, new_blk_addr; > + struct f2fs_sb_info *sbi = F

[f2fs-dev] [PATCH 4/5] f2fs: introduce f2fs_issue_discard() to clean up

2013-11-14 Thread Jaegeuk Kim
This patch adds f2fs_issue_discard() to clean up blkdev_issue_discard() flows. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 505a889..d021cf3 100644 --- a/

[f2fs-dev] [PATCH 2/5] f2fs: add key functions for small discards

2013-11-14 Thread Jaegeuk Kim
This patch adds key functions to activate the small discard feature. Note that this procedure is conducted during the checkpoint only. In flush_sit_entries(), when a new dirty sit entry is flushed, f2fs calls add_discard_addrs() which searches candidates to be discarded. The candidates should be

Re: [f2fs-dev] [PATCH] f2fs: introduce f2fs_find_next(_zero)_bit

2013-11-14 Thread Changman Lee
I agree. Your suggestion is more good. Thanks for your review. On 2013년 11월 15일 13:31, Jaegeuk Kim wrote: > Hi, > > IMO, it would be better give names like __find_rev_next(_zero)_bit. > If there is no objection, I'll modify and apply them by myself. > Thanks, :) > > 2013-11-15 (금), 10:42 +0900, C

[f2fs-dev] [PATCH 3/5] f2fs: add a sysfs entry to control max_discards

2013-11-14 Thread Jaegeuk Kim
If frequent small discards are issued to the device, the performance would be degraded significantly. So, this patch adds a sysfs entry to control the number of discards to be issued during a checkpoint procedure. By default, f2fs does not issue any small discards, which means max_discards is zero

[f2fs-dev] [PATCH 1/5] f2fs: add a slab cache entry for small discards

2013-11-14 Thread Jaegeuk Kim
This patch adds a slab cache entry for small discards. Each entry consists of: struct discard_entry { struct list_head list; /* list head */ block_t blkaddr;/* block address to be discarded */ int len;/* # of consecutive blocks of the discard */ };

[f2fs-dev] [PATCH 5/5] f2fs: add a tracepoint for f2fs_issue_discard

2013-11-14 Thread Jaegeuk Kim
This patch adds a tracepoint for f2fs_issue_discard. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 1 + include/trace/events/f2fs.h | 23 +++ 2 files changed, 24 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index d021cf3..1f83999 100644 --

Re: [f2fs-dev] [PATCH] f2fs: introduce f2fs_find_next(_zero)_bit

2013-11-14 Thread Jaegeuk Kim
Hi, IMO, it would be better give names like __find_rev_next(_zero)_bit. If there is no objection, I'll modify and apply them by myself. Thanks, :) 2013-11-15 (금), 10:42 +0900, Changman Lee: > When f2fs_set_bit is used, in a byte MSB and LSB is reversed, > in that case we can use f2fs_find_next_bi

[f2fs-dev] [PATCH] f2fs: improve searching speed of __next_free_blkoff

2013-11-14 Thread Changman Lee
To find a zero bit using the result of OR operation between ckpt_valid_map and cur_valid_map is more fast than find a zero bit in each bitmap. Signed-off-by: Changman Lee --- fs/f2fs/segment.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/seg

[f2fs-dev] [PATCH] f2fs: introduce f2fs_find_next(_zero)_bit

2013-11-14 Thread Changman Lee
When f2fs_set_bit is used, in a byte MSB and LSB is reversed, in that case we can use f2fs_find_next_bit or f2fs_find_next_zero_bit. Signed-off-by: Changman Lee --- fs/f2fs/segment.c | 143 + 1 file changed, 143 insertions(+) diff --git a/fs/

Re: [f2fs-dev] [PATCH 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-14 Thread Gu Zheng
Hi Yu, On 11/13/2013 04:10 PM, Chao Yu wrote: > Hi Gu, > >> -Original Message- >> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] >> Sent: Wednesday, November 13, 2013 11:39 AM >> To: Chao Yu >> Cc: ???; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; >> linux-f2fs-devel@lis