[PATCH 2/2] f2fs: fix a deadlock during init_acl procedure

2013-10-27 Thread Jaegeuk Kim
curs a deadlock at update_inode_page(). So, likewise f2fs_init_security(), this patch adds a parameter to transfer the locked inode page to f2fs_setxattr(). Found by Linux File System Verification project (linuxtesting.org). Reported-by: Alexey Khoroshilov Signed-off-by: Jaegeuk Kim ---

[PATCH 1/2] f2fs: clean up acl flow for better readability

2013-10-27 Thread Jaegeuk Kim
This patch cleans up a couple of acl codes. Signed-off-by: Jaegeuk Kim --- fs/f2fs/acl.c | 25 + fs/f2fs/acl.h | 6 +++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index b7826ec..f1a6975 100644 --- a/fs/f2fs/acl.c

Re: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-28 Thread Jaegeuk Kim
te_node(dn); @@ -662,9 +661,10 @@ static int truncate_partial_nodes(struct dnode_of_data *dn, f2fs_put_page(pages[idx], 1); } offset[idx]++; - offset[depth - 1] = 0; + offset[idx + 1] = 0; + idx--; fail: - for (i = depth - 3; i >= 0; i--) +

Re: [f2fs-dev] [PATCH] f2fs: change the method of calculating the number summary blocks

2013-10-28 Thread Jaegeuk Kim
; > + if (valid_sum_count <= sum_in_page) > return 1; > - else if (total_size_bytes < 2 * sum_space) > + else if (valid_sum_count-sum_in_page <= > + (PAGE_CACHE_SIZE-SUM_FOOTER_SIZE)/SUMMARY_SIZE) ditto. > return 2; > return 3; >

Re: [f2fs-dev 3/5] f2fs: Add a new function: f2fs_reserve_block()

2013-10-28 Thread Jaegeuk Kim
2013-10-28 (월), 21:16 +0900, Jaegeuk Kim: Hi, > > 2013-10-26 (토), 00:01 +0800, Huajun Li: > > From: Huajun Li > > > > Add the function f2fs_reserve_block() to easily reserve new blocks. > > > > Signed-off-by: Huajun Li > > Signed-off-by:

Re: [f2fs-dev 4/5] f2fs: Key functions to handle inline data

2013-10-28 Thread Jaegeuk Kim
(struct f2fs_inode *)page_address(ipage)); > + set_page_dirty(ipage); > + > + if ((F2FS_I(inode)->i_xattr_nid && inode->i_blocks == 2) || > + (!F2FS_I(inode)->i_xattr_nid && inode->i_blocks == 1)) { > + f2fs_put_dnode(&

Re: [f2fs-dev 5/5] f2fs: Handle inline data operations

2013-10-28 Thread Jaegeuk Kim
ClearPageDirty(page); Don't need to call ClearPageDirty(page). > + f2fs_unlock_op(sbi); > + goto out; > + } else { > + err = do_write_data_page(page); > + } > f2fs_unlock_op(sbi); &

Re: [f2fs-dev 3/5] f2fs: Add a new function: f2fs_reserve_block()

2013-10-28 Thread Jaegeuk Kim
Hi Huajun, 2013-10-29 (화), 00:53 +0800, Huajun Li: > Hi Jaegeuk, > > Thanks for your kindly review and comments. > > On Mon, Oct 28, 2013 at 8:28 PM, Jaegeuk Kim wrote: > > 2013-10-28 (월), 21:16 +0900, Jaegeuk Kim: > > Hi, > > > >> > >>

Re: [f2fs-dev 4/5] f2fs: Key functions to handle inline data

2013-10-28 Thread Jaegeuk Kim
Hi, 2013-10-29 (화), 01:20 +0800, Huajun Li: > On Mon, Oct 28, 2013 at 8:43 PM, Jaegeuk Kim wrote: > > Hi, > > > > 2013-10-26 (토), 00:01 +0800, Huajun Li: > >> From: Huajun Li > >> > >> Functions to implement inline data read/write, and move inli

[PATCH 1/2] f2fs: introduce CONFIG_F2FS_CHECK_FS for BUG_ON control

2013-10-28 Thread Jaegeuk Kim
This config will support an option to remove so many BUG_ONs that degrade the performance potentially. Signed-off-by: Jaegeuk Kim --- fs/f2fs/Kconfig | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig index e06e099..214fe10 100644 --- a/fs/f2fs/Kconfig

[PATCH 2/2] f2fs: add an option to avoid unnecessary BUG_ONs

2013-10-28 Thread Jaegeuk Kim
If you want to remove unnecessary BUG_ONs, you can just turn off F2FS_CHECK_FS in your kernel config. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 10 +- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c| 2 +- fs/f2fs/f2fs.h | 22 ++ fs/f2fs

RE: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-29 Thread Jaegeuk Kim
pages[i])) { > - depth = i + 1; > err = PTR_ERR(pages[i]); > + idx = i--; You meant (idx = i - 1)? If so, idx = i--; is wrong. -- Jaegeuk Kim Samsung -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

[PATCH] f2fs: avoid to wait all the node blocks during fsync

2013-10-31 Thread Jaegeuk Kim
Previously, f2fs_sync_file() waits for all the node blocks to be written. But, we don't need to do that, but wait only the inode-related node blocks. This patch adds wait_on_node_pages_writeback() in which waits inode-related node blocks that are on writeback. Signed-off-by: Jaegeuk Kim --

[PATCH] f2fs: update f2fs document

2013-10-31 Thread Jaegeuk Kim
This patch describes the inline_xattr support in f2fs document. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 4c647c2..a3fe811 100644 --- a

RE: [f2fs-dev] [PATCH] f2fs: remove the own bi_private allocation

2013-12-02 Thread Jaegeuk Kim
2013-12-02 (월), 14:14 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Saturday, November 30, 2013 9:48 AM > > Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; > > li

RE: [f2fs-dev] [PATCH] f2fs: refactor bio-related operations

2013-12-02 Thread Jaegeuk Kim
Hi, 2013-12-02 (월), 12:47 +0800, Chao Yu: > Hi, > > Some comments as following. > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Saturday, November 30, 2013 2:26 PM > > Cc: linux-fsde...@vger.kernel.org; linu

Re: [PATCH v2] f2fs: refactor bio-related operations

2013-12-02 Thread Jaegeuk Kim
Change log from v1: o remove redundant codes >From a480dfc915490f4bca7275f6fbb44fa34aa00eaa Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Sat, 30 Nov 2013 12:51:14 +0900 Subject: [PATCH] f2fs: refactor bio-related operations Cc: linux-fsde...@vger.kernel.org, linux-kernel@vger.kernel.

RE: [f2fs-dev] [PATCH] f2fs: remove the own bi_private allocation

2013-12-03 Thread Jaegeuk Kim
It causes NULL pointer error without f2fs_bug_on(), so I don't think we need to add this. Thanks, 2013-12-02 (월), 16:59 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Monday, December 02,

RE: [f2fs-dev] [PATCH v2] f2fs: refactor bio-related operations

2013-12-04 Thread Jaegeuk Kim
> > + if (type == META_FLUSH) { > > + DECLARE_COMPLETION_ONSTACK(wait); > > + io->bio->bi_private = &wait; > > + submit_bio(rw, io->bio); > > + wait_for_completion(&wait); > > + } else { > > +

[PATCH] f2fs: introduce a new direct_IO write path

2013-12-16 Thread Jaegeuk Kim
give the block addresses to blockdev This policy induces that: - new allocated data are sequentially written to the disk - updated data are randomly written to the disk. - f2fs gives consistency on its file meta, not file data. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c

[PATCH] f2fs: write dirty meta pages collectively

2013-12-17 Thread Jaegeuk Kim
This patch enhances writing dirty meta pages collectively in background. During the file data writes, it'd better avoid to write small dirty meta pages frequently. So let's give a chance to collect a number of dirty meta pages for a while. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkp

[PATCH 1/3] f2fs: clean up long variable names

2014-04-22 Thread Jaegeuk Kim
This patch includes simple clean-ups to reduce unnecessary long variable names. Signed-off-by: Jaegeuk Kim --- fs/f2fs/xattr.c | 86 + fs/f2fs/xattr.h | 6 ++-- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/fs/f2fs

[PATCH 3/3] f2fs: return errors right after checking them

2014-04-22 Thread Jaegeuk Kim
This patch adds two error conditions early in the setxattr operations. Signed-off-by: Jaegeuk Kim --- fs/f2fs/xattr.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index bbe9c2b..6073f9f 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs

[PATCH 2/3] f2fs: pass flags field to setxattr functions

2014-04-22 Thread Jaegeuk Kim
This patch passes the "flags" field to the low level setxattr functions to use XATTR_REPLACE in the following patches. Signed-off-by: Jaegeuk Kim --- fs/f2fs/acl.c | 2 +- fs/f2fs/xattr.c | 13 +++-- fs/f2fs/xattr.h | 4 ++-- 3 files changed, 10 insertions(+), 9 deletion

Re: f2fs causes system stall

2014-04-23 Thread Jaegeuk Kim
> fix not to write data pages on the page reclaiming path" somehow causes high > kernel latencies which may interrupt/disturb the command stream to the gpu in > this particular case. Reverting this commit fixes the problem. Any hints? > > Regards, > > Marc > -- J

Re: f2fs causes system stall

2014-04-24 Thread Jaegeuk Kim
); if (need_balance_fs) f2fs_balance_fs(sbi); + if (wbc->for_reclaim) + f2fs_submit_merged_bio(sbi, DATA, WRITE); return 0; redirty_out: -- 1.8.4.474.g128a96c -- Jaegeuk Kim Samsung -- To unsubscribe from this list: send the line "unsubscri

[BUG] kmemleak on __radix_tree_preload

2014-04-24 Thread Jaegeuk Kim
_file_aio_write+0x60/0xe0 [] do_sync_write+0x5a/0x90 [] vfs_write+0xc5/0x1f0 [] SyS_write+0x52/0xb0 [] system_call_fastpath+0x16/0x1b [] 0xffffffffffff -- Jaegeuk Kim Samsung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

[PATCH] f2fs-tools: announce dual licenses with GPL and LGPL v2

2014-04-24 Thread Jaegeuk Kim
This patch announces LGPL v2 for the following files. - include/f2fs_fs.h - lib/libf2fs.c - lib/libf2fs_io.c - mkfs/f2fs_format.c - mkfs/f2fs_format_main.c - mkfs/f2fs_format_utils.c - mkfs/f2fs_format_utils.h Signed-off-by: Jaegeuk Kim --- COPYING | 492

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

2014-07-29 Thread Jaegeuk Kim
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-place-updates only when fdatasync is requested. > > If we adopt this in-place-updates for

Re: [f2fs-dev] [PATCH 01/11] f2fs: add nobarrier mount option

2014-07-29 Thread Jaegeuk Kim
Hi Chao, On Tue, Jul 29, 2014 at 07:28:16PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, July 26, 2014 6:47 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

Re: [f2fs-dev] [PATCH 04/11] f2fs: use radix_tree for ino management

2014-07-29 Thread Jaegeuk Kim
Got it. Fixed that. Thanks, On Tue, Jul 29, 2014 at 07:32:08PM +0800, Chao Yu wrote: > Hi, > > One comment as following. > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, July 26, 2014 6:47 AM > > To: linu

Re: [f2fs-dev] [PATCH 06/11] f2fs: skip unnecessary data writes during fsync

2014-07-29 Thread Jaegeuk Kim
On Tue, Jul 29, 2014 at 07:39:45PM +0800, Chao Yu wrote: > Hi, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, July 26, 2014 6:47 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

Re: [f2fs-dev] [PATCH 10/11] f2fs: avoid checkpoint when error was occurred

2014-07-29 Thread Jaegeuk Kim
Hi Chao, On Tue, Jul 29, 2014 at 07:41:35PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, July 26, 2014 6:47 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

Re: [PATCH v2 11/11] f2fs: avoid retrying wrong recovery routine when error was occurred

2014-07-29 Thread Jaegeuk Kim
Change log from v1: o adjust need_writecp condition, pointed by Chao >From 387830bd09845dce83bf277bf8416c986c108eb7 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 25 Jul 2014 15:47:25 -0700 Subject: [PATCH] f2fs: avoid retrying wrong recovery routine when error was occurred This pa

[PATCH] f2fs: add tracepoint for f2fs_issue_flush

2014-07-29 Thread Jaegeuk Kim
This patch adds a tracepoint for f2fs_issue_flush. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 3 +++ include/trace/events/f2fs.h | 24 2 files changed, 27 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index e016b97..5a53a0a 100644

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

2014-07-29 Thread Jaegeuk Kim
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 +0900, Changman Lee wrote: > > > Hi Jaegeuk, > > > > > > On Fr

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

2014-07-29 Thread Jaegeuk Kim
On Wed, Jul 30, 2014 at 10:56:31AM +0900, Changman Lee wrote: > 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

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

2014-07-29 Thread Jaegeuk Kim
On Wed, Jul 30, 2014 at 10:45:38AM +0800, Chao Yu wrote: > Hi Jaegeuk Changman, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, July 30, 2014 9:08 AM > > To: Changman Lee > > Cc: linux-fsde...@vger.kern

Re: [f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely

2014-07-29 Thread Jaegeuk Kim
On Wed, Jul 30, 2014 at 09:44:43AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, July 26, 2014 6:47 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

[PATCH] f2fs: fix coding style

2014-07-30 Thread Jaegeuk Kim
This patch fixes wrong coding style. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 14b9f74..80c7869 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -781,7

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

2014-07-30 Thread Jaegeuk Kim
On Thu, Jul 31, 2014 at 01:31:46PM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Thursday, July 31, 2014 10:07 AM > > To: Chao Yu > > Cc: 'Jaegeuk Kim'; li

Re: [PATCH 09/10] f2fs: use MAX_BIO_BLOCKS(sbi)

2014-09-17 Thread Jaegeuk Kim
Hi, Thank you for the review. I changed the return value of MAX_BIO_BLOCKS to int. IMO, it's the best way that I can do for now. Thanks, >From f3bcd1d658d1c4aa8178ddc2d4e6a7e45d8405cd Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 11 Sep 2014 14:37:35 -0700 Subject: [PATCH] f

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

2014-09-17 Thread Jaegeuk Kim
; > 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 > > only starts to try in-place-updates. > > And, if the number of dirty pages is over /sys/fs/f2fs/

Re: [PATCH] f2fs: Fix recover when nid of non-inode dnode < nid of inode

2014-09-17 Thread Jaegeuk Kim
On Mon, Sep 15, 2014 at 01:14:09PM +0800, Huang Ying wrote: > On Sun, 2014-09-14 at 00:48 -0700, Jaegeuk Kim wrote: > > On Sat, Sep 13, 2014 at 10:23:18PM +0800, Huang Ying wrote: > > > On Fri, 2014-09-12 at 15:34 +0800, Huang Ying wrote: > > > > On Thu, 2014-09-

[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 --- fs/f2fs/node.c | 13 +++-- fs/f2fs/node.h | 28 2 files changed, 31 insertions(+), 10 deletions

[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 Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 3 --- fs/f2fs/f2fs.h | 6 +++--- fs/f2fs/file.c | 10 ++ fs/f2fs/node.c

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

2014-09-17 Thread Jaegeuk Kim
to next to find inode(DF). 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 Signed-off-by: Jaegeuk Kim ---

[PATCH 2/3] f2fs: change the ipu_policy option to enable combinations

2014-09-17 Thread Jaegeuk Kim
This patch changes the ipu_policy setting to use any combination of orthogonal policies. Signed-off-by: Changman Lee Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 6 +++--- fs/f2fs/segment.c | 2 +- fs/f2fs/segment.h | 39

[PATCH 3/3] f2fs: use more free segments until SSR is activated

2014-09-17 Thread Jaegeuk Kim
all. This patch fixes that by allowing LFS allocations until the # of free segments reaches to the last threshold, reserved space. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index

[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 --- fs/f2fs/data.c | 8 1 file changed, 8

[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 --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [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 wrote: > > > We can summarize the roll forward recovery scenarios as follows. > > > > [Term] F: fsync_mark, D: dentry_mark > > > > 1. inode(x) | CP | i

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

[PATCH] f2fs: avoid f2fs_balance_fs call during pageout

2014-01-16 Thread Jaegeuk Kim
it should not call f2fs_balance_fs which tries to get a mutex grabbed by original syscall flow. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 19ad066..e57bde0 100644 --- a/fs/f2fs/data

[PATCH 1/2] f2fs: call mark_inode_dirty to flush dirty pages

2014-01-21 Thread Jaegeuk Kim
If a dentry page is updated, we should call mark_inode_dirty to add the inode into the dirty list, so that its dentry pages are flushed to the disk. Otherwise, the inode can be evicted without flush. Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 2/2] f2fs: move a branch for code redability

2014-01-21 Thread Jaegeuk Kim
This patch moves a function in f2fs_delete_entry for code readability. Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 1679e8b..2d5c657 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c

[PATCH] f2fs: introduce NODE_MAPPING for code consistency

2014-01-21 Thread Jaegeuk Kim
This patch adds NODE_MAPPING which is similar as META_MAPPING introduced by Gu Zheng. Cc: Gu Zheng Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/debug.c | 4 ++-- fs/f2fs/f2fs.h | 5 + fs/f2fs/node.c | 50

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-kernel@vger.kernel.org; linux-fsde...@vger

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-kernel@vger.kernel.org; >

[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 --- fs/f2fs/checkpoint.c| 16 fs/f2fs/f2fs.h | 11 ++- fs/f2fs/gc.c

[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 --- fs/f2fs/f2fs.h | 13 +-- fs/f2fs/node.c | 299 + fs/f2fs/node.h | 9 +- 3 files changed, 162 insertions(+), 159 deletions(-) diff

[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 --- fs/f2fs/checkpoint.c| 4 +- fs/f2fs/f2fs.h | 9 +++- fs/f2fs/file.c | 29

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-kernel@vger.kernel.org; linux-fsde...@vg

[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 --- fs/f2fs/f2fs.h | 1 + fs/f2fs/inode.c | 23

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

2014-09-25 Thread Jaegeuk Kim
TAL_SEGS ---' | | 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 --- fs/

[PATCH 3/4] f2fs: clean up f2fs_ioctl functions

2014-09-25 Thread Jaegeuk Kim
This patch cleans up f2fs_ioctl functions for better readability. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 168 ++--- 1 file changed, 90 insertions(+), 78 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d7528c4..d203668

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

2014-09-25 Thread Jaegeuk Kim
shown all or nothing by f2fs recovery procedure. Signed-off-by: Jaegeuk Kim --- 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/segment.c

Re: [PATCH] f2fs: Fix recover when nid of non-inode dnode < nid of inode

2014-09-10 Thread Jaegeuk Kim
On Wed, Sep 10, 2014 at 07:08:32PM +0800, huang ying wrote: > On Wed, Sep 10, 2014 at 3:21 PM, Jaegeuk Kim wrote: > > > On Tue, Sep 09, 2014 at 07:31:49PM +0800, huang ying wrote: > > > On Tue, Sep 9, 2014 at 3:09 PM, Jaegeuk Kim wrote: > > > > > > > H

Re: [PATCH] f2fs: Fix recover when nid of non-inode dnode < nid of inode

2014-09-11 Thread Jaegeuk Kim
On Thu, Sep 11, 2014 at 08:25:17PM +0800, Huang Ying wrote: > > On Wed, 2014-09-10 at 22:37 -0700, Jaegeuk Kim wrote: > > On Wed, Sep 10, 2014 at 07:08:32PM +0800, huang ying wrote: > > > On Wed, Sep 10, 2014 at 3:21 PM, Jaegeuk Kim wrote: > > > > > > >

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

2014-09-29 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 --- fs/f2fs/data.c| 6 +++- fs/f2fs/f2fs.h| 25 +++-- fs/f2fs/file.c| 55 fs/f2fs/inode.c

Re: [PATCH] f2fs: Fix recover when nid of non-inode dnode < nid of inode

2014-09-14 Thread Jaegeuk Kim
On Fri, Sep 12, 2014 at 03:34:48PM +0800, Huang Ying wrote: > On Thu, 2014-09-11 at 22:13 -0700, Jaegeuk Kim wrote: > > On Thu, Sep 11, 2014 at 08:25:17PM +0800, Huang Ying wrote: > > > > > > On Wed, 2014-09-10 at 22:37 -0700, Jaegeuk Kim wrote: > > > > O

Re: [PATCH] f2fs: Fix recover when nid of non-inode dnode < nid of inode

2014-09-14 Thread Jaegeuk Kim
On Sat, Sep 13, 2014 at 10:23:18PM +0800, Huang Ying wrote: > On Fri, 2014-09-12 at 15:34 +0800, Huang Ying wrote: > > On Thu, 2014-09-11 at 22:13 -0700, Jaegeuk Kim wrote: > > > On Thu, Sep 11, 2014 at 08:25:17PM +0800, Huang Ying wrote: > > > > > > > >

[PATCH 01/10] f2fs: fix negative value for lseek offset

2014-09-14 Thread Jaegeuk Kim
. Reported-by: Tommi Rentala [Jaegeuk Kim: relocate the condition as suggested by Chao] Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 9f0ea3d..5cde363 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c

[PATCH 02/10] f2fs: remove lengthy inode->i_ino

2014-09-14 Thread Jaegeuk Kim
This patch is to remove lengthy name by adding a new variable. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5cde363..77426c7 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs

[PATCH 06/10] f2fs: do not skip latest inode information

2014-09-14 Thread Jaegeuk Kim
In f2fs_sync_file, if there is no written appended writes, it skips to write its node blocks. But, if there is up-to-date inode page, we should write it to update its metadata during the roll-forward recovery. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 11 ++- 1 file changed, 10

[PATCH 10/10] f2fs: fix double lock for inode page during roll-foward recovery

2014-09-14 Thread Jaegeuk Kim
ta should grab inode #4. 6. detect *kernel hang* This patch should resolve that bug. Signed-off-by: Jaegeuk Kim --- fs/f2fs/recovery.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index dbeb32d..5638c05 1

[PATCH 09/10] f2fs: use MAX_BIO_BLOCKS(sbi)

2014-09-14 Thread Jaegeuk Kim
This patch cleans up a simple macro. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 +- fs/f2fs/node.c | 2 +- fs/f2fs/recovery.c | 4 ++-- fs/f2fs/segment.c | 2 +- fs/f2fs/segment.h | 8 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/data.c b/fs

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

2014-09-14 Thread Jaegeuk Kim
Previously, all the dnode pages should be read during the roll-forward recovery. Even worsely, whole the chain was traversed twice. This patch removes that redundant and costly read operations by using page cache of meta_inode and readahead function as well. Signed-off-by: Jaegeuk Kim --- fs

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

2014-09-14 Thread Jaegeuk Kim
If same data is updated multiple times, we don't need to redo whole the operations. Let's just update the lastest one. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 4 +++- fs/f2fs/recovery.c | 41 + 2 files changed, 20 insertions(+), 25

[PATCH 05/10] f2fs: fix roll-forward missing scenarios

2014-09-14 Thread Jaegeuk Kim
to next to find inode(DF). 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: Jaegeuk Kim --- fs/f2fs/file.c | 20

[PATCH 03/10] f2fs: expand counting dirty pages in the inode page cache

2014-09-14 Thread Jaegeuk Kim
Previously f2fs only counts dirty dentry pages, but there is no reason not to expand the scope. This patch changes the names on the management of dirty pages and to count dirty pages in each inode info as well. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 10 ++ fs/f2fs/data.c

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

2014-09-14 Thread Jaegeuk Kim
high random write performance. For example, it can be used when, Seq. writes (Data) + wait + Seq. writes (Node) is pretty much slower than, Rand. writes (Data) Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 7 +++ Documentation/filesystems/f2fs.txt | 9

Re: [f2fs-dev] [PATCH 1/5] f2fs: update start nid only once each circle

2014-03-09 Thread Jaegeuk Kim
y works. > >> Faster operations. Version large binaries. Built-in WAN optimization and > >> the > >> freedom to use Git, Perforce or both. Make the move to Perforce. > >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > >>

Re: [PATCH 4/5] f2fs: optimize restore_node_summary slightly

2014-03-09 Thread Jaegeuk Kim
ment.c > +++ b/fs/f2fs/segment.c > @@ -1160,9 +1160,12 @@ static int read_normal_summaries(struct f2fs_sb_info > *sbi, int type) > ns->ofs_in_node = 0; > } > } else { > - if (restore_

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

2014-03-09 Thread Jaegeuk Kim
s(sbi); > mutex_unlock(&nm_i->build_lock); > + wake_up_all(&nm_i->build_wq); > goto retry; > } > > @@ -1813,6 +1820,7 @@ static int init_node_manager(struct f2fs_sb_info *sbi) > INIT_LIST_HEAD(&nm_i->dirty_nat_entries); > > mutex_ini

RE: [f2fs-dev] [PATCH 4/5] f2fs: optimize restore_node_summary slightly

2014-03-09 Thread Jaegeuk Kim
Hi, 2014-03-10 (월), 13:13 +0800, Chao Yu: > Hi Gu, Kim: > > One more comment. > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Monday, March 10, 2014 12:46 PM > > To: Gu Zheng > > Cc: linux-kernel; f

[PATCH 1/2] f2fs: return i_size if the hole is outside of i_size

2014-04-28 Thread Jaegeuk Kim
When SEEK_HOLE is requeted, it should return i_size if the hole position is found outside of i_size. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d99d173..3112857 100644 --- a/fs/f2fs

[PATCH 2/2] f2fs: consider fallocated space for SEEK_DATA

2014-04-28 Thread Jaegeuk Kim
. N 2) write 4KB at 5MB offset f -> N N N N N X N N N N N N ... N 3) SEEK_DATA from 0 should return 5MB offset So, this patch adds a routine to search the first dirty page to handle that. Then, the SEEK_DATA flow skips NEW_ADDR offsets until any dirty page is found. Signed-off-by: Jaege

Re: [f2fs-dev][PATCH 3/3 v3] f2fs: fix to truncate inline data in inode page when setattr

2014-04-28 Thread Jaegeuk Kim
ny bugs in there? > + zero_user_segment(ipage, INLINE_DATA_OFFSET + from, > + INLINE_DATA_OFFSET + MAX_INLINE_DATA); > + set_page_dirty(ipage); > + f2fs_put_page(ipage, 1); > +} > + > int recover_inline_data(struct inode *inode, struct page *np

RE: [f2fs-dev][PATCH 3/3 v3] f2fs: fix to truncate inline data in inode page when setattr

2014-04-29 Thread Jaegeuk Kim
Hi, 2014-04-29 (화), 15:53 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Tuesday, April 29, 2014 2:16 PM > > To: Chao Yu > > Cc: linux-f2fs-de...@lists.sourceforge.net; linux-fsde.

Re: [f2fs-dev] f2fs: f2fs unmount hangs if f2fs_init_acl() fails during mkdir syscall

2014-02-13 Thread Jaegeuk Kim
changed by make_bad_inode(). Agreed. I'll update the patch with this. Thanks, -- Jaegeuk Kim Samsung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [f2fs-dev] f2fs: f2fs unmount hangs if f2fs_init_acl() fails during mkdir syscall

2014-02-13 Thread Jaegeuk Kim
i have tested that case. Fail in init_inode_metadata has been > > processed correctly. Thanks. > > If no other regressions, maybe you can send out the fix patch about this > issue.:) The original patch can treat this too. Thank you. :) > > Thanks, > Gu >

[PATCH 4/4] f2fs: decrease the lock granularity during write_begin

2014-04-29 Thread Jaegeuk Kim
This patch reduces the lock granularity during write_begin. When the system is under memory pressure, it would be better to reduce the locking time for the data pages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH 3/4] f2fs: no need to wait on page writebck to meta pages

2014-04-29 Thread Jaegeuk Kim
This patch removes grab_cache_page_write_begin for meta pages. Signed-off-by: Jaegeuk Kim --- 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 1346ce9..b6f6ead 100644 --- a/fs/f2fs/checkpoint.c +++ b

[PATCH 1/4] f2fs: split grab_cache_page and wait_on_page_writeback for node pages

2014-04-29 Thread Jaegeuk Kim
This patch splits grab_cache_page_write_begin into grab_cache_page and wait_on_page_writeback for node pages. This patch intends to enhance the latency to get node pages by alleviating unnecessary wait_on_page_writeback. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c

[PATCH 2/4] f2fs: avoid grab_cache_page_write_begin for data pages

2014-04-29 Thread Jaegeuk Kim
We don't need to wait on page writeback for these cases. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 ++-- fs/f2fs/inline.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 273fe16..91ff104 100644

[PATCH] f2fs: deactivate inode page if the inode is evicted

2014-04-29 Thread Jaegeuk Kim
If the inode page is clean during its inode eviction, it'd better drop the page to reduce further memory pressure. Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index f7a6553..adc622c 100644 --- a/fs

Re: [BUG] kmemleak on __radix_tree_preload

2014-05-08 Thread Jaegeuk Kim
2014-05-08 (목), 10:26 +0100, Catalin Marinas: > On Thu, May 08, 2014 at 06:16:51PM +0900, Jaegeuk Kim wrote: > > 2014-05-07 (수), 12:39 +0100, Catalin Marinas: > > > On Wed, May 07, 2014 at 03:58:08AM +0100, Jaegeuk Kim wrote: > > > > unreferenced objec

Re: [BUG] kmemleak on __radix_tree_preload

2014-05-08 Thread Jaegeuk Kim
2014-05-08 (목), 16:29 +0100, Catalin Marinas: > On Thu, May 08, 2014 at 04:00:27PM +0100, Paul E. McKenney wrote: > > On Thu, May 08, 2014 at 11:24:36AM +0100, Catalin Marinas wrote: > > > On Thu, May 08, 2014 at 10:37:40AM +0100, Jaegeuk Kim wrote: > > > > 2014-0

Re: [BUG] kmemleak on __radix_tree_preload

2014-05-08 Thread Jaegeuk Kim
ou anything -- I have seen cases > > where the kmem debugging obscures the debug-objects diagnostics. > > Another test Jaegeuk could run (hopefully he has some time to look into > this). Yap, I'll test this too. Thanks, > > Thanks for suggestions. > -- Jaegeuk Kim S

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