Re: [f2fs-dev] f2fs: use meta_inode cache to improve roll-forward speed

2014-09-17 Thread Jaegeuk Kim
Hi Dan, I fixed this. Thank you very much. On Mon, Sep 15, 2014 at 10:37:58PM +0300, Dan Carpenter wrote: Hello Jaegeuk Kim, The patch 17ef549eef6e: f2fs: use meta_inode cache to improve roll-forward speed from Sep 11, 2014, leads to the following static checker warning: fs/f2fs

[f2fs-dev] [PATCH 1/3] f2fs: introduce a flag to represent each nat entry information

2014-09-17 Thread Jaegeuk Kim
This patch introduces a flag in the nat entry structure to merge various information such as checkpointed and fsync_done marks. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.c | 13 +++-- fs/f2fs/node.h | 28 2 files changed, 31 insertions

[f2fs-dev] [PATCH 2/3] f2fs: fix conditions to remain recovery information in f2fs_sync_file

2014-09-17 Thread Jaegeuk Kim
this rule, which means, if there are any missing blocks, we doesn't need to recover that inode. Signed-off-by: Huang Ying ying.hu...@intel.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 3 --- fs/f2fs/f2fs.h | 6 +++--- fs/f2fs/file.c | 10 ++ fs/f2fs/node.c | 56

[f2fs-dev] [PATCH 3/3] f2fs: fix roll-forward missing scenarios

2014-09-17 Thread Jaegeuk Kim
). 8. CP | dnode(F) | inode(x) - If f2fs_iget fails, then goto next to find inode(DF). But it will fail due to no inode(DF). So, this patch adds some missing points such as #1, #5, #7, and #8. Signed-off-by: Huang Ying ying.hu...@intel.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs

[f2fs-dev] [PATCH 1/3] f2fs: update i_size when __allocate_data_block

2014-09-17 Thread Jaegeuk Kim
The f2fs_direct_IO uses __allocate_data_block, but inside the allocation path, we should update i_size at the changed time to update its inode page. Otherwise, we can get wrong i_size after roll-forward recovery. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 8 1

Re: [f2fs-dev] systemd-fsck and f2fs

2014-09-18 Thread Jaegeuk Kim
Hi, On Wed, Sep 17, 2014 at 07:17:11PM -0400, Patrick Houle wrote: I know that your master branch has fixed the systemd-fsck and f2fs problem with the fsck.f2fs: invalid option -- 'a'. But your latest tag is 1.3.0 from 2/2014 which doesn't contain the fix in your master branch. Any idea

Re: [f2fs-dev] Run xfstests for f2fs

2014-09-18 Thread Jaegeuk Kim
Hi, On Tue, Sep 16, 2014 at 03:30:58PM +0800, Huang Ying wrote: Hi, Jaegeuk, xfstests (http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git) is regression test suite for xfs and other file systems. To run xfstests for f2fs, we need to either - change fsck.f2fs to support -n,

[f2fs-dev] [PATCH] f2fs-tools: release 1.4.0

2014-09-20 Thread Jaegeuk Kim
This version includes: - fsck.f2fs fixing corrupted images/partitions - dump.f2fs retrieving speicific file - bug fixes on f2fsstat and fibmap.f2fs - refactor code blocks for android build Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix roll-forward missing scenarios

2014-09-20 Thread Jaegeuk Kim
On Thu, Sep 18, 2014 at 09:04:11PM +0800, huang ying wrote: On Thu, Sep 18, 2014 at 1:51 PM, Jaegeuk Kim jaeg...@kernel.org wrote: We can summarize the roll forward recovery scenarios as follows. [Term] F: fsync_mark, D: dentry_mark 1. inode(x) | CP | inode(x) | dnode(F) - Update

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix roll-forward missing scenarios

2014-09-20 Thread Jaegeuk Kim
On Sun, Sep 21, 2014 at 07:22:32AM +0800, Huang Ying wrote: On Sat, 2014-09-20 at 09:23 -0700, Jaegeuk Kim wrote: On Thu, Sep 18, 2014 at 09:04:11PM +0800, huang ying wrote: On Thu, Sep 18, 2014 at 1:51 PM, Jaegeuk Kim jaeg...@kernel.org wrote: We can summarize the roll forward

Re: [f2fs-dev] [PATCH 07/10] f2fs: use meta_inode cache to improve roll-forward speed

2014-09-22 Thread Jaegeuk Kim
Hi Chao, On Mon, Sep 22, 2014 at 10:36:25AM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Monday, September 15, 2014 6:14 AM To: linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs-devel

[f2fs-dev] [PATCH 1/3] f2fs: introduce cp_control structure

2014-09-22 Thread Jaegeuk Kim
This patch add a new data structure to control checkpoint parameters. Currently, it presents the reason of checkpoint such as is_umount and normal sync. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c| 16 fs/f2fs/f2fs.h | 11

Re: [f2fs-dev] [PATCH 2/3] f2fs: fix conditions to remain recovery information in f2fs_sync_file

2014-09-22 Thread Jaegeuk Kim
On Mon, Sep 22, 2014 at 05:20:19PM +0800, Chao Yu wrote: -Original Message- From: Huang Ying [mailto:ying.hu...@intel.com] Sent: Monday, September 22, 2014 3:39 PM To: Chao Yu Cc: 'Jaegeuk Kim'; linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs-devel

[f2fs-dev] [PATCH 2/3] f2fs: introduce FITRIM in f2fs_ioctl

2014-09-22 Thread Jaegeuk Kim
This patch introduces FITRIM in f2fs_ioctl. In this case, f2fs will issue small discards and prefree discards as many as possible for the given area. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c| 4 +- fs/f2fs/f2fs.h | 9 +++- fs/f2fs/file.c

[f2fs-dev] [PATCH 3/3] f2fs: refactor flush_nat_entries to remove costly reorganizing ops

2014-09-22 Thread Jaegeuk Kim
list and adding a series of set operations when the nat entry becomes dirty. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 13 +-- fs/f2fs/node.c | 299 + fs/f2fs/node.h | 9 +- 3 files changed, 162 insertions(+), 159

Re: [f2fs-dev] [PATCH 08/10] f2fs: remove redundant operation during roll-forward recovery

2014-09-22 Thread Jaegeuk Kim
Hi Chao, I fixed that. :) Thanks, On Mon, Sep 22, 2014 at 05:22:27PM +0800, Chao Yu wrote: -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Monday, September 15, 2014 6:14 AM To: linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs

[f2fs-dev] [PATCH 1/4] f2fs: check the use of macros on block counts and addresses

2014-09-25 Thread Jaegeuk Kim
---' | | seg# 0..xx.. = Note = o GET_SEGNO_FROM_SEG0 : blk address - global segno o GET_SEGNO : blk address - segno o START_BLOCK : segno - starting block address Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs

[f2fs-dev] [PATCH 2/4] f2fs: support atomic_write feature for database

2014-09-25 Thread Jaegeuk Kim
all or nothing by f2fs recovery procedure. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c| 7 -- fs/f2fs/f2fs.h| 23 +++--- fs/f2fs/file.c| 55 ++ fs/f2fs/gc.c | 2 +- fs/f2fs/inode.c | 4 fs/f2fs

[f2fs-dev] [PATCH 4/4] f2fs: call f2fs_unlock_op after error was handled

2014-09-25 Thread Jaegeuk Kim
This patch relocates f2fs_unlock_op in every directory operations to be called after any error was processed. Otherwise, the checkpoint can be entered with valid node ids without its dentry when -ENOSPC is occurred. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 1 + fs

Re: [f2fs-dev] [PATCH 2/4 v2] f2fs: support atomic_write feature for database

2014-09-30 Thread Jaegeuk Kim
will flush all the previous atomic data to the storage, which will be shown all or nothing by f2fs recovery procedure. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c| 6 +++- fs/f2fs/f2fs.h| 25 +++-- fs/f2fs/file.c| 55 fs/f2fs

Re: [f2fs-dev] [PATCH 3/3] f2fs: refactor flush_nat_entries to remove costly reorganizing ops

2014-10-01 Thread Jaegeuk Kim
On Tue, Sep 30, 2014 at 02:04:20PM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Tuesday, September 23, 2014 12:53 PM To: linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs-devel

Re: [f2fs-dev] [PATCH 2/3] f2fs: introduce FITRIM in f2fs_ioctl

2014-10-01 Thread Jaegeuk Kim
On Tue, Sep 30, 2014 at 02:01:58PM +0800, Chao Yu wrote: -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Tuesday, September 23, 2014 12:53 PM To: linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net Cc

Re: [f2fs-dev] [PATCH 2/4 v2] f2fs: support atomic_write feature for database

2014-10-04 Thread Jaegeuk Kim
Change log from v2: o change naming and add one more api From 148ec45e541b2d2b37b90f27286a3ee484866679 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim jaeg...@kernel.org Date: Thu, 25 Sep 2014 21:54:45 -0700 Subject: [PATCH] f2fs: support atomic operations for database This patch introduces a very

[f2fs-dev] [PATCH] f2fs: remove unused return vale

2014-10-04 Thread Jaegeuk Kim
Don't return any value without any usage. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index bd826d9..8d5e6e0 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -130,7

[f2fs-dev] [GIT PULL] f2fs updates for v3.18

2014-10-07 Thread Jaegeuk Kim
as default for next_free_nid f2fs: fix a race condition in next_free_nid Jaegeuk Kim (30): f2fs: introduce F2FS_I_SB, F2FS_M_SB, and F2FS_P_SB f2fs: retain inconsistency information to initiate fsck.f2fs f2fs: need fsck.f2fs when f2fs_bug_on is triggered f2fs: add BUG

[f2fs-dev] [PATCH 1/4] mkfs.f2fs: avoid build warning

2014-10-15 Thread Jaegeuk Kim
Avoid build warning for printf. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- mkfs/f2fs_format_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c index 19c52e4..e1f7c69 100644 --- a/mkfs/f2fs_format_main.c +++ b/mkfs

[f2fs-dev] [PATCH 3/4] fsck.f2fs: support inline_dentry

2014-10-15 Thread Jaegeuk Kim
This patch implements inline_dentry feature. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/f2fs.h | 5 +++ fsck/fsck.c | 123 -- fsck/fsck.h | 2 + include/f2fs_fs.h | 20 + 4 files changed, 109

[f2fs-dev] [PATCH 4/4] fsck.f2fs: fix wrong hash_code made by previous buggy code

2014-10-15 Thread Jaegeuk Kim
The previous f2fs remained wrong hash_code for international characters. So, fsck.f2fs should fix that hash_code with current valid names. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff

[f2fs-dev] [PATCH 2/4] fsck.f2fs: fix superblock offset

2014-10-15 Thread Jaegeuk Kim
The second offset should be F2FS_BLKSIZE + F2FS_SUPER_OFFSET. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/mount.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index 415f977..8b39d37 100644 --- a/fsck/mount.c +++ b/fsck/mount.c

[f2fs-dev] [PATCH 02/09] f2fs: invalidate inmemory page

2014-10-19 Thread Jaegeuk Kim
If user truncates file's data, we should truncate inmemory pages too. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c| 3 +++ fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 16 3 files changed, 20 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

[f2fs-dev] [PATCH 05/09] f2fs: use highmem for directory pages

2014-10-19 Thread Jaegeuk Kim
This patch fixes to use highmem for directory pages. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inode.c | 2 +- include/linux/f2fs_fs.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 0deead4..52d6f54 100644

[f2fs-dev] [PATCH 08/09] f2fs: avoid build warning

2014-10-19 Thread Jaegeuk Kim
This patch removes build warning. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- 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 902c4c3..2c1e608 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1715,7

[f2fs-dev] [PATCH 07/09] f2fs: fix to call f2fs_unlock_op

2014-10-19 Thread Jaegeuk Kim
This patch fixes to call f2fs_unlock_op, which was missing before. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 456df07..80d9a04 100644 --- a/fs/f2fs/file.c +++ b/fs

[f2fs-dev] [PATCH 01/09] f2fs: do not make dirty any inmemory pages

2014-10-19 Thread Jaegeuk Kim
This patch let inmemory pages be clean all the time. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c| 11 +++ fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 14 +- fs/f2fs/super.c | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/fs

[f2fs-dev] [PATCH 03/09] f2fs: should truncate any allocated block for inline_data write

2014-10-19 Thread Jaegeuk Kim
When trying to write inline_data, we should truncate any data block allocated and pointed by the inode block. We should consider the data index is not 0. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff

[f2fs-dev] [PATCH 06/09] f2fs: avoid to allocate when inline_data was written

2014-10-19 Thread Jaegeuk Kim
write inline_data O 30get_dnode_of_data O 30reserve data block .. In this case, we have #0 = NEW_ADDR and inline_data as well. We should not allow this condition for further access. Signed-off-by: Jaegeuk

[f2fs-dev] [PATCH 04/09] f2fs: fix race conditon on truncation with inline_data

2014-10-19 Thread Jaegeuk Kim
f2fs_truncate NULL O 0 1 get_dnode_of_data NULL O 0 1 *invalid block addr* This patch adds checking inline_data flag during f2fs_truncate not to refer corrupted block indices. Signed-off-by: Jaegeuk Kim

[f2fs-dev] [PATCH 09/09] f2fs: avoid infinite loop at cp_error

2014-10-19 Thread Jaegeuk Kim
This patch avoids an infinite loop in sync_dirty_inode_page when -EIO was detected. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index dd10a03..ca514d5 100644 --- a/fs

[f2fs-dev] [PATCH 02/11] f2fs: reuse find_in_block code for find_in_inline_dir

2014-10-19 Thread Jaegeuk Kim
This patch removes redundant copied code in find_in_inline_dir. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 72 +++- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/inline.c | 52 +--- 3 files

[f2fs-dev] [PATCH 09/11] f2fs: introduce f2fs_dentry_ptr structure for code clean-up

2014-10-19 Thread Jaegeuk Kim
This patch introduces f2fs_dentry_ptr structure for the use of a function parameter in inline_dentry operations. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 61 +++- fs/f2fs/f2fs.h | 34

[f2fs-dev] [PATCH 03/11] f2fs: fix to wait correct block type

2014-10-19 Thread Jaegeuk Kim
The inode page needs to wait NODE block io. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 3 ++- fs/f2fs/inline.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index c60b93f..644b480 100644 --- a/fs/f2fs/dir.c +++ b

[f2fs-dev] [PATCH 10/11] f2fs: reuse make_empty_dir code for inline_dentry

2014-10-19 Thread Jaegeuk Kim
This patch introduces do_make_empty_dir to mitigate code redundancy for inline_dentry. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 42 ++ fs/f2fs/f2fs.h | 2 ++ fs/f2fs/inline.c | 20 +++- 3 files changed, 31

[f2fs-dev] [PATCH 11/11] f2fs: use kmap_atomic instead of kmap

2014-10-19 Thread Jaegeuk Kim
For better performance, we need to use kmap_atomic instead of kmap. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 825995f..c03653d 100644 --- a/fs

[f2fs-dev] [PATCH 01/11] f2fs: reuse room_for_filename for inline dentry operation

2014-10-19 Thread Jaegeuk Kim
This patch introduces to reuse the existing room_for_filename for inline dentry operation. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 21 + fs/f2fs/f2fs.h | 1 + fs/f2fs/inline.c | 27 ++- 3 files changed, 12 insertions

[f2fs-dev] [PATCH 08/11] f2fs: should not truncate any inline_dentry

2014-10-19 Thread Jaegeuk Kim
If the inode has inline_dentry, we should not truncate any block indices. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d054e0e..402e381 100644 --- a/fs/f2fs/file.c +++ b

[f2fs-dev] [PATCH 06/11] f2fs: fix counting inline_data inode numbers

2014-10-19 Thread Jaegeuk Kim
This patch fixes wrongly counting inline_data inode numbers. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inode.c | 4 ++-- fs/f2fs/namei.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index b9b1d6b..4131e3c 100644 --- a/fs

[f2fs-dev] [PATCH 07/11] f2fs: reuse core function in f2fs_readdir for inline_dentry

2014-10-19 Thread Jaegeuk Kim
This patch introduces a core function, f2fs_fill_dentries, to remove redundant code in f2fs_readdir and f2fs_read_inline_dir. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 64 +--- fs/f2fs/f2fs.h | 3 +++ fs/f2fs

[f2fs-dev] [PATCH 04/11] f2fs: avoid deadlock on init_inode_metadata

2014-10-19 Thread Jaegeuk Kim
] tracesys+0xe1/0xe6 Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/acl.c| 144 --- fs/f2fs/acl.h| 5 +- fs/f2fs/dir.c| 10 ++-- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inline.c | 6 +-- fs/f2fs/xattr.c | 6 +-- fs/f2fs

[f2fs-dev] [PATCH 05/11] f2fs: add stat info for inline_dentry inodes

2014-10-19 Thread Jaegeuk Kim
This patch adds status information for inline_dentry inodes. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/debug.c | 3 +++ fs/f2fs/f2fs.h | 16 ++-- fs/f2fs/inline.c | 2 +- fs/f2fs/inode.c | 3 +++ fs/f2fs/namei.c | 1 + 5 files changed, 22 insertions(+), 3

[f2fs-dev] [PATCH] f2fs: revisit inline_data to avoid data races and potential bugs

2014-10-24 Thread Jaegeuk Kim
. 4. The inline_data flag should be changed under inode page lock. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 89 +++ fs/f2fs/f2fs.h | 18 - fs/f2fs/file.c | 81 + fs/f2fs/inline.c| 188

[f2fs-dev] [PATCH 2/4] f2fs: flush_dcache_page for inline data

2014-10-28 Thread Jaegeuk Kim
When reading inline data, we should call flush_dcache_page. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index d9daf76..d6677d6 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c

[f2fs-dev] [PATCH 4/4] f2fs: revisit inline_data to avoid data races and potential bugs

2014-10-28 Thread Jaegeuk Kim
. 4. The inline_data flag should be changed under inode page lock. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 89 +++--- fs/f2fs/f2fs.h | 24 +- fs/f2fs/file.c | 105 -- fs/f2fs/inline.c| 194

[f2fs-dev] [PATCH 1/4] f2fs: call write_checkpoint under disabled gc

2014-10-28 Thread Jaegeuk Kim
During the write_checkpoint, we should avoid f2fs_gc trigger to avoid any filesystem consistency. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 21ccc48..d391a59 100644 --- a/fs

[f2fs-dev] [PATCH 1/4] f2fs: send discard commands in larger extent

2014-10-31 Thread Jaegeuk Kim
If there is a chance to make a huge sized discard command, we don't need to split it out, since each blkdev_issue_discard should wait one at a time. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/segment.c | 44 +++- 1 file changed, 27

[f2fs-dev] [PATCH 3/4] f2fs: remove unnecessary macro

2014-10-31 Thread Jaegeuk Kim
Let's remove unused macro. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- include/linux/f2fs_fs.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index cc1064f..87f14e9 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h

[f2fs-dev] [PATCH 2/4] f2fs: avoid race condition in handling wait_io

2014-10-31 Thread Jaegeuk Kim
) spin_lock(X) kernel panic In order to avoid this, this patch removes the wait_io facility. Instead, we can use wait_on_all_pages_writeback(sbi) to wait for end_ios. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c | 3

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

2014-10-31 Thread Jaegeuk Kim
Hi Paolo, You can use -o sync,fastboot for the case. Please refer the patch that I sent. [PATCH 4/4] f2fs: introduce -o fastboot for reducing booting time only If a system wants to reduce the booting time as a top priority, now we can use a mount option, -o fastboot. With this option,

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

2014-11-08 Thread Jaegeuk Kim
This patch adds to control the memory footprint used by ino entries. This will conduct best effort, not strictly. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.c| 28 ++-- fs/f2fs/node.h| 3 ++- fs/f2fs/segment.c | 3 ++- 3 files changed, 26

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

2014-11-08 Thread Jaegeuk Kim
It needs to write node pages if checkpoint is not doing in order to avoid memory pressure. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 4ea2c47..6f514fb 100644

[f2fs-dev] [PATCH 2/5] f2fs: introduce the number of inode entries

2014-11-08 Thread Jaegeuk Kim
This patch adds to monitor the number of ino entries. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c | 27 +++ fs/f2fs/debug.c | 4 +++- fs/f2fs/f2fs.h | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/fs/f2fs

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

2014-11-08 Thread Jaegeuk Kim
The roll-forward mechanism should be activated when the number of active logs is not 2. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c| 2 ++ fs/f2fs/segment.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index

[f2fs-dev] [PATCH 5/5] f2fs: do not skip any writes under memory pressure

2014-11-08 Thread Jaegeuk Kim
Under memory pressure, let's avoid skipping data writes. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/segment.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 6723ccc..7f327c0 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h

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

2014-11-09 Thread Jaegeuk Kim
Ya, I'll do as much as possible. I missed sending patches sometimes. But, here we have been facing with a problem that there have been no reviewers and no comments on f2fs-tools for a long time. Check the commit history. At least, thus, I hope we need to focus on activation of this mailing list

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

2014-11-09 Thread Jaegeuk Kim
On Mon, Nov 10, 2014 at 12:28:34PM +0900, Changman Lee wrote: 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 jaeg...@kernel.org

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

2014-11-09 Thread Jaegeuk Kim
If a mount option has dirsync, we should call checkpoint for all the directory operations. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/namei.c | 24 1 file changed, 24 insertions(+) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 6312dd2..db3ee09

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

2014-11-10 Thread Jaegeuk Kim
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 number of active logs is not 2. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs

[f2fs-dev] [PATCH] fsck.f2fs: avoid false alarm on SIT type fix

2014-11-13 Thread Jaegeuk Kim
This patch removed a false alarm when detecting any inconsistency in SIT types. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/f2fs.h | 1 + fsck/fsck.c | 35 ++- fsck/mount.c | 1 + 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/fsck

[f2fs-dev] [PATCH 2/3] f2fs: fix deadlock to grab 0'th data page

2014-11-13 Thread Jaegeuk Kim
. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 54722a0..edc3ce8 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -477,8 +477,6 @@ int truncate_blocks(struct inode

[f2fs-dev] [PATCH 3/3] f2fs: convert inline_data when i_size becomes large

2014-11-13 Thread Jaegeuk Kim
into inline_data area. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 6 ++ fs/f2fs/inline.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index edc3ce8..7c2ec3e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -522,6 +522,12

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

2014-11-13 Thread Jaegeuk Kim
On Wed, Nov 12, 2014 at 07:43:12AM +0900, Changman Lee wrote: 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

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

2014-11-13 Thread Jaegeuk Kim
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! Prior to merge this patch, can you share any testing results or performance numbers? What condition will be the best

[f2fs-dev] [PATCH 2/2] f2fs: put the inode page when error was occurred

2014-11-17 Thread Jaegeuk Kim
We should put the inode page when error was occurred. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8f16443..12dd58a 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs

[f2fs-dev] [PATCH 1/2] f2fs: fix to call put_page at the error handling routine

2014-11-17 Thread Jaegeuk Kim
The locked page should be released before returning the function. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 053d114..f26fb87 100644 --- a/fs/f2fs/inline.c

Re: [f2fs-dev] [PATCH 2/2] f2fs: put the inode page when error was occurred

2014-11-19 Thread Jaegeuk Kim
On Tue, Nov 18, 2014 at 01:30:46PM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Tuesday, November 18, 2014 9:58 AM To: linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs-devel

[f2fs-dev] [PATCH 3/3] f2fs: write SSA pages under memory pressure

2014-11-19 Thread Jaegeuk Kim
Under memory pressure, we don't need to skip SSA page writes. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 838e8ed..20a917b 100644 --- a/fs/f2fs

[f2fs-dev] [PATCH 2/3] f2fs: submit bio for node blocks in the reclaim path

2014-11-19 Thread Jaegeuk Kim
If a node page is request to be written during the reclaiming path, we should submit the bio to avoid pending to recliam it. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 478ce1e

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

2014-11-19 Thread Jaegeuk Kim
: Jaegeuk Kim jaeg...@kernel.org Date: Tue, 18 Nov 2014 10:50:21 -0800 Subject: [PATCH] f2fs: call flush_dcache_page when the page was updated Whenever f2fs updates mapped pages, it needs to call flush_dcache_page. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 7 ++- fs

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

2014-11-23 Thread Jaegeuk Kim
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 Changman, On Thu, Nov 13, 2014 at 02:34:50PM +0900, Changman Lee wrote: To use cleancache, fs

[f2fs-dev] [PATCH 2/2] f2fs: fix livelock calling f2fs_iget during f2fs_evict_inode

2014-11-23 Thread Jaegeuk Kim
this. But, the commit_inmem_pages calls f2fs_balance_fs by default, even if f2fs_evict_inode wants to free inmemory pages only. Hence, this patch adds to trigger f2fs_balance_fs only when there is something to write. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/segment.c | 11 ++- 1 file

[f2fs-dev] [PATCH 1/2] f2fs: introduce f2fs_dentry_kunmap to clean up

2014-11-23 Thread Jaegeuk Kim
This patch introduces f2fs_dentry_kunmap to clean up dirty codes. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c | 3 +-- fs/f2fs/f2fs.h | 6 ++ fs/f2fs/namei.c| 30 ++ fs/f2fs/recovery.c | 3 +-- 4 files changed, 18 insertions

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

2014-11-23 Thread Jaegeuk Kim
: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 related to virtual address. Oh, I

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

2014-11-23 Thread Jaegeuk Kim
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: On Fri, Nov 14, 2014 at 02:53:02PM +0900, Changman Lee wrote: On Thu, Nov 13, 2014 at 05:27:51PM -0800

[f2fs-dev] [PATCH] fsck.f2fs: remove unused value

2014-11-24 Thread Jaegeuk Kim
Remove build warning. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 95b4028..f7309d6 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -999,7 +999,6 @@ int check_curseg_offset(struct f2fs_sb_info *sbi

[f2fs-dev] [PATCH 1/2] f2fs: fix deadlock during inline_data conversion

2014-11-25 Thread Jaegeuk Kim
to avoid this, this patch adds a rule for this locking policy, which is that page #0 should be locked followed by inode_page lock. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fs

[f2fs-dev] [PATCH 2/2 v2] f2fs: make clean the page before writing

2014-11-25 Thread Jaegeuk Kim
Change log from v1: o fix to handle # of dirty pages If a page is set to be written to the disk, we can make clean the page. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs

[f2fs-dev] [PATCH] f2fs: fix to recover converted inline_data

2014-11-25 Thread Jaegeuk Kim
If an inode has converted inline_data which was written to the disk, we should set its inode flag for further fsync so that this inline_data can be recovered from sudden power off. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 3 +++ 1 file changed, 3 insertions(+) diff

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

2014-12-01 Thread Jaegeuk Kim
On Mon, Dec 01, 2014 at 04:05:20PM +0900, Changman Lee wrote: It makes sense to check inode's state than check if inode page is dirty or not. Nice catch. However, we should leave the original condition, since write_inode can be called in prior to this fsync call. And, this is not a proper fix,

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

2014-12-04 Thread Jaegeuk Kim
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: 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

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

2014-12-05 Thread Jaegeuk Kim
On Fri, Dec 05, 2014 at 11:10:15AM +0900, Changman Lee wrote: 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

Re: [f2fs-dev] [PATCH 1/3] f2fs: fix missing kmem_cache_free

2014-12-05 Thread Jaegeuk Kim
Hi Gu, On Fri, Dec 05, 2014 at 11:34:49AM +0800, Gu Zheng wrote: Hi Jaegeuk, On 12/05/2014 08:49 AM, Jaegeuk Kim wrote: This patch fixes missing kmem_cache_free when handling errors. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.c | 2 +- 1 file changed, 1

Re: [f2fs-dev] [PATCH 3/3 v2] f2fs: call radix_tree_preload before radix_tree_insert

2014-12-05 Thread Jaegeuk Kim
Change log from v1: o remain GFP_ATOMIC for free_nid list due to its spin_lock From 769ec6e5b7d4a8115447736871be8bffaaba3a7d Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim jaeg...@kernel.org Date: Wed, 3 Dec 2014 20:47:26 -0800 Subject: [PATCH] f2fs: call radix_tree_preload before radix_tree_insert

[f2fs-dev] [PATCH 5/5] f2fs: count the number of inmemory pages

2014-12-06 Thread Jaegeuk Kim
This patch adds counting # of inmemory pages in the page cache. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/debug.c | 3 +++ fs/f2fs/f2fs.h| 3 ++- fs/f2fs/segment.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index

[f2fs-dev] [PATCH 2/5] f2fs: count inline_xx in do_read_inode

2014-12-06 Thread Jaegeuk Kim
In do_read_inode, if we failed __recover_inline_status, the inode has inline flag without increasing its count. Later, f2fs_evict_inode will decrease the count, which causes -1. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inode.c | 6 -- 1 file changed, 4 insertions(+), 2

[f2fs-dev] [PATCH 4/5] f2fs: release inmemory pages when the file was closed

2014-12-06 Thread Jaegeuk Kim
If file is closed, let's drop inmemory pages. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 146e58a..b6f3fbf 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -901,6 +901,14

[f2fs-dev] [PATCH 3/5] f2fs: set page private for inmemory pages for truncation

2014-12-06 Thread Jaegeuk Kim
The inmemory pages should be handled by invalidate_page since it needs to be released int the truncation path. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index c79d67e..3ebcf96

[f2fs-dev] [PATCH 1/5] f2fs: do retry operations with cond_resched

2014-12-06 Thread Jaegeuk Kim
This patch revists retrial paths in f2fs. The basic idea is to use cond_resched instead of retrying from the very early stage. Suggested-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h| 7 +++ fs/f2fs/gc.c | 5 ++--- fs/f2fs

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

2014-12-08 Thread Jaegeuk Kim
Hi, On Mon, Dec 08, 2014 at 03:29:42PM +0900, Changman Lee wrote: In case of checkpoint is called at fsync, we should clear track info. Otherwise, remained track info may influence to inode flag next eviction. In do_checkpoint, release_dirty_inode() already removed UPDATE|APPEND_INO. So,

Re: [f2fs-dev] [PATCH 3/4] f2fs: readahead contiguous current summary blocks in checkpoint

2014-12-08 Thread Jaegeuk Kim
Hi Chao, On Mon, Dec 08, 2014 at 03:01:16PM +0800, Chao Yu wrote: Let's add readahead code for reading contiguous compact/normal summary blocks in checkpoint, then we will gain better performance in mount procedure. Signed-off-by: Chao Yu chao2...@samsung.com --- fs/f2fs/checkpoint.c | 2

[f2fs-dev] [GIT PULL] f2fs updates for v3.19

2014-12-09 Thread Jaegeuk Kim
current_sit_addr to replace the open code Jaegeuk Kim (56): f2fs: do not make dirty any inmemory pages f2fs: invalidate inmemory page f2fs: should truncate any allocated block for inline_data write f2fs: fix race conditon on truncation with inline_data f2fs: use

[f2fs-dev] [PATCH 4/7] f2fs: change atomic and volatile write policies

2014-12-14 Thread Jaegeuk Kim
. In order to avoid huge memory consumption which causes OOM, this patch changes volatile writes to use normal dirty pages, instead blocked flushing to the disk as long as system does not suffer from memory pressure. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c| 9

<    1   2   3   4   5   6   7   8   9   10   >