Re: [PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func

2013-02-03 Thread Changman Lee
t;From fbda3262dac81c4f0d7ae8b9b757c820da593120 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Mon, 4 Feb 2013 10:05:09 +0900 Subject: [PATCH] f2fs: remove unnecessary gc option check and balance_fs 1. If f2fs is mounted with background_gc_off option, checking BG_GC is not redundant. 2. f2fs_balance_fs is checked in f2fs_

RE: [PATCH 00/16] f2fs: introduce flash-friendly file system

2012-10-17 Thread Changman Lee
> -Original Message- > From: Namjae Jeon [mailto:linkinj...@gmail.com] > Sent: Wednesday, October 17, 2012 8:14 PM > To: Changman Lee > Cc: Jaegeuk Kim; Vyacheslav Dubeyko; Marco Stornelli; Jaegeuk Kim; Al Viro; > ty...@mit.edu; gre...@linuxfoundation.org; linux-kern

Re: [f2fs-dev] [PATCH 1/4] f2fs: reorganize the f2fs_setattr() function.

2013-06-20 Thread Changman Lee
On 금, 2013-06-14 at 13:20 +0900, Namjae Jeon wrote: > 2013/6/11, Namjae Jeon : > > 2013/6/11, Changman Lee : > >> On 화, 2013-06-11 at 07:57 +0900, Namjae Jeon wrote: > >>> 2013/6/10, Changman Lee : > >>> > Hello, Namjae > >>> Hi. Changman.

Re: [f2fs-dev] [PATCH 1/4] f2fs: reorganize the f2fs_setattr() function.

2013-06-09 Thread Changman Lee
Hello, Namjae If using ACL, whenever i_mode is changed we should update acl_mode which is written to xattr block, too. And vice versa. Because update_inode() is called at any reason and anytime, so we should sync both the moment xattr is written. We don't hope that only i_mode is written to disk a

Re: [f2fs-dev] [PATCH 1/4] f2fs: reorganize the f2fs_setattr() function.

2013-06-10 Thread Changman Lee
On 화, 2013-06-11 at 07:57 +0900, Namjae Jeon wrote: > 2013/6/10, Changman Lee : > > Hello, Namjae > Hi. Changman. > > > > If using ACL, whenever i_mode is changed we should update acl_mode which > > is written to xattr block, too. And vice versa. > > Because up

Re: [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-de...@lists.sourceforge.net; > > > linux-kernel@vger.kernel.org > > > Subject: Re: [RFC PATCH] f2fs: add extent cache base on rb-tree > > > &

Re: linux-next: Tree for Dec 26 (f2fs)

2014-12-28 Thread Changman Lee
On Fri, Dec 26, 2014 at 12:59:05PM -0800, Jaegeuk Kim wrote: > I fixed the merged patch directly. > > Changman, > The patch was initially made by you, so let me know, if you have objection. > > Thanks, Sorry for my mistake. Thanks, Stephen and Jaegeuk. > > On Fri, Dec 26, 2014 at 11:17:15AM -0

Re: [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: [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: Jaegeu

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

2013-10-29 Thread Changman Lee
Review attached patch, please. -Original Message- From: Chao Yu [mailto:chao2...@samsung.com] Sent: Tuesday, October 29, 2013 3:51 PM To: jaegeuk@samsung.com Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sourceforge.net Subject: [f2fs-dev] [PA

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

2013-10-29 Thread Changman Lee
ws my patch takes litter time. Could you test and compare the performance of two patches. -- 1.7.10.4 > -Original Message- > From: Changman Lee [mailto:cm224@samsung.com] > Sent: Tuesday, October 29, 2013 3:36 PM > To: 'Chao Yu'; jaegeuk@samsung.com

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

2013-10-29 Thread Changman Lee
As you know, if any data or function are used once, we can use some keywords like __initdata for data and __init for function. -Original Message- From: Chao Yu [mailto:chao2...@samsung.com] Sent: Tuesday, October 29, 2013 7:52 PM To: 'Changman Lee'; jaegeuk@samsung.com

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-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] 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:

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 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 */ >

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] 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

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 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] 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-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-fsde..

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

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: 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-kernel

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

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

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 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 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 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/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/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

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

Re: [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: [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-de.

Re: [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 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: [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 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: [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-by : Changman Lee > > _

Re: [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 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

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