[f2fs-dev] [PATCH 3/4] f2fs: avoid f2fs_lock_op in f2fs_write_begin

2015-12-23 Thread Jaegeuk Kim
If f2fs_write_begin is to update data, we can bypass calling f2fs_lock_op() in order to avoid the checkpoint latency in the write syscall. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 43 ++- 1 file changed, 34 insertions

[f2fs-dev] [PATCH 1/4] f2fs: introduce prepare_write_begin to clean up

2015-12-23 Thread Jaegeuk Kim
This patch adds prepare_write_begin to clean f2fs_write_begin. The major role of this function is to convert any inline_data and allocate or find block address. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 92 ++-

[f2fs-dev] [PATCH 2/4] f2fs: return early when trying to read null nid

2015-12-23 Thread Jaegeuk Kim
If get_node_page() gets zero nid, we can return early without getting a wrong page. For example, get_dnode_of_data() can try to do that. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/node.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c

[f2fs-dev] [PATCH 4/4] f2fs: declare static function

2015-12-23 Thread Jaegeuk Kim
The __f2fs_commit_super is static. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 597b533..75704d9 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -

Re: [f2fs-dev] [PATCH 2/4 v2] f2fs: avoid unnecessary f2fs_gc for dir operations

2015-12-23 Thread Jaegeuk Kim
Hi Chao, Right. But, in the rename path, we still need to do f2fs_balance_fs, since it produces another dirty node page in the mean time. How about this? >From bbc5bf8f6c940cd75a4d71ce40ce4bd3f647a823 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 22 Dec 2

Re: [f2fs-dev] [PATCH] defrag.f2fs: enhance allocation speed

2015-12-19 Thread Jaegeuk Kim
Hi Chao, On Sat, Dec 19, 2015 at 05:44:45PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > On 12/19/15 6:13 AM, Jaegeuk Kim wrote: > > This patch improves the allocation speed. > > > > Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> > > --- > >

[f2fs-dev] [PATCH 2/2] fsck.f2fs: fix losing journal entries

2015-12-21 Thread Jaegeuk Kim
If fsck.f2fs reports a bug, move_curseg_info tries to change the current segment info. When it changes the new summary block, it overwrites the existing journal entries. This patch fixes it not to overwrite journal entry space. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount

[f2fs-dev] [PATCH 1/2] defrag.f2fs: fix missing SSA updates

2015-12-21 Thread Jaegeuk Kim
entry. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index 79611e5..d2f1432 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -761,13 +761,16 @@ void update_sum_entry(

Re: [f2fs-dev] [RFC PATCH V3 2/2] mkfs.f2fs: avoid dumplicate extensions

2015-11-28 Thread Jaegeuk Kim
Hi Sheng, On Sat, Nov 28, 2015 at 12:19:24PM +0800, Sheng Yong wrote: > > > On 11/28/2015 12:00 PM, Chao Yu wrote: > > On 11/28/15 11:07 AM, Sheng Yong wrote: > >> Before copying an user specified extension to extension_list, check if it > >> is already in the list. > >> > >> Signed-off-by:

[f2fs-dev] [PATCH] f2fs: avoid deadlock in f2fs_shrink_extent_tree

2015-11-30 Thread Jaegeuk Kim
ock(>lock) successfully and release all of therein nodes. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/extent_cache.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 7ddba81..21b1b8e 100644 -

Re: [f2fs-dev] [PATCH v3] F2FS support

2015-11-19 Thread Jaegeuk Kim
Hello, Change log from v2: o Enhance the code quality suggested by Andrei Sorry for the long delay. Could you please check this patch? Thank you so much, --- >& --- From 2c0e1d33533fc9fb2686f0e2c17efca11ce57e2f Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date

[f2fs-dev] [PATCH 2/2] fsck.f2fs: support a readonly filesystem

2015-11-21 Thread Jaegeuk Kim
If f2fs is mounted as ro, we can do fsck.f2fs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.c | 15 --- fsck/main.c | 15 --- include/f2fs_fs.h | 1 + lib/libf2fs.c | 17 +++-- mkfs/f2fs_format_

[f2fs-dev] [PATCH 1/2] fsck.f2fs: declare static function

2015-11-21 Thread Jaegeuk Kim
This avoids the following warning. mount.c:783:27: warning: SM_I is static but used in inline function check_seg_range which is not static. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c

Re: [f2fs-dev] [PATCH] f2fs: should unset atomic flag after successful commit

2016-01-11 Thread Jaegeuk Kim
Hi Chao, On Mon, Jan 11, 2016 at 03:25:11PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Sunday, January 10, 2016 9:10 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@vger.ke

Re: [f2fs-dev] [PATCH 2/2] f2fs: detect idle time depending on user behavior

2016-01-11 Thread Jaegeuk Kim
Change log from v1: - add more cases >From d0239e1bf5204d602281f93c01d46bcf3531098d Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Fri, 8 Jan 2016 16:57:48 -0800 Subject: [PATCH] f2fs: detect idle time depending on user behavior This patch adds last time

Re: [f2fs-dev] [PATCH 2/2] f2fs: detect idle time depending on user behavior

2016-01-11 Thread Jaegeuk Kim
Hi Chao, On Mon, Jan 11, 2016 at 03:15:36PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, January 09, 2016 9:29 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@v

Re: [f2fs-dev] Consolidated file encryption interface/semantics?

2016-01-11 Thread Jaegeuk Kim
Hello, Actually, I tried to prepare this quite long time ago [1], which was stuck that moment unfortunately, since I needed to wait for how AOSP finally treats with this feature. At some moment later, I couldn't even follow up every ext4 changes into this patch set, since the feature was not

Re: [f2fs-dev] [PATCH 2/2] f2fs: support revoking atomic written pages

2016-01-12 Thread Jaegeuk Kim
, On Fri, Jan 08, 2016 at 11:43:06AM -0800, Jaegeuk Kim wrote: > On Fri, Jan 08, 2016 at 08:05:52PM +0800, Chao Yu wrote: > > Hi Jaegeuk, > > > > Any progress on this patch? > > Swamped. Will do. > > Thanks, > > > > > Thanks, > > > >

[f2fs-dev] [PATCH 2/8] f2fs: remove deprecated parameter

2016-06-02 Thread Jaegeuk Kim
Remove deprecated paramter. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/dir.c| 4 ++-- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inline.c | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 6fbb1ed..f6ab3c2 100644 --- a/f

[f2fs-dev] [PATCH 8/8] f2fs: control not to exceed # of cached nat entries

2016-06-02 Thread Jaegeuk Kim
This is to avoid cache entry management overhead including radix tree. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/node.c| 4 fs/f2fs/node.h| 7 +++ fs/f2fs/segment.c | 5 + 3 files changed, 16 insertions(+) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c

[f2fs-dev] [PATCH 5/8] f2fs: remove obsolete parameter in f2fs_truncate

2016-06-02 Thread Jaegeuk Kim
We don't need lock parameter, which is always true. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 6 +++--- fs/f2fs/inode.c | 2 +- fs/f2fs/super.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/f2fs.h b/f

[f2fs-dev] [PATCH 6/8] f2fs: avoid data race between FI_DIRTY_INODE flag and update_inode

2016-06-02 Thread Jaegeuk Kim
FI_DIRTY_INODE - reset FI_DIRTY_INODE - set_page_dirty(ipage) In this case, we can lose the latest i_field information. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index f

[f2fs-dev] [PATCH 4/8] f2fs: skip roll_forward recovery after umount

2016-06-02 Thread Jaegeuk Kim
If f2fs was umounted successfully, we don't need to go into roll_forward. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/recovery.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index b568b28..841bddc 100644 --- a/fs/f2fs/reco

[f2fs-dev] [PATCH 3/8] f2fs: avoid wrong count on dirty inodes

2016-06-02 Thread Jaegeuk Kim
The number should be covered by spin_lock. Otherwise we can see wrong count in f2fs_stat. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 27f76819e..9e75433

[f2fs-dev] [PATCH 7/8] f2fs: fix wrong percentage

2016-06-02 Thread Jaegeuk Kim
This should be 1%, 10MB / 1GB. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 1f4f9d4..2c2a797 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -23,7 +23,7 @@ #

[f2fs-dev] [PATCH 1/8] f2fs: reuse nid if it was cached only

2016-06-02 Thread Jaegeuk Kim
If nid's block address is assigned as: NULL_ADDR -> NEW_ADDR -> NULL_ADDR, we can reset this nid, since its node page has never written back. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/node.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) dif

Re: [f2fs-dev] [PATCH] f2fs: fix to redirty page if fail to gc data page

2016-06-03 Thread Jaegeuk Kim
On Fri, Jun 03, 2016 at 01:59:15PM +0800, Chao Yu wrote: ... > >>> Do we have another expectation? > >> > >> ENOMEM or EIO? > > > > EIO will stop everything. > > ENOMEM would be better to wait for a while from page reclaim? > > Agree, but for ioctl path, IMO, we don't need to let user waiting

[f2fs-dev] [PATCH] mkfs.f2fs: ZBC device support

2016-06-08 Thread Jaegeuk Kim
This patch adds "-m" option to configure ZBC device. This is to support host-managed SMR device and configure some major features and on-disk layout in f2fs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- include/f2fs_fs.h | 35 +++ lib/Makefile.am | 2 +

[f2fs-dev] [PATCH 7/7] f2fs: don't need to flush unlinked dentry pages

2016-06-08 Thread Jaegeuk Kim
We don't need to flush any dentry pages used by unlinked directory. They will be truncated by f2fs_evict_inode. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/f

[f2fs-dev] [PATCH 1/7] f2fs: set mapping error for EIO

2016-06-08 Thread Jaegeuk Kim
If EIO occurred, we need to set all the mapping to avoid any further IOs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c9d6fe2..30dc448 100644 --- a/fs/f2fs/

[f2fs-dev] [PATCH 5/7] f2fs: introduce force_lfs mount option

2016-06-08 Thread Jaegeuk Kim
This mount option is to enable original log-structured filesystem forcefully. So, there should be no random writes for main area. Especially, this supports host-managed SMR device. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- Documentation/filesystems/f2fs.txt | 3 +++ fs/f2fs/

[f2fs-dev] [PATCH 4/7] f2fs: skip clean segment for gc

2016-06-08 Thread Jaegeuk Kim
If a segment in a section is clean or prefreed, we don't need to get its summary and do gc. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/gc.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 67fd285..e1d274c 100644 --- a/fs/f2fs/gc.c

[f2fs-dev] [PATCH 2/7] f2fs: avoid reverse IO order for NODE and DATA

2016-06-08 Thread Jaegeuk Kim
There is a data race between allocate_data_block() and f2fs_sbumit_page_mbio(), which incur unnecessary reversed bio submission. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 6 ++ fs/f2fs/super.c | 2 ++ 3 files changed, 9 inse

[f2fs-dev] [PATCH 3/7] f2fs: drop any block plugging

2016-06-08 Thread Jaegeuk Kim
In f2fs, we don't need to keep block plugging for NODE and DATA writes, since we already merged bios as much as possible. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 4 fs/f2fs/data.c | 17 ++--- fs/f2fs/gc.c | 5 - f

[f2fs-dev] [PATCH 6/7] f2fs: fix deadlock in add_link failure

2016-06-08 Thread Jaegeuk Kim
(data) - lock_page(node) - f2fs_init_acl - error - truncate_inode_pages - lock_page(data) So, we don't need to truncate data pages in this error case, which will be done by f2fs_evict_inode. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- f

[f2fs-dev] [PATCH 2/2] f2fs: report error for f2fs_parent_dir

2016-06-10 Thread Jaegeuk Kim
If there is no dentry, we can report its error correctly. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/namei.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 78efe00..618829e 100644 --- a/fs/f2fs/n

[f2fs-dev] [PATCH 1/2] f2fs: check only data or node for summary

2016-06-10 Thread Jaegeuk Kim
We can check data or node types only for gc, since we allocate different type of data/node blocks in a different logs occasionally. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2f

Re: [f2fs-dev] [PATCH] f2fs: fix to redirty page if fail to gc data page

2016-06-02 Thread Jaegeuk Kim
On Fri, Jun 03, 2016 at 01:13:21PM +0800, Chao Yu wrote: > On 2016/6/3 13:08, Jaegeuk Kim wrote: > > On Tue, May 31, 2016 at 02:10:50PM +0800, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2016/5/30 10:37, Jaegeuk Kim wrote: > >>> Hi Chao, > >&

Re: [f2fs-dev] [PATCH] f2fs: fix to redirty page if fail to gc data page

2016-06-02 Thread Jaegeuk Kim
On Tue, May 31, 2016 at 02:10:50PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > On 2016/5/30 10:37, Jaegeuk Kim wrote: > > Hi Chao, > > > > On Sat, May 21, 2016 at 01:19:11PM +0800, Chao Yu wrote: > >> From: Chao Yu <yuch...@huawei.com> > >> > &g

Re: [f2fs-dev] [PATCH] f2fs: introduce on-disk layout version checking functionality

2016-05-25 Thread Jaegeuk Kim
Hello, On Tue, May 24, 2016 at 06:05:23PM -0700, Viacheslav Dubeyko wrote: > Hi Jaegeuk, > > On Mon, 2016-05-23 at 14:13 -0700, Jaegeuk Kim wrote: > > Hi Slava, > > > > On Thu, May 19, 2016 at 10:46:06AM -0700, Viacheslav Dubeyko wrote: &g

[f2fs-dev] [PATCH 2/2] f2fs: call update_inode_page for orphan inodes

2016-06-14 Thread Jaegeuk Kim
Let's store orphan inode pages right away. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 6 +++--- fs/f2fs/dir.c| 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inode.c | 5 +++-- fs/f2fs/namei.c | 4 ++-- fs/f2fs/super.c

[f2fs-dev] [PATCH 1/2] f2fs: detect host-managed SMR by feature flag

2016-06-14 Thread Jaegeuk Kim
If mkfs.f2fs gives a feature flag for host-managed SMR, we can set mode=lfs by default. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/f2fs.h | 21 + fs/f2fs/super.c | 14 -- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/f

Re: [f2fs-dev] [PATCH 1/2] f2fs: detect host-managed SMR by feature flag

2016-06-15 Thread Jaegeuk Kim
On Wed, Jun 15, 2016 at 04:21:13AM +, Damien Le Moal wrote: > Jaegeuk, > > On 6/15/16 03:45, Jaegeuk Kim wrote: > > If mkfs.f2fs gives a feature flag for host-managed SMR, we can set mode=lfs > > by default. > > > > Signed-off-by: Jaegeuk Kim <jaeg...@ker

Re: [f2fs-dev] [PATCH v2] mkfs/fsck: add host-managed smr feature

2016-06-15 Thread Jaegeuk Kim
Change log from v1: - Fix wrong feature set. >From 70a8fc3df7b72730fd2d40394892688292e8f78e Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Mon, 13 Jun 2016 09:36:38 -0700 Subject: [PATCH] mkfs/fsck: add host-managed smr feature This feature flag will be use

[f2fs-dev] [PATCH 1/4] f2fs: propagate error given by f2fs_find_entry

2016-05-26 Thread Jaegeuk Kim
If we get ENOMEM or EIO in f2fs_find_entry, we should stop right away. Otherwise, for example, we can get duplicate directory entry by ->chash and ->clevel. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/dir.c| 23 --- fs/f2fs/inline.c | 4 +

[f2fs-dev] [PATCH 3/4] f2fs: do not skip writing data pages

2016-05-26 Thread Jaegeuk Kim
-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c| 11 +-- fs/f2fs/segment.h | 4 +--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 7132b02..85ceb2b 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1444,7 +

[f2fs-dev] [PATCH 4/4] f2fs: remove two steps to flush dirty data pages

2016-05-26 Thread Jaegeuk Kim
/s Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 85ceb2b..5dcd8db 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1326,10 +1326,9 @@ stat

[f2fs-dev] [PATCH 2/4] f2fs: inject to produce some orphan inodes

2016-05-26 Thread Jaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/f2fs.h | 3 +++ fs/f2fs/inode.c | 5 + fs/f2fs/super.c | 1 + 3 files changed, 9 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 5daba19..c4697b7 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -45,6

[f2fs-dev] [PATCH 2/2] f2fs: handle writepage correctly

2016-06-01 Thread Jaegeuk Kim
writing pages without error. For example, volatile_write() gives EIO all the time, as Shuoran Liu pointed out. Reported-by: Shuoran Liu <liushuo...@huawei.com> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 44 ++-- 1 file

[f2fs-dev] [PATCH 1/2] f2fs: return error of f2fs_lookup

2016-06-01 Thread Jaegeuk Kim
Now we can report an error to f2fs_lookup given by f2fs_find_entry. Suggested-by: He YunLei <heyun...@huawei.com> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/dir.c | 2 +- fs/f2fs/namei.c | 5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/

Re: [f2fs-dev] [PATCH] f2fs: fix to redirty page if fail to gc data page

2016-05-29 Thread Jaegeuk Kim
Hi Chao, On Sat, May 21, 2016 at 01:19:11PM +0800, Chao Yu wrote: > From: Chao Yu > > If we fail to move data page during foreground GC, we should give another > chance to writeback that page which was set dirty previously by writer. > > Signed-off-by: Chao Yu

Re: [f2fs-dev] [PATCH 1/4] f2fs: propagate error given by f2fs_find_entry

2016-05-29 Thread Jaegeuk Kim
On Fri, May 27, 2016 at 12:48:48PM +0800, He YunLei wrote: > On 2016/5/27 8:25, Jaegeuk Kim wrote: > >If we get ENOMEM or EIO in f2fs_find_entry, we should stop right away. > >Otherwise, for example, we can get duplicate directory entry by ->chash and > >->clevel. > &

[f2fs-dev] [PATCH 3/3] f2fs: avoid latency-critical readahead of node pages

2016-06-17 Thread Jaegeuk Kim
The f2fs_map_blocks is very related to the performance, so let's avoid any latency to read ahead node pages. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 2 +- fs/f2fs/file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/f

[f2fs-dev] [PATCH 1/3] f2fs: produce more nids and reduce readahead nats

2016-06-17 Thread Jaegeuk Kim
The readahead nat pages are more likely to be reclaimed quickly, so it'd better to gather more free nids in advance. And, let's keep some free nids as much as possible. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 2 ++ fs/f2fs/f2fs.h | 1 + fs/f2fs/

[f2fs-dev] [PATCH 2/3] f2fs: avoid writing node/metapages during writes

2016-06-17 Thread Jaegeuk Kim
Let's keep more node/meta pages in run time. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/segment.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index d74cc33..57d450f 100644 --- a/fs/f2fs/segment.h +++ b/f

Re: [f2fs-dev] [GIT PULL] f2fs updates for v4.5

2016-01-14 Thread Jaegeuk Kim
Hi Stephen, On Thu, Jan 14, 2016 at 09:52:04AM +1100, Stephen Rothwell wrote: > Hi Jaegeuk, > > On Wed, 13 Jan 2016 14:23:53 -0800 Jaegeuk Kim <jaeg...@kernel.org> wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git > > tags/for-f2fs-

[f2fs-dev] [PATCH 1/2] fsck.f2fs: assign checkpoint pointer correctly

2016-01-15 Thread Jaegeuk Kim
This patch fixes a bug that cp pointer is not assigned correctly. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index 002a7cb..c4dfb0a 100644 --- a/fsck/mount.c +++ b/fsck/m

[f2fs-dev] [PATCH 2/2] fsck.f2fs: return 0 for no error was reported

2016-01-15 Thread Jaegeuk Kim
When skipping fsck, return 0 with message. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/main.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fsck/main.c b/fsck/main.c index d70b9ed..54dbb2d 100644 --- a/fsck/main.c +++ b/fsck/main.c @@

Re: [f2fs-dev] [PATCH 1/2] f2fs: flush dirty nat entries when exceeding threshold

2016-01-16 Thread Jaegeuk Kim
Hi Chao, On Sat, Jan 16, 2016 at 05:36:40PM +0800, Chao Yu wrote: > When testing f2fs with xfstest, generic/251 is stuck for long time, > the case uses below serials to obtain fresh released space in device, > in order to preparing for following fstrim test. > > 1. rm -rf /mnt/dir > 2. mkdir

Re: [f2fs-dev] [PATCH v2] f2fs: serialize block allocation of dio writes to enhance multithread performance

2016-01-14 Thread Jaegeuk Kim
Hi Chao, On Wed, Jan 13, 2016 at 08:13:36PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Chao Yu [mailto:chao2...@samsung.com] > > Sent: Tuesday, December 29, 2015 2:44 PM > > To: Jaegeuk Kim > > Cc: linux-ker.

Re: [f2fs-dev] [PATCH 2/2] f2fs: support revoking atomic written pages

2016-01-14 Thread Jaegeuk Kim
Hi Chao, On Wed, Jan 13, 2016 at 01:05:01PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, January 13, 2016 9:18 AM > > To: Chao Yu > > Cc: linux-ker.

[f2fs-dev] [PATCH 4/5] f2fs crypto: check for too-short encrypted file names

2016-02-08 Thread Jaegeuk Kim
, in modern kernels the crypto layer will not crash the kernel in this scenario, but nevertheless, it represents a corrupted directory, and we should detect it and mark the file system as corrupted so that e2fsck can fix this. Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-off-by: Jaegeuk Kim

[f2fs-dev] [PATCH 1/5] f2fs crypto: replace some BUG_ON()'s with error checks

2016-02-08 Thread Jaegeuk Kim
This patch adopts: ext4 crypto: replace some BUG_ON()'s with error checks Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/crypto.c | 1 - fs/f2fs/crypto_fname.c | 2 -- fs/f2fs/crypto_key.c | 15

[f2fs-dev] [PATCH 5/5] f2fs crypto: add missing locking for keyring_key access

2016-02-08 Thread Jaegeuk Kim
This patch adopts: ext4 crypto: add missing locking for keyring_key access Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/crypto_key.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/crypto_key

[f2fs-dev] [PATCH 2/5] f2fs crypto: fix spelling typo in comment

2016-02-08 Thread Jaegeuk Kim
This patch adopts: ext4 crypto: fix spelling typo in comment Signed-off-by: Laurent Navet <laurent.na...@gmail.com> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/crypto_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/crypto_key

[f2fs-dev] [PATCH 3/5] f2fs crypto: f2fs_page_crypto() doesn't need a encryption context

2016-02-08 Thread Jaegeuk Kim
in ext4_block_write_begin(). It also means we no longer need a separate ext4_decrypt_one() function. Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/crypto.c | 27 +-- fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h

[f2fs-dev] [PATCH 2/2] f2fs: preallocate blocks for buffered aio writes

2016-02-05 Thread Jaegeuk Kim
This patch preallocates data blocks for buffered aio writes. With this patch, we can avoid redundant locking and unlocking of node pages given consecutive aio request. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 36 ++-- f

Re: [f2fs-dev] [PATCH v2] f2fs-tools: set segment_count in super block correctly

2016-02-05 Thread Jaegeuk Kim
rsday, February 04, 2016 10:52 AM > > To: Fan Li; 'Jaegeuk Kim'; heyun...@huawei.com > > Cc: linux-f2fs-devel@lists.sourceforge.net > > Subject: Re: [f2fs-dev] [PATCH v2] f2fs-tools: set segment_count in super > > block correctly > > > > On 2016/2/3 13:29,

Re: [f2fs-dev] [PATCH 2/2] f2fs: support revoking atomic written pages

2016-02-05 Thread Jaegeuk Kim
Hi Chao, On Tue, Feb 02, 2016 at 06:19:06PM +0800, Chao Yu wrote: > > > > > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > > > > > Sent: Wednesday, January 13, 2016 9:18 AM > > > > > > To: Chao Yu > > > > &

Re: [f2fs-dev] xfstests/091 failures

2016-02-08 Thread Jaegeuk Kim
rom 108daea1bd02014d118aa1dbc83553671f6848e9 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Mon, 8 Feb 2016 14:17:38 -0800 Subject: [PATCH] f2fs: increase i_size to avoid missing data When finsert is doing with dirting pages, we should increase i_size right away. Otherwise, the moved pag

Re: [f2fs-dev] [PATCH] fsck.f2fs: avoid fix ssa in some case

2016-01-29 Thread Jaegeuk Kim
Hi Yunlei, On Thu, Jan 28, 2016 at 04:18:16PM +0800, Yunlei He wrote: > In some case, we need confirm node or data blkaddr is ok at first, > and then fix the conflict in ssa block. If the node blkaddr happen to > locate in data type segment caused by something error, may be we 'd > better ignore

Re: [f2fs-dev] [PATCH] Introduce lifetime write IO statistics

2016-01-27 Thread Jaegeuk Kim
;>> sysfs interface. > > >>>> The write IO amount is obtained from block layer, accumulated in the > > >>>> file system and > > >>>> stored in the hot node summary of checkpoint. > > >>>> > > >>>> Signed-off-by: S

Re: [f2fs-dev] [PATCH] f2fs-tools: set segment_count in super block correctly

2016-02-01 Thread Jaegeuk Kim
Hi Fan, On Mon, Feb 01, 2016 at 05:23:33PM +0800, Fan Li wrote: > Now f2fs will check statistics recorded in super block in > sanity_check_area_boundary() > during mount,if number of segments per section is greater than 1, and disk > space > isn't aligned with section, mount will fail due to

Re: [f2fs-dev] [PATCH 2/2] f2fs: support revoking atomic written pages

2016-02-01 Thread Jaegeuk Kim
Hi Chao, On Mon, Feb 01, 2016 at 06:04:13PM +0800, Chao Yu wrote: > Ping, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Friday, January 15, 2016 8:03 AM > > To: Chao Yu > > Cc: linux-ker...@vger.kernel.org; li

Re: [f2fs-dev] [PATCH] f2fs: delete unnecessary wait for page writeback

2016-02-02 Thread Jaegeuk Kim
Hi Yunlei, On Tue, Feb 02, 2016 at 09:05:27PM +0800, Yunlei He wrote: > no need to wait inline file page writeback for no one > use it, so this patch delete unnecessary wait. > > Signed-off-by: Yunlei He > --- > fs/f2fs/inline.c | 2 -- > 1 file changed, 2 deletions(-) >

Re: [f2fs-dev] [RFC PATCH 1/4] f2fs-tools: simplify get_{sb|cp} and set_{sb|cp}

2016-01-29 Thread Jaegeuk Kim
Hi Sheng, This is not a good way. You're asking to change all the pending patches as well. Why not just adding two definitions like these? #define get_sb(member) get_val(sb, member) #define set_sb(member, val) set_sb(sb, member, val) #define get_cp(member) get_val(cp,

[f2fs-dev] [PATCH 2/3] f2fs: flush bios to handle cp_error in put_super

2016-01-29 Thread Jaegeuk Kim
Sometimes, if cp_error is set, there remains under-writeback pages, resulting in kernel hang in put_super. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/super.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 9962021..a

[f2fs-dev] [PATCH 3/3] f2fs: fix conflict on page->private usage

2016-01-29 Thread Jaegeuk Kim
This patch fixes confilct on page->private value between f2fs_trace_pid and atomic page. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index ee44d34..cd711

[f2fs-dev] [PATCH 1/3] f2fs: wait on page's writeback in writepages path

2016-01-29 Thread Jaegeuk Kim
Likewise f2fs_write_cache_pages, let's do for node and meta pages too. Especially, for node blocks, we should do this before marking its fsync and dentry flags. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 4 +++- fs/f2fs/node.c | 5 +++-- 2 files chan

Re: [f2fs-dev] [PATCH] f2fs: remove vlist in extent node

2016-01-27 Thread Jaegeuk Kim
shrinking becomes: 1) lock lru list's lock 2) trylock extent tree's lock 3) remove extent node from lru list 4) unlock lru list's lock 5) do shrink 6) repeat 1) to 5) Signed-off-by: Hou Pengyang <houpengy...@huawei.com> Signed-off-by: Chao Yu <chao2...@samsung.com> Signed-off-

Re: [f2fs-dev] [PATCH] f2fs: remove vlist in extent node

2016-01-27 Thread Jaegeuk Kim
Hi Chao, On Thu, Jan 28, 2016 at 09:36:37AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Thursday, January 28, 2016 5:38 AM > > To: Chao Yu > > Cc: linux-f2fs-de

[f2fs-dev] [PATCH 01/10] fs crypto: add basic definitions for per-file encryption

2016-02-25 Thread Jaegeuk Kim
This patch adds definitions for per-file encryption used by ext4 and f2fs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- include/linux/fs.h | 8 ++ include/linux/fscrypto.h | 239 +++ include/uapi/linux/fs.h | 18 3 files c

[f2fs-dev] [PATCH 00/10 v2] File-level Encryption Support by VFS

2016-02-25 Thread Jaegeuk Kim
rc series 3. review, test, and migrate EXT4 changes accordingly Change log from v1: o Adjust recent ext4 crypto patches Jaegeuk Kim (10): fs crypto: add basic definitions for per-file encryption fs crypto: add crypto.c for encrypt/decrypt functions fs crypto: add policy.c to handle contexts

[f2fs-dev] [PATCH 02/10] fs crypto: add crypto.c for encrypt/decrypt functions

2016-02-25 Thread Jaegeuk Kim
- fscrypt_pullback_bio_page - fscrypt_restore_control_page Signed-off-by: Michael Halcrow <mhalc...@google.com> Signed-off-by: Ildar Muslukhov <ild...@google.com> Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/cry

[f2fs-dev] [PATCH 03/10] fs crypto: add policy.c to handle contexts

2016-02-25 Thread Jaegeuk Kim
'o <ty...@mit.edu> Signed-off-by: Ildar Muslukhov <muslukh...@gmail.com> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/crypto/policy.c | 229 +++ include/linux/fscrypto.h | 30 +++ 2 files changed, 259 insertions(+) crea

Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by losing wake_up

2016-02-25 Thread Jaegeuk Kim
Hi all, On Thu, Feb 25, 2016 at 05:41:26PM +0800, Chao Yu wrote: > Hi Yunlei, > > > -Original Message- > > From: He YunLei [mailto:heyun...@huawei.com] > > Sent: Thursday, February 25, 2016 3:36 PM > > To: Chao Yu; jaeg...@kernel.org; linux-f2fs-devel@lists.sourceforge.net > > Cc:

[f2fs-dev] [PATCH 08/10] f2fs crypto: migrate into vfs's crypto engine

2016-02-25 Thread Jaegeuk Kim
This patch removes the most parts of internal crypto codes. And then, it modifies some f2fs-specific crypt codes to use the generic facility. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/Kconfig | 10 +- fs/f2fs/Makefile| 2 - fs/f2fs/crypto.c

[f2fs-dev] [PATCH 05/10] fs crypto: add fname.c to support filename encryption

2016-02-25 Thread Jaegeuk Kim
Signed-off-by: Uday Savagaonkar <savag...@google.com> Signed-off-by: Ildar Muslukhov <ild...@google.com> Signed-off-by: Michael Halcrow <mhalc...@google.com> Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> ---

[f2fs-dev] [PATCH 10/10] ext4 crypto: migrate into vfs's crypto engine

2016-02-25 Thread Jaegeuk Kim
This patch removes the most parts of internal crypto codes. And then, it modifies and adds some ext4-specific crypt codes to use the generic facility. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/ext4/Kconfig | 12 +- fs/ext4/Makefile| 2 - fs/ext4/cr

[f2fs-dev] [PATCH 04/10] fs crypto: add keyinfo.c to handle permissions

2016-02-25 Thread Jaegeuk Kim
This patch adds keyinfo.c supporting key management. - fscrypt_get_encryption_info - fscrypt_free_encryption_info Signed-off-by: Michael Halcrow <mhalc...@google.com> Signed-off-by: Ildar Muslukhov <muslukh...@gmail.com> Signed-off-by: Theodore Ts'o <ty...@mit.edu> Signed-o

[f2fs-dev] [PATCH 07/10] fs crypto: add dentry revalidation facility in crypto

2016-02-25 Thread Jaegeuk Kim
u> Cc: Al Viro <v...@ftp.linux.org.uk> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/crypto/crypto.c | 49 include/linux/dcache.h | 2 ++ include/linux/fscrypto.h | 20 3 files changed, 71 insert

[f2fs-dev] [PATCH 06/10] fs crypto: add Makefile and Kconfig

2016-02-25 Thread Jaegeuk Kim
e> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/Kconfig | 2 ++ fs/Makefile| 1 + fs/crypto/Kconfig | 17 + fs/crypto/Makefile | 2 ++ 4 files changed, 22 insertions(+) create mode 100644 fs/crypto/Kconfig create mode 100644 fs/crypto/Mak

[f2fs-dev] [PATCH 09/10] f2fs crypto: sync ext4_lookup and ext4_file_open

2016-02-25 Thread Jaegeuk Kim
This patch tries to catch up with lookup and open policies in ext4. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/dir.c | 2 +- fs/f2fs/file.c | 4 fs/f2fs/namei.c | 23 +++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/d

Re: [f2fs-dev] [PATCH] mkfs.f2fs: recalculate sit_segments by max_sit_bitmap_size

2016-02-22 Thread Jaegeuk Kim
Hi Junling, On Thu, Feb 18, 2016 at 04:59:04PM +0800, Junling Zheng wrote: > In most cases, sit_bitmap_size is smaller than MAX_SIT_BITMAP_SIZE. > > However, in some extreme scenarios, such as 16TB, sit_bitmap_size > could be larger than MAX_SIT_BITMAP_SIZE. > > In this case, we should

[f2fs-dev] [PATCH] fsck.f2fs: check /proc/mounts first to detect readonly

2016-02-22 Thread Jaegeuk Kim
Once f2fs_stop_checkpoint makes f2fs as readonly, only /proc/mounts shows RDONLY whereas /etc/mtab does not. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- lib/libf2fs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libf2fs.c b/lib/libf2fs.c

Re: [f2fs-dev] [PATCH] fsck.f2fs: check nat_entry->ino for all nodes

2016-02-22 Thread Jaegeuk Kim
Hi Sheng, On Mon, Feb 22, 2016 at 05:01:15PM +, Sheng Yong wrote: > Commit 843f5b9388c4652a ("fsck.f2fs: check ino of an inode") checks > nat_entry->ino for inode. However, the checking is irrelevant to node > type, and if ino of other kinds of nodes gets corrupted, fsck.f2fs > cannot detect

Re: [f2fs-dev] [PATCH v2] f2fs crypto: fix incorrect positioning for GCing encrypted data page

2016-02-26 Thread Jaegeuk Kim
Hi Chao, On Tue, Feb 23, 2016 at 05:52:43PM +0800, Chao Yu wrote: > For now, flow of GCing an encrypted data page: > 1) try to grab meta page in meta inode's mapping with index of old block > address of that data page > 2) load data of ciphertext into meta page > 3) allocate new block address >

Re: [f2fs-dev] [PATCH v6] F2FS support

2016-02-22 Thread Jaegeuk Kim
Hi Andrei, I'll send v7 which addresses your comment. Thanks, On Mon, Feb 22, 2016 at 12:25:26PM +0300, Andrei Borzenkov wrote: > 08.01.2016 22:41, Jaegeuk Kim пишет: > > Change log from v5: > > o fix build warning for ARM, reported by Michael Zimmermann > > > > Th

Re: [f2fs-dev] [PATCH v7] F2FS support

2016-02-22 Thread Jaegeuk Kim
Chang log from v6: o remove redundant filesize check in ->read o check consistency in ->open regarding to inline_data -- >8 -- From 51c120612fdbc4bc315e9c4c6e91ca888c3f3596 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 17 Nov 2015 12:45:13 -0800

Re: [f2fs-dev] [oops, 4.4-rc8] warn + oops during generic/204

2016-01-21 Thread Jaegeuk Kim
, we gave more blocks to users, which turns out actually gc couldn't get a victim from them in this case. I could reproduce this issue, and once I reduced the number by 6 segments, I could avoid the issue. Here the change of f2fs-tools. >From 411166a44009bb138eca937376863e9ce673278a Mon Se

<    5   6   7   8   9   10   11   12   13   14   >