[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 cm224@samsung.com --- fs/f2fs/segment.c | 143 + 1 file changed, 143

[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 cm224@samsung.com --- fs/f2fs/segment.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-)

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_bit

[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

[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 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,

[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 jaegeuk@samsung.com --- 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

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 =