Re: [f2fs-dev] [PATCH] f2fs: fix reference leaks in f2fs_acl_create

2015-03-09 Thread Changman Lee
Reviewed-by: Changman Lee On Mon, Mar 09, 2015 at 06:18:19PM +0800, Chao Yu wrote: > Our f2fs_acl_create is copied and modified from posix_acl_create to avoid > deadlock bug when inline_dentry feature is enabled. > > Now, we got reference leaks in posix_acl_create, and this has b

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

2015-03-08 Thread Changman Lee
Hi Yuan, On Sat, Mar 07, 2015 at 10:05:25AM +, 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) >max_len = 0; There is wrong statement. It should be fix

Re: [f2fs-dev] [PATCH v2] f2fs: fix max orphan inodes calculation

2015-03-08 Thread Changman Lee
--> 8 -- >From ce2462523dd5940b59f770c09a50d4babff5fcdb Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Mon, 9 Mar 2015 08:07:04 +0900 Subject: [PATCH] f2fs: cleanup statement about max orphan inodes calc Through each macro, we can read the meaning easily. Signed-off-by: Changm

Re: [f2fs-dev] [PATCH v2] f2fs: fix max orphan inodes calculation

2015-03-02 Thread Changman Lee
On Fri, Feb 27, 2015 at 05:38:13PM +0800, Wanpeng Li wrote: > cp_payload is introduced for sit bitmap to support large volume, and it is > just after the block of f2fs_checkpoint + nat bitmap, so the first segment > should include F2FS_CP_PACKS + NR_CURSEG_TYPE + cp_payload + orphan blocks. > Howev

Re: [f2fs-dev] [PATCH] fs/f2fs: add cond_resched() to sync_dirty_dir_inodes()

2015-03-02 Thread Changman Lee
On Fri, Feb 27, 2015 at 01:13:14PM +0100, Sebastian Andrzej Siewior wrote: > In a preempt-off enviroment a alot of FS activity (write/delete) I run > into a CPU stall: > > | NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [kworker/u2:2:59] > | Modules linked in: > | CPU: 0 PID: 59 Comm: kwor

Re: [f2fs-dev] [PATCH] f2fs: fix to issue small discard in real-time mode discard

2015-03-02 Thread Changman Lee
end = __find_rev_next_zero_bit(dmap, max_blocks, start + 1); > > - if (end - start < cpc->trim_minlen) > + if (force && end - start < cpc->trim_minlen) > continue; Reviewed-b

Re: [f2fs-dev] [PATCH 5/5 v2] f2fs: introduce a batched trim

2015-02-02 Thread Changman Lee
Hi Jaegeuk, IMHO, it looks better user could decide the size of trim considering latency of trim. Otherwise, additional checkpoints user doesn't want will occur. Regards, Changman On Mon, Feb 02, 2015 at 03:29:25PM -0800, Jaegeuk Kim wrote: > Change long from v1: > o add description > o chang

Re: [f2fs-dev] [RFC PATCH 06/10] f2fs: add core functions for rb-tree extent cache

2015-01-21 Thread Changman Lee
On Wed, Jan 21, 2015 at 04:41:17PM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@gmail.com] > > Sent: Tuesday, January 20, 2015 11:06 PM > > To: Chao Yu > > Cc: Jaegeuk Kim; Changman Lee; li

Re: [f2fs-dev] [RFC PATCH 06/10] f2fs: add core functions for rb-tree extent cache

2015-01-20 Thread Changman Lee
Hi Chao, Great works. :) 2015-01-12 16:14 GMT+09:00 Chao Yu : > This patch adds core functions including slab cache init function and > init/lookup/update/shrink/destroy function for rb-tree based extent cache. > > Thank Jaegeuk Kim and Changman Lee as they gave much suggestion

Re: [f2fs-dev] [PATCH] f2fs: add adaptive ssr/ipu policy as valid blocks in dirty segments

2015-01-09 Thread Changman Lee
2014 at 02:15:22PM +0900, Changman Lee wrote: >> If there is not enough invalid area in dirty segments, SSR won't get any >> gains. In the case, IPU could be better than SSR. This patch is for >> changing write style into IPU or SSR according to valid blocks in dirty >> segm

Re: [f2fs-dev] [RFC PATCH] f2fs: add extent cache base on rb-tree

2015-01-07 Thread Changman Lee
Hi Chao, On Sun, Jan 04, 2015 at 11:19:28AM +0800, Chao Yu wrote: > Hi Changman, > > Sorry for replying late! > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Tuesday, December 30, 2014 8:32 AM > > To: Jaegeuk K

[f2fs-dev] [PATCH] f2fs: add adaptive ssr/ipu policy as valid blocks in dirty segments

2014-12-30 Thread Changman Lee
locks SSR: 251079 blocks in 891 segments LFS: 490825 blocks in 957 segments BDF: 86, avg. vblocks: 380 Signed-off-by: Changman Lee --- Documentation/filesystems/f2fs.txt | 2 +- fs/f2fs/data.c | 2 +- fs/f2fs/debug.c| 11 +++ fs/f2fs/f

Re: [f2fs-dev] [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-29 Thread Changman Lee
Hi all, On Mon, Dec 29, 2014 at 01:23:00PM -0800, Jaegeuk Kim wrote: > Hi Chao, > > On Mon, Dec 29, 2014 at 03:19:18PM +0800, Chao Yu wrote: > > [snip] > > Nice draft. :) > > > > > Please see the draft below. > > > > 1) Extent management: > > If we use global management that managing all ext

Re: [f2fs-dev] [PATCH 1/2] f2fs: conduct f2fs_gc as explicit gc_type

2014-12-23 Thread Changman Lee
Hi, On Tue, Dec 23, 2014 at 12:00:37AM -0800, Jaegeuk Kim wrote: > Hi Changman, > > On Tue, Dec 23, 2014 at 08:37:38AM +0900, Changman Lee wrote: > > f2fs has 2 gc_type; foreground gc and background gc. > > In the case of foreground gc, f2fs will select victim as greedy. &

Re: [f2fs-dev] [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-23 Thread Changman Lee
ent: Tuesday, December 23, 2014 7:16 AM > > > To: Chao Yu > > > Cc: 'Changman Lee'; linux-f2fs-devel@lists.sourceforge.net; > > > linux-ker...@vger.kernel.org > > > Subject: Re: [RFC PATCH] f2fs: add extent cache base on rb-tree > > > &

Re: [f2fs-dev] [PATCH v2] f2fs: add block count by in-place-update in stat info

2014-12-23 Thread Changman Lee
Change from v1 o use atomic_t inplace_count for more accurate suggested by Chao -- >8 -- >From 7a42b27c8df45494e806d625be03830bfa8c30ff Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Wed, 24 Dec 2014 02:16:54 +0900 Subject: [PATCH] f2fs: add block count by in-place-update in stat info

Re: [f2fs-dev] [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-22 Thread Changman Lee
Hi, On Mon, Dec 22, 2014 at 03:10:30PM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Monday, December 22, 2014 10:03 AM > > To: Chao Yu > > Cc: Jaegeuk Kim; linux-f2fs-dev

[f2fs-dev] [PATCH 2/2] f2fs: add stat info for moved blocks by background gc

2014-12-22 Thread Changman Lee
This patch is for looking into gc performance of f2fs in detail. Signed-off-by: Changman Lee --- fs/f2fs/debug.c | 15 ++- fs/f2fs/f2fs.h | 17 - fs/f2fs/gc.c| 6 +++--- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs

[f2fs-dev] [PATCH 1/2] f2fs: conduct f2fs_gc as explicit gc_type

2014-12-22 Thread Changman Lee
REEDY or COST_BENEFIT. Therefore sometimes it runs as BG_GC/COST_BENEFIT although gc_thread don't put f2fs_gc to work. Signed-off-by: Changman Lee --- fs/f2fs/f2fs.h| 2 +- fs/f2fs/gc.c | 5 ++--- fs/f2fs/segment.c | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff

[f2fs-dev] [PATCH] f2fs: add block count by in-place-update in stat info

2014-12-22 Thread Changman Lee
This patch adds block count by in-place-update in stat. Signed-off-by: Changman Lee --- fs/f2fs/debug.c | 3 +++ fs/f2fs/f2fs.h| 5 - fs/f2fs/segment.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 91e8f69..46bef86 100644

Re: [f2fs-dev] [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-21 Thread Changman Lee
Hi Yu, Good approach. As you know, however, f2fs breaks extent itself due to COW. Unlike other filesystem like btrfs, minimum extent of f2fs could have 4KB granularity. So we would have lots of extents per inode and it could lead to overhead to manage extents. Anyway, mount option could be alter

Re: [f2fs-dev] [PATCH v2] f2fs: merge two uchar variable in struct node_info to reduce memory cost

2014-12-18 Thread Changman Lee
On Thu, Dec 18, 2014 at 02:29:51PM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@gmail.com] > > Sent: Wednesday, December 17, 2014 11:09 PM > > To: Chao Yu > > Cc: Jaegeuk Kim; Changman Lee; linux

Re: [f2fs-dev] [PATCH v2] f2fs: use ra_meta_pages to simplify readahead code in restore_node_summary

2014-12-17 Thread Changman Lee
know. Thanks, Reviewed-by: Changman Lee 2014-12-17 19:10 GMT+09:00 Chao Yu : > Use more common function ra_meta_pages() with META_POR to readahead node > blocks > in restore_node_summary() instead of ra_sum_pages(), hence we can simplify the > readahead code there, and also we

Re: [f2fs-dev] [PATCH v2] f2fs: merge two uchar variable in struct node_info to reduce memory cost

2014-12-17 Thread Changman Lee
usage. Hence, I think it's not correct for commit log to describe this patch. Thanks, Reviewed-by: Changman Lee 2014-12-15 18:33 GMT+09:00 Chao Yu : > This patch moves one member of struct nat_entry: _flag_ to struct node_info, > so _version_ in struct node_info and _flag_ with unsigne

[f2fs-dev] [PATCH 2/3] f2fs: cleanup path to need cp at fsync

2014-12-07 Thread Changman Lee
Added some commentaries for code readability and cleaned up if-statement clearly. Signed-off-by: Changman Lee --- fs/f2fs/file.c | 79 -- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index

[f2fs-dev] [PATCH 1/3] f2fs: check if inode state is dirty at fsync

2014-12-07 Thread Changman Lee
If inode state is dirty, go straight to write. Suggested-by: Jaegeuk Kim Signed-off-by: Changman Lee --- fs/f2fs/file.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b6f3fbf..0b97002 100644 --- a/fs/f2fs

[f2fs-dev] [PATCH 3/3] f2fs: clear track info related to write mode all the time

2014-12-07 Thread Changman Lee
In case of checkpoint is called at fsync, we should clear track info. Otherwise, remained track info may influence to inode flag next eviction. Signed-off-by: Changman Lee --- fs/f2fs/file.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs

Re: [f2fs-dev] [PATCH] f2fs: check if inode's state is dirty or not before skip fsync

2014-12-04 Thread Changman Lee
On Thu, Dec 04, 2014 at 04:58:29PM -0800, Jaegeuk Kim wrote: > On Wed, Dec 03, 2014 at 10:46:38AM +0900, Changman Lee wrote: > > Hi Jaegeuk, > > > > Thanks for explanation. > > > > On Tue, Dec 02, 2014 at 11:42:19AM -0800, Jaegeuk Kim wrote: > > >

Re: [f2fs-dev] [PATCH] f2fs: check if inode's state is dirty or not before skip fsync

2014-12-02 Thread Changman Lee
Hi Jaegeuk, Thanks for explanation. On Tue, Dec 02, 2014 at 11:42:19AM -0800, Jaegeuk Kim wrote: > On Tue, Dec 02, 2014 at 01:21:31PM +0900, Changman Lee wrote: > > Hi, > > > > f2fs_dirty_inode just set fi->flag as FI_DIRTY_INODE not to > > call update_inod

Re: [f2fs-dev] [PATCH V2] f2fs: more fast lookup for gc_inode list

2014-12-02 Thread Changman Lee
radix_tree_delete before iput o retry to add inode into radix_tree o call list_del explicitly --> 8 -- >From 0c2c0d7da997ca90f3101e6195f3ed72fb1940d3 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Fri, 28 Nov 2014 15:49:40 + Subject: [PATCH] f2fs: more fast lookup for gc_inode li

Re: [f2fs-dev] [PATCH] f2fs: check if inode's state is dirty or not before skip fsync

2014-12-01 Thread Changman Lee
rty or mark_inode_dirty_sync is called. Then, we control write I/O in write_inode according to wbc->sync_mode. Could you consider this once? Thanks, On Mon, Dec 01, 2014 at 02:52:57PM -0800, Jaegeuk Kim wrote: > On Mon, Dec 01, 2014 at 04:05:20PM +0900, Changman Lee wrote: > > It makes

Re: [f2fs-dev] [PATCH V2] f2fs: more fast lookup for gc_inode list

2014-12-01 Thread Changman Lee
explicitly Regards, Changman --> 8 -- >From 6c32edfc00aa784c47f5018d10fb8f9b5ab54c8b Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Fri, 28 Nov 2014 15:49:40 + Subject: [PATCH] f2fs: more fast lookup for gc_inode list If there are many inodes that have data blocks in victim segment, it

[f2fs-dev] f2fs_write_inode

2014-12-01 Thread Changman Lee
Hi guys, I was wondering why f2fs_write_inode doesn't submit any I/O according to wbc->sync_mode. If you have any idea, answer to my questions, please. And at f2fs_sync_file, if (need_cp) { Q: We've already called sync_fs. Is there any scenario like below ? I refered to 354a3399dc6f7e55

[f2fs-dev] [PATCH] f2fs: cleanup redundant macro

2014-11-30 Thread Changman Lee
We've already made fi and sbi for inode. Let's avoid duplicated work. Signed-off-by: Changman Lee --- fs/f2fs/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 0c5ae87..f02102c 100644 --- a/fs/f2fs/file.c +++ b/fs/f

[f2fs-dev] [PATCH] f2fs: check if inode's state is dirty or not before skip fsync

2014-11-30 Thread Changman Lee
It makes sense to check inode's state than check if inode page is dirty or not. Signed-off-by: Changman Lee --- fs/f2fs/file.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 7c2ec3e..0c5ae87 100644 --- a/fs/f2fs/file.c +++

Re: [f2fs-dev] [PATCH V2] f2fs: more fast lookup for gc_inode list

2014-11-27 Thread Changman Lee
-- >From eb1a8f4ddee6c5541d5979e4119ca33245d74c30 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Fri, 28 Nov 2014 15:49:40 + Subject: [PATCH] f2fs: more fast lookup for gc_inode list If there are many inodes that have data blocks in victim segment, it takes long time to find a inode

Re: [f2fs-dev] [PATCH] f2fs: move put_gc_inode into gc_mutex

2014-11-27 Thread Changman Lee
On Thu, Nov 27, 2014 at 07:55:14PM -0800, Jaegeuk Kim wrote: > Hi Changman, > > On Thu, Nov 27, 2014 at 06:42:54PM +0900, Changman Lee wrote: > > There in no any lock to protect gc_inode list so let's move into > > gc_mutex, otherwise it might be lost links of list. >

Re: [f2fs-dev] [PATCH] f2fs: more fast lookup for gc_inode list

2014-11-27 Thread Changman Lee
Hi, As you said, I will resend a patch. Thanks for your review. On Thu, Nov 27, 2014 at 08:24:21PM -0800, Jaegeuk Kim wrote: > Hi, > > On Thu, Nov 27, 2014 at 06:11:51PM +0900, Changman Lee wrote: > > If there are many inodes that have data blocks in victim segment, > >

[f2fs-dev] [PATCH] f2fs: move put_gc_inode into gc_mutex

2014-11-27 Thread Changman Lee
There in no any lock to protect gc_inode list so let's move into gc_mutex, otherwise it might be lost links of list. Signed-off-by: Changman Lee --- fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 657683c9..99e1720 1

[f2fs-dev] [PATCH] f2fs: more fast lookup for gc_inode list

2014-11-27 Thread Changman Lee
If there are many inodes that have data blocks in victim segment, it takes long time to find a inode in gc_inode list. Let's use radix_tree to reduce lookup time. Signed-off-by: Changman Lee --- fs/f2fs/gc.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-)

[f2fs-dev] [PATCH] f2fs: cleanup if-statement of phase in gc_data_segment

2014-11-26 Thread Changman Lee
Little cleanup to distinguish each phase easily Signed-off-by: Changman Lee --- fs/f2fs/gc.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 81686b2..de00713 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c

Re: [f2fs-dev] [PATCH 1/3] f2fs: call flush_dcache_page when the page was updated

2014-11-25 Thread Changman Lee
Hi Simon, Thanks very much for your interest. It becomes more clear due to your explanation. Regards, Changman On Tue, Nov 25, 2014 at 08:05:23PM +0100, Simon Baatz wrote: > Hi Changman, > > On Mon, Nov 24, 2014 at 11:46:46AM +0900, Changman Lee wrote: > > Hi Simon, >

[f2fs-dev] [PATCH 2/2] f2fs: no more dirty_nat_entires when flushing

2014-11-24 Thread Changman Lee
After flushing dirty nat entries, it has to be no more dirty nat entries. Signed-off-by: Changman Lee --- fs/f2fs/node.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f6bd222..fc1077b 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs

[f2fs-dev] [PATCH 1/2] f2fs: check dirty_nat_cnt before flushing nat entries in journal

2014-11-24 Thread Changman Lee
It's meaningless to check dirty_nat_cnt after re-dirtying nat entries in journal. And although there are rooms for dirty nat entires if dirty_nat_cnt is zero, it's also meaningless to check __has_cursum_space. Signed-off-by: Changman Lee --- fs/f2fs/node.c | 7 +++ 1 file

Re: [f2fs-dev] [PATCH] f2fs: add cleancache support

2014-11-24 Thread Changman Lee
On Sun, Nov 23, 2014 at 11:18:00PM -0800, Jaegeuk Kim wrote: > On Mon, Nov 24, 2014 at 03:19:43PM +0900, Changman Lee wrote: > > On Sun, Nov 23, 2014 at 09:42:12PM -0800, Jaegeuk Kim wrote: > > > On Thu, Nov 20, 2014 at 01:38:51PM +0900, Changman Lee wrote: > > > >

Re: [f2fs-dev] [PATCH] f2fs: add cleancache support

2014-11-23 Thread Changman Lee
On Sun, Nov 23, 2014 at 09:42:12PM -0800, Jaegeuk Kim wrote: > On Thu, Nov 20, 2014 at 01:38:51PM +0900, Changman Lee wrote: > > On Fri, Nov 14, 2014 at 02:53:02PM +0900, Changman Lee wrote: > > > On Thu, Nov 13, 2014 at 05:27:51PM -0800, Jaegeuk Kim wrote: > > > > Hi

Re: [f2fs-dev] [PATCH 1/3] f2fs: call flush_dcache_page when the page was updated

2014-11-23 Thread Changman Lee
Hi Simon, Thanks for your explanation kindly. On Sun, Nov 23, 2014 at 11:08:54AM +0100, Simon Baatz wrote: > Hi Changman, Jaegeuk, > > On Thu, Nov 20, 2014 at 05:47:29PM +0900, Changman Lee wrote: > > On Wed, Nov 19, 2014 at 10:45:33PM -0800, Jaegeuk Kim wrote: > > > On

[f2fs-dev] [PATCH] f2fs: fix wrong data structure when create slab

2014-11-20 Thread Changman Lee
It used nat_entry_set when create slab for sit_entry_set. Signed-off-by: Changman Lee --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index e094675..9de857f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c

Re: [f2fs-dev] [PATCH 1/3] f2fs: call flush_dcache_page when the page was updated

2014-11-20 Thread Changman Lee
On Wed, Nov 19, 2014 at 10:45:33PM -0800, Jaegeuk Kim wrote: > On Thu, Nov 20, 2014 at 03:04:10PM +0900, Changman Lee wrote: > > Hi Jaegeuk, > > > > We should call flush_dcache_page before kunmap because the purpose of the > > cache flush is to address aliasing problem

Re: [f2fs-dev] [PATCH 1/3] f2fs: call flush_dcache_page when the page was updated

2014-11-19 Thread Changman Lee
Hi Jaegeuk, We should call flush_dcache_page before kunmap because the purpose of the cache flush is to address aliasing problem related to virtual address. On Wed, Nov 19, 2014 at 02:35:08PM -0800, Jaegeuk Kim wrote: > Whenever f2fs updates mapped pages, it needs to call flush_dcache_page. > >

Re: [f2fs-dev] [PATCH] f2fs: add cleancache support

2014-11-19 Thread Changman Lee
On Fri, Nov 14, 2014 at 02:53:02PM +0900, Changman Lee wrote: > On Thu, Nov 13, 2014 at 05:27:51PM -0800, Jaegeuk Kim wrote: > > Hi Changman, > > > > On Thu, Nov 13, 2014 at 02:34:50PM +0900, Changman Lee wrote: > > > To use cleancache, fs must explicitl

[f2fs-dev] [PATCH] mkfs.f2fs: introduce some macros to simplify coding style

2014-11-16 Thread Changman Lee
This patch tries to simplify coding style for readability. Rename shortly o rename super_block to sb And, introduce some macros. o set/get_cp o set/get_sb o next/prev_zone, last_zone and last_section o ALIGN, SEG_ALIGN and ZONE_ALIGN Signed-off-by: Changman Lee --- include/f2fs_fs.h

Re: [f2fs-dev] [PATCH] f2fs: add cleancache support

2014-11-13 Thread Changman Lee
On Thu, Nov 13, 2014 at 05:27:51PM -0800, Jaegeuk Kim wrote: > Hi Changman, > > On Thu, Nov 13, 2014 at 02:34:50PM +0900, Changman Lee wrote: > > To use cleancache, fs must explicitly enable cleancache by calling > > cleancache_init_fs. > > Good catch! > > P

Re: [f2fs-dev] [PATCH] f2fs: add cleancache support

2014-11-13 Thread Changman Lee
On Fri, Nov 14, 2014 at 11:08:15AM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Thursday, November 13, 2014 1:35 PM > > To: linux-fsde...@vger.kernel.org; linux-f2fs-devel@lis

[f2fs-dev] [PATCH 2/2] mkfs.f2fs: fix missing endian conversion

2014-11-13 Thread Changman Lee
This is for conversion from cpu to little endian and vice versa. Signed-off-by: Changman Lee --- mkfs/f2fs_format.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 0a9d728..c0028a3 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs

[f2fs-dev] [PATCH 1/2] mkfs: use compact mode for data summaries

2014-11-13 Thread Changman Lee
This patch is for optimization related to format o reduce 2 blocks for data summaries o reduce initial mount time after mkfs.f2fs Signed-off-by: Changman Lee --- mkfs/f2fs_format.c | 102 + 1 file changed, 64 insertions(+), 38 deletions

[f2fs-dev] [PATCH] f2fs: add cleancache support

2014-11-12 Thread Changman Lee
To use cleancache, fs must explicitly enable cleancache by calling cleancache_init_fs. Signed-off-by: Changman Lee --- fs/f2fs/super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 512ffd8..2ebb960 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs

Re: [f2fs-dev] [PATCH 1/5] f2fs: disable roll-forward when active_logs = 2

2014-11-11 Thread Changman Lee
On Mon, Nov 10, 2014 at 07:07:59AM -0800, Jaegeuk Kim wrote: > Hi Changman, > > On Mon, Nov 10, 2014 at 06:54:37PM +0900, Changman Lee wrote: > > On Sat, Nov 08, 2014 at 11:36:05PM -0800, Jaegeuk Kim wrote: > > > The roll-forward mechanism should be activated when the num

Re: [f2fs-dev] [PATCH 1/5] f2fs: disable roll-forward when active_logs = 2

2014-11-10 Thread Changman Lee
On Sat, Nov 08, 2014 at 11:36:05PM -0800, Jaegeuk Kim wrote: > The roll-forward mechanism should be activated when the number of active > logs is not 2. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/file.c| 2 ++ > fs/f2fs/segment.c | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(

Re: [f2fs-dev] [PATCH] f2fs: implement -o dirsync

2014-11-09 Thread Changman Lee
On Sun, Nov 09, 2014 at 10:24:22PM -0800, Jaegeuk Kim wrote: > If a mount option has dirsync, we should call checkpoint for all the directory > operations. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/namei.c | 24 > 1 file changed, 24 insertions(+) > > diff --git a/f

Re: [f2fs-dev] [PATCH 4/5] f2fs: write node pages if checkpoint is not doing

2014-11-09 Thread Changman Lee
m path, but from now on, we will write out node page to reclaim memory at any time except checkpoint. We should remember it may occur to break merging bio. Got it. Reviewed-by: Changman Lee > + } else { > + down_read(&sbi->node_write); > + } > set_page_w

[f2fs-dev] Don't merge not sended patches

2014-11-09 Thread Changman Lee
Hi Jaegeuk, I've found new 2 patches when I pull f2fs-tools. The patches didn't show in mailing list. I think although patches is very trivial, it should be reported through our mailing list. Thanks, Changman -- ___

Re: [f2fs-dev] [PATCH 3/5] f2fs: control the memory footprint used by ino entries

2014-11-09 Thread Changman Lee
On Sat, Nov 08, 2014 at 11:36:07PM -0800, Jaegeuk Kim wrote: > This patch adds to control the memory footprint used by ino entries. > This will conduct best effort, not strictly. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/node.c| 28 ++-- > fs/f2fs/node.h| 3

[f2fs-dev] [PATCH] mkfs.f2fs: reclaim free space in case of regular file

2014-11-04 Thread Changman Lee
If we use regular file instead block device, let's reclaim its free space. Signed-off-by: Changman Lee --- configure.ac | 2 +- mkfs/f2fs_format_utils.c | 18 -- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac

Re: [f2fs-dev] f2fs, mount -o sync, sync and cut-off power

2014-10-30 Thread Changman Lee
Hi, When see the manpage of mount, it is written as 'the sync option has effect only for ext2, ext3, fat, vfat and ufs.' and in case of media with limited number of write cycles (e.g. some flash drivers) "sync" may cause life-cycle shortening. Anyway, you should use O_SYNC when you open a file or

Re: [f2fs-dev] [PATCH 04/10] f2fs: give an option to enable in-place-updates during fsync to users

2014-09-14 Thread Changman Lee
Hi JK, I think it' nicer if this can be used as 'OR' with other policy together. If so, we can also cover the weakness in high utilization. Regard, Changman On Sun, Sep 14, 2014 at 03:14:18PM -0700, Jaegeuk Kim wrote: > If user wrote F2FS_IPU_FSYNC:4 in /sys/fs/f2fs/ipu_policy, f2fs_sync_file >

Re: [f2fs-dev] [PATCH] f2fs: reposition unlock_new_inode to prevent accessing invalid inode

2014-08-28 Thread Changman Lee
Hi, On Thu, Aug 28, 2014 at 04:53:01PM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Thursday, August 28, 2014 9:48 AM > > To: Chao Yu > > Cc: Jaegeuk Kim; linux-ker...@vg

Re: [f2fs-dev] [PATCH] f2fs: reposition unlock_new_inode to prevent accessing invalid inode

2014-08-27 Thread Changman Lee
Hi Chao, I agree it's correct unlock_new_inode should be located after make_bad_inode. About this scenario, I think we should check some condition if this could be occured; A inode allocated newly could be victim by gc thread. Then, f2fs_iget called by Thread A have to fail because we handled it

Re: [f2fs-dev] [PATCH] f2fs: reduce competition among node page writes

2014-07-30 Thread Changman Lee
Hi Chao, On Wed, Jul 30, 2014 at 09:07:49PM +0800, Chao Yu wrote: > Hi Jaegeuk Changman, > > > -Original Message- > > From: Chao Yu [mailto:chao2...@samsung.com] > > Sent: Thursday, July 03, 2014 6:59 PM > > To: Jaegeuk Kim; Changman Lee > > Cc: linu

Re: [f2fs-dev] [PATCH 07/11] f2fs: enable in-place-update for fdatasync

2014-07-29 Thread Changman Lee
On Tue, Jul 29, 2014 at 06:08:21PM -0700, Jaegeuk Kim wrote: > On Wed, Jul 30, 2014 at 08:54:55AM +0900, Changman Lee wrote: > > On Tue, Jul 29, 2014 at 05:22:15AM -0700, Jaegeuk Kim wrote: > > > Hi Changman, > > > > > > On Tue, Jul 29, 2014 at 09:41:11AM +

Re: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.

2014-07-29 Thread Changman Lee
On Tue, Jul 29, 2014 at 06:24:48AM -0700, Jaegeuk Kim wrote: > Hi Dongho, > > At first, please write a patch under the correct rule. > (e.g., description) > > About this change, it's negative. > When considering SSR, we need to take care of the following scenario. > - old segno : X > - new addres

Re: [f2fs-dev] [PATCH 07/11] f2fs: enable in-place-update for fdatasync

2014-07-29 Thread Changman Lee
On Tue, Jul 29, 2014 at 05:22:15AM -0700, Jaegeuk Kim wrote: > Hi Changman, > > On Tue, Jul 29, 2014 at 09:41:11AM +0900, Changman Lee wrote: > > Hi Jaegeuk, > > > > On Fri, Jul 25, 2014 at 03:47:21PM -0700, Jaegeuk Kim wrote: > > > This patch enforces in-

Re: [f2fs-dev] [PATCH 07/11] f2fs: enable in-place-update for fdatasync

2014-07-28 Thread Changman Lee
Hi Jaegeuk, On Fri, Jul 25, 2014 at 03:47:21PM -0700, Jaegeuk Kim wrote: > This patch enforces in-place-updates only when fdatasync is requested. > If we adopt this in-place-updates for the fdatasync, we can skip to write the > recovery information. But, as you know, random write occurs when chan

Re: [f2fs-dev] [PATCH 1/2 V4] mkfs.f2fs: large volume support

2014-07-09 Thread Changman Lee
emove CP_LARGE_VOL_LFLAG instead, use cp_payload in superblock because disk size is determined at format Changes from V1 o fix orphan node blkaddr Regards, Changman Lee -- >8 -- >From b7d46c6aaf786d28f82c0fe5d116b561c03b4cb2 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Thu, 10 Jul 2014 15:

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

2014-07-06 Thread Changman Lee
Hello, On Fri, Jul 04, 2014 at 11:25:35PM -0700, Jaegeuk Kim wrote: > To Changman, > > Just for sure, can you reproduce this issue in the x86 machine with proper > benchmarks? (i.e., test_bit_le vs. find_next_bit_le) It shows quite a different result of bit_mod_test between server and desktop.

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 Changman Lee
Hi, Gu Unfortunately, find_next_bit isn't always better than test_bit. Refer to commit 5d0c667121bfc8be76d1580f485bddbe73465d1a I remember that Perviously, Jaegeuk had changed find_next_bit to test_bit because find_next_bit spent much cpu time in the case of there is lot of dentries like a postm

Re: [f2fs-dev] [PATCH v2] f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages

2014-05-27 Thread Changman Lee
On Tue, May 27, 2014 at 02:32:57PM +0800, Chao Yu wrote: > Hi changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Tuesday, May 27, 2014 9:25 AM > > To: Chao Yu > > Cc: Jaegeuk Kim; linux-fsd

Re: [f2fs-dev] [PATCH] f2fs: avoid overflow when large directory feathure is enabled

2014-05-26 Thread Changman Lee
Hi, Chao Good catch. Please, modify Documentation/filesytems/f2fs.txt On Tue, May 27, 2014 at 09:06:52AM +0800, Chao Yu wrote: > When large directory feathure is enable, We have one case which could cause > overflow in dir_buckets() as following: > special case: level + dir_level >= 32 and level <

Re: [f2fs-dev] [PATCH v2] f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages

2014-05-26 Thread Changman Lee
Hi, Chao Could you think about following once. move node_inode in front of build_segment_manager, then use node_inode instead of bd_inode. On Tue, May 27, 2014 at 08:41:07AM +0800, Chao Yu wrote: > Previously we allocate pages with no mapping in ra_sum_pages(), so we may > encounter a crash in ev

Re: [f2fs-dev] [PATCH V3] f2fs: large volume support

2014-05-26 Thread Changman Lee
orphan node blkaddr for large volume -- >8 -- >From b1610f32c472cb11f025e0997b7633d5c45b87e9 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Mon, 12 May 2014 12:27:43 +0900 Subject: [PATCH] f2fs: large volume support f2fs's cp has one page which consists of struct f2fs_checkpoint

[f2fs-dev] [PATCH 2/2 V3] fsck.f2fs: large volume support

2014-05-26 Thread Changman Lee
Changes from V2 o remove CP_LARGE_VOL_FLAG instead, use cp_payload in superblock because disk size is determined at format Changes from V1 o fix orphan node blkaddr -- >8 -- >From 405367374f868a8cf29bef62c06bf53271b58f52 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Mon, 12 May 2

[f2fs-dev] [PATCH 1/2 V3] mkfs.f2fs: large volume support

2014-05-26 Thread Changman Lee
:01:38 +0900 Subject: [PATCH 1/2] mkfs.f2fs: large volume support This patch supports large volume over about 3TB. Signed-off-by: Changman Lee --- include/f2fs_fs.h |9 +++ mkfs/f2fs_format.c | 68 +++- 2 files changed, 66 insertions(

Re: [f2fs-dev] [PATCH] f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages

2014-05-26 Thread Changman Lee
On Mon, May 26, 2014 at 02:26:24PM +0800, Chao Yu wrote: > Hi changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Friday, May 23, 2014 1:14 PM > > To: Jaegeuk Kim > > Cc: Chao Yu; linux-fsde...@vger.kern

Re: [f2fs-dev] [PATCH] f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages

2014-05-22 Thread Changman Lee
On Wed, May 21, 2014 at 12:36:46PM +0900, Jaegeuk Kim wrote: > Hi Chao, > > 2014-05-16 (금), 17:14 +0800, Chao Yu: > > Previously we allocate pages with no mapping in ra_sum_pages(), so we may > > encounter a crash in event trace of f2fs_submit_page_mbio where we access > > mapping data of the page

[f2fs-dev] [PATCH V3] f2fs: large volume support

2014-05-22 Thread Changman Lee
dea, let me know. Thanks. --> 8 -- >From 5a821fcec79fb9570a26104238b3c2391f6160ae Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Mon, 12 May 2014 12:27:43 +0900 Subject: [PATCH] f2fs: large volume support f2fs's cp has one page which consists of struct f2fs_checkpoint and version bit

Re: [f2fs-dev] [PATCH] f2fs: large volume support

2014-05-20 Thread Changman Lee
On 수, 2014-05-21 at 13:33 +0900, Jaegeuk Kim wrote: > Hi Changman, > > 2014-05-12 (월), 15:59 +0900, Changman Lee: > > f2fs's cp has one page which consists of struct f2fs_checkpoint and > > version bitmap of sit and nat. To support lots of segments, we need more >

[f2fs-dev] [PATCH] f2fs: large volume support

2014-05-18 Thread Changman Lee
nat bitmap|| +-++ 0 4kN blocks Signed-off-by: Changman Lee --- fs/f2fs/checkpoint.c| 55 +++ fs/f2fs/f2fs.h | 13 +-- include/linux/f2fs_fs.h |2 ++ 3 files c

Re: [f2fs-dev] [PATCH 2/2] fsck.f2fs: large volume support

2014-05-18 Thread Changman Lee
Changes from V1 o fix orphan_node_blkaddr >From dcd2512e9563991350fa977beb32613e479bd995 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 12 May 2014 22:03:46 +0900 Subject: [PATCH] fsck.f2fs: large volume support This patch support large volume over about 3TB. Signed-off-by: root --- fsck/f

[f2fs-dev] [PATCH] f2fs: large volume support

2014-05-12 Thread Changman Lee
nat bitmap|| +-++ 0 4kN blocks Signed-off-by: Changman Lee --- fs/f2fs/checkpoint.c| 47 --- fs/f2fs/f2fs.h | 13 +++-- include/linux/f2fs_fs.h |2 ++ 3 files c

[f2fs-dev] [PATCH 1/2] mkfs.f2fs: large volume support

2014-05-12 Thread Changman Lee
This patch supports a large volume over about 2.x TB. Becasue F2FS can't contain version bitmap for sit and nat in 4KB checkpoint block when volume size is over 2.x TB. Signed-off-by: Changman Lee --- include/f2fs_fs.h | 10 mkfs/f2fs_format.c |

[f2fs-dev] [PATCH 2/2] fsck.f2fs: large volume support

2014-05-12 Thread Changman Lee
In the case of volume size is over 2.x TB, checkpoint pack is also expanded over 4KB. It consists of f2fs_checkpoint and nat bitmap in a blocks, and n blocks of sit bitmap. Signed-off-by: Changman Lee --- fsck/f2fs.h | 14 +++--- fsck/mount.c | 30

Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: call set_dirty_dir_page if inode is directory.

2014-03-11 Thread Changman Lee
17 00:00:00 2001 From: Changman Lee Date: Tue, 11 Mar 2014 22:18:18 -0400 Subject: [PATCH] f2fs: call set/remove_dirty_dir_page if inode is directory. It's more legible and efficient to call set/remove_dirty_dir_page only if inode->i_mode is directory before calling it. Signed-off-by: Changman L

[f2fs-dev] [PATCH 1/2] f2fs: remove unused PagePrivate

2014-03-11 Thread Changman Lee
In f2fs, pagecache page doesn't contain filesystem specific data, so it's redundant. Let's remove it. Signed-off-by: Changman Lee --- fs/f2fs/checkpoint.c |1 - fs/f2fs/data.c |2 -- fs/f2fs/node.c |3 --- 3 files changed, 6 deletions(-) diff

[f2fs-dev] [PATCH 2/2] f2fs: call set_dirty_dir_page if inode is directory.

2014-03-11 Thread Changman Lee
It's more legible and efficient to call set_dirty_dir_page only if inode->i_mode is directory before calling it. Signed-off-by: Changman Lee --- fs/f2fs/checkpoint.c |3 --- fs/f2fs/data.c |3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/chec

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

2014-03-09 Thread Changman Lee
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 not use stale free nids created by build_free_nids */ >

[f2fs-dev] [PATCH 1/2] f2fstat: show cp count calling f2fs

2014-02-12 Thread Changman Lee
This patch is to inform how many checkpoint is called. Signed-off-by: Changman Lee --- tools/f2fstat.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/f2fstat.c b/tools/f2fstat.c index 8ece660..73ad457 100644 --- a/tools/f2fstat.c +++ b/tools/f2fstat.c

[f2fs-dev] [PATCH 2/2] f2fstat: add nat caches and free nids

2014-02-12 Thread Changman Lee
This patch shows nat caches and free nids using f2fs. Signed-off-by: Changman Lee --- tools/f2fstat.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/f2fstat.c b/tools/f2fstat.c index 73ad457..c9c1d30 100644 --- a/tools/f2fstat.c +++ b/tools/f2fstat.c

[f2fs-dev] [PATCH] f2fs: show counts of checkpoint in status

2014-02-12 Thread Changman Lee
This patch shows the counts of checkpoint in f2fs' status. Signed-off-by: Changman Lee --- fs/f2fs/checkpoint.c |1 + fs/f2fs/debug.c |1 + fs/f2fs/f2fs.h |4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpo

[f2fs-dev] [PATCH] f2fstat: add memory information used by f2fs

2014-02-05 Thread Changman Lee
This patch adds memory information used by f2fs. Signed-off-by: Changman Lee --- tools/f2fstat.c | 69 +++ 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/tools/f2fstat.c b/tools/f2fstat.c index b4f22ae..8ece660 100644 --- a

Re: [f2fs-dev] [PATCH 2/4] f2fs: handle dirty segments inside refresh_sit_entry

2014-02-05 Thread Changman Lee
Hi, I found some redundant code in your patch. I think that locate_dirty_segment(sbi, old_cursegno) equals to locate_dirty_segment(sbi, GET_SEGNO(sbi, new)) in refresh_sit_entry. Because *new_blkaddr is a block belonging to old_cursegno. How do you think? On 화, 2014-01-28 at 14:54 +0900, Jaegeuk

  1   2   >