Re: [f2fs-dev] write performance difference 3.18.21/4.2.1

2015-09-25 Thread Jaegeuk Kim
On Fri, Sep 25, 2015 at 05:47:12PM +0800, Chao Yu wrote: > Hi Marc Jaegeuk, > > > -Original Message- > > From: Marc Lehmann [mailto:schm...@schmorp.de] > > Sent: Friday, September 25, 2015 2:51 PM > > To: Jaegeuk Kim > > Cc: linux-f2fs-devel@lists.so

Re: [f2fs-dev] sync/umount hang on 3.18.21, 1.4TB gone after crash

2015-09-25 Thread Jaegeuk Kim
Hi Chao, [snip] > > It seems there was no fsync after sync at all. That's why f2fs recovered > > back to > > the latest checkpoint. Anyway, I'm thinking that it's worth to add a kind of > > periodic checkpoints. > > Agree, I have that in my mind for long time, since Yunlei said that they > may

Re: [f2fs-dev] sync/umount hang on 3.18.21, 1.4TB gone after crash

2015-09-25 Thread Jaegeuk Kim
On Fri, Sep 25, 2015 at 08:00:19AM +0200, Marc Lehmann wrote: > On Thu, Sep 24, 2015 at 11:50:23AM -0700, Jaegeuk Kim <jaeg...@kernel.org> > wrote: > > > When I came back after ~10 hours, I found a number of hung task messages > > > in syslog, and when I entere

Re: [f2fs-dev] SMR drive test 2; 128GB partition; no obvious corruption, much more sane behaviour, weird overprovisioning

2015-09-25 Thread Jaegeuk Kim
On Fri, Sep 25, 2015 at 07:42:25AM +0200, Marc Lehmann wrote: > On Thu, Sep 24, 2015 at 10:27:49AM -0700, Jaegeuk Kim <jaeg...@kernel.org> > wrote: > > > In the end, I might settle with -s64, and currently do tests with -s90. > > > > Got it. But why -s90? :)

Re: [f2fs-dev] [PATCH v2] f2fs: fix to correct freed section number during gc

2015-09-25 Thread Jaegeuk Kim
On Fri, Sep 25, 2015 at 05:50:55PM +0800, Chao Yu wrote: > This patch fixes to maintain the right section count freed in garbage > collecting when triggering a foreground gc. > > Besides, when a foreground gc is running on current selected section, once > we fail to gc one segment, it's better to

Re: [f2fs-dev] f2fs: reorganize f2fs_map_blocks

2015-09-21 Thread Jaegeuk Kim
Hi Dan, New patch was already introduced before. :) I'm too lazy to rebase that patch. Sorry for the confusion. Thanks, On Mon, Sep 21, 2015 at 07:25:08PM +0300, Dan Carpenter wrote: > Hello Chao Yu, > > The patch bce86a6c64a7: "f2fs: reorganize f2fs_map_blocks" from Sep > 11, 2015, leads to

Re: [f2fs-dev] Possible Bug in move_encrypted_block

2015-09-21 Thread Jaegeuk Kim
Hi, On Sat, Sep 19, 2015 at 01:36:08PM -0400, nick wrote: > Greetings Jaeguek and others. > Below are the lines fora possible bug in move_encrypted_block: > err = get_dnode_of_data(, bidx, LOOKUP_NODE); > if (err) > goto out; > Also calls of get_dnode_of_data need to hold

Re: [f2fs-dev] [PATCH RESEND] f2fs:Fix error handling for calls to the function add_free_nid in the file node.c

2015-09-21 Thread Jaegeuk Kim
Hello, On Sat, Sep 19, 2015 at 11:03:47AM -0400, Nicholas Krause wrote: > This fixes error handling for calls to the function add_free_nid > in the functions __flush_nat_entry_set and build_free_nids to > properly check if their call to this particular function return > a error code and if so

Re: [f2fs-dev] SMR drive test 2; 128GB partition; no obvious corruption, much more sane behaviour, weird overprovisioning

2015-09-23 Thread Jaegeuk Kim
1 Mon Sep 17 00:00:00 2001 > From: Jaegeuk Kim <jaeg...@kernel.org> > Date: Mon, 10 Aug 2015 15:01:12 -0700 > Subject: [PATCH] f2fs: increase the number of max hard links > > This patch increases the number of maximum hard links for one file. > > Reviewed-by: Chao Yu <

Re: [f2fs-dev] SMR drive test 2; 128GB partition; no obvious corruption, much more sane behaviour, weird overprovisioning

2015-09-23 Thread Jaegeuk Kim
13312 -s128 (ovp:1%)27009 26624 So, I'm convinced that your inital test set "-o1 -s128", which was an unlucky trial. :) Anyway, I've found a bug in the case without -o, which is "-s64" should select other overprovision ratio instead of "1%"

Re: [f2fs-dev] [PATCH RESEND] f2fs:Fix concurrent access issue in the function recover_dentry

2015-09-23 Thread Jaegeuk Kim
On Wed, Sep 23, 2015 at 03:45:50PM -0400, Nicholas Krause wrote: > This fixes a concurrent access in the function recover_dentry by > locking the superblock representation in memory with f2fs_lock_op > before calling the function __f2fs_add_link and unlocking the > superblock afterwards with

Re: [f2fs-dev] [PATCH] f2fs: fix to correct freed section number during gc

2015-09-23 Thread Jaegeuk Kim
Hi Chao, On Wed, Sep 23, 2015 at 06:11:36PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, September 23, 2015 6:54 AM > > To: Chao Yu > > Cc: linux-f2fs-de

Re: [f2fs-dev] [PATCH] back-up raw_super in sbi

2015-12-08 Thread Jaegeuk Kim
Hi Yunlei, On Tue, Dec 08, 2015 at 09:17:13PM +0800, Yunlei He wrote: > write_checkpoint() tries to get cp_blkaddr from superblock buffer, > if the buffer happen to be destroied by something else, it may > bring in unpredictable effect on f2fs. > > this patch fix it by back-up a raw_super copy.

[f2fs-dev] [PATCH 2/2] fsck.f2fs: use get_{sb|cp} and set_{sb|cp} macros

2015-12-02 Thread Jaegeuk Kim
We can use get_cp, set_cp, get_sb, and set_sb in fsck.f2fs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.c | 43 ++--- fsck/mount.c | 204 --- 2 files changed, 116 insertions(+), 131 deletions(-) diff

[f2fs-dev] [PATCH] f2fs-tools: add library version info

2015-12-09 Thread Jaegeuk Kim
/libtool/manual/html_node/Updating-version-info.html#Updating-version-info Cc: Hans-Christoph Steiner <h...@eds.org> Cc: Kai-Chung Yan <seamli...@gmail.com> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- configure.ac | 10 ++ lib/Makefile.am | 1 + mkfs/Makefile.am

Re: [f2fs-dev] [PATCH] f2fs: fix to convert inline inode in ->setattr

2015-12-04 Thread Jaegeuk Kim
Hi Chao, On Tue, Dec 01, 2015 at 11:36:16AM +0800, Chao Yu wrote: > In commit 3c4541452748 ("f2fs: do not trim preallocated blocks when > truncating after i_size"), in order to follow the regulation: "truncate(x) > where x > i_size will not trim all blocks past i_size." like other file > systems,

Re: [f2fs-dev] [PATCH] f2fs: fix to convert inline inode in ->setattr

2015-12-04 Thread Jaegeuk Kim
On Fri, Dec 04, 2015 at 12:55:23PM -0800, Jaegeuk Kim wrote: > Hi Chao, > > On Tue, Dec 01, 2015 at 11:36:16AM +0800, Chao Yu wrote: > > In commit 3c4541452748 ("f2fs: do not trim preallocated blocks when > > truncating after i_size"), in order to follow the regul

[f2fs-dev] [PATCH 2/3] common/config: add mkfs options for f2fs

2015-12-04 Thread Jaegeuk Kim
This patch adds an interface to give mkfs option for f2fs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- common/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/config b/common/config index dca7aad..a534329 100644 --- a/common/config +++ b/common/config @@ -352,6

[f2fs-dev] [PATCH 1/3] common/rc: support f2fs for _scratch_mkfs_sized

2015-12-04 Thread Jaegeuk Kim
The mkfs.f2fs has an option to build a certain sized filesystem by giving the number of sectors. So, this patch adds to use that. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- common/rc | 4 1 file changed, 4 insertions(+) diff --git a/common/rc b/common/rc index 4c2f42c..e

[f2fs-dev] [PATCH 3/3] f2fs/001: introduce a testcaes for -ENOSPC with inline operation

2015-12-04 Thread Jaegeuk Kim
This patch introduces f2fs/001 to test -ENOSPC when inline operation was activated. Inline_data feature is described in: http://lwn.net/Articles/573408/ Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- tests/f2fs/001 | 86 ++

[f2fs-dev] [PATCH] f2fs: do not recover from previous remained wrong dnodes

2015-12-03 Thread Jaegeuk Kim
If device does not support discard, some obsolete dnodes can be recovered by roll-forward. This patch enhances the recovery flow. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/recovery.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-)

[f2fs-dev] [PATCH 1/3] f2fs: enhance the bit operation for SSR

2015-12-07 Thread Jaegeuk Kim
This patch enhances the existing bit operation when f2fs allocates SSR blocks. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/segment.c | 50 -- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/fs/f2fs/segment.

[f2fs-dev] [PATCH 2/3] f2fs: refactor f2fs_commit_super

2015-12-07 Thread Jaegeuk Kim
Previously, f2fs_commit_super hacks the bh->blocknr to write the broken alternate superblock. Instead of it, we should use the correct logic to retrieve its buffer head with locking it appropriately. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/sup

[f2fs-dev] [PATCH 3/3] f2fs: use lock_buffer when changing superblock

2015-12-07 Thread Jaegeuk Kim
When modifying sb contents, we need to use lock its buffer. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a018ed3..a16dfe9 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -

Re: [f2fs-dev] [PATCH 1/3] common/rc: support f2fs for _scratch_mkfs_sized

2015-12-07 Thread Jaegeuk Kim
Hi Chao, On Sat, Dec 05, 2015 at 09:11:31PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > On 12/5/15 6:15 AM, Jaegeuk Kim wrote: > > The mkfs.f2fs has an option to build a certain sized filesystem by giving > > the number of sectors. > > > > So, this patch adds

Re: [f2fs-dev] [PATCH 1/3 v2] common/rc: support f2fs for _scratch_mkfs_sized

2015-12-07 Thread Jaegeuk Kim
Change log from v1: o adjust different sector sizes -- >8 -- >From 5b2c77d3acaf11bac5489ec697c2ec53f261afeb Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Fri, 20 Mar 2015 15:37:10 -0700 Subject: [PATCH] common/rc: support f2fs for _scratch_mkfs_sized The m

[f2fs-dev] [PATCH 6/6] defrag.f2fs: introduce defragmentation tool

2015-12-11 Thread Jaegeuk Kim
[default: main_blkaddr + 2MB] -i set direction as shrink [default: expand] For example, # defrag.f2fs -s 0x100 -l 0x10 -t 0x4000 /dev/sdb1 This will move data blocks between 0x100 and 0x110 to the right side of 0x4000 space. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- auto

[f2fs-dev] [PATCH 4/6] f2fs-tools: export print_raw_sb_info

2015-12-11 Thread Jaegeuk Kim
This patch exports print_raw_sb_info(). Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.h | 2 ++ fsck/mount.c | 6 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fsck/fsck.h b/fsck/fsck.h index 20dfe6b..f6b8c53 100644 --- a/fsck/fsck.h +++ b/fsck/

[f2fs-dev] [PATCH 5/6] fsck.f2fs: LFS alloc_type must have free segment after blkoff

2015-12-11 Thread Jaegeuk Kim
This patch checks alloc_type of current segment type. If it is LFS, the last of segment should have no valid block. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/f2fs.h | 16 ++ fsck/fsck.c | 15 +- fsck/fsck.h | 4 +++ fsck/mount.

[f2fs-dev] [PATCH 3/6] mkfs.f2fs: export get_best_overprovision

2015-12-11 Thread Jaegeuk Kim
This patch exports get_best_overprovision() function. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- include/f2fs_fs.h | 28 mkfs/f2fs_format.c | 30 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/i

[f2fs-dev] [PATCH 1/6] libf2fs: enhance the bit operations

2015-12-11 Thread Jaegeuk Kim
This patch modifies the existing bit operations. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.c | 12 +++ include/f2fs_fs.h | 23 ++-- lib/libf2fs.c | 104 -- 3 files changed, 73 insertions(

[f2fs-dev] [PATCH 2/6] fsck.f2fs: sanity_check for extent_cache entry

2015-12-11 Thread Jaegeuk Kim
This patch adds to check the stored extent_cache entry is consistent or not. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.c | 87 +++-- fsck/fsck.h | 17 +--- fsck/main.c | 2 +- 3 files changed, 82 inse

Re: [f2fs-dev] [PATCH 7/8] f2fs: introduce new option for controlling data flush

2015-12-16 Thread Jaegeuk Kim
On Wed, Dec 16, 2015 at 11:19:06AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, December 16, 2015 10:49 AM > > To: Chao Yu > > Cc: linux-f2fs-devel@lists.sourcefor

Re: [f2fs-dev] [PATCH] f2fs-tools: add library version info

2015-12-15 Thread Jaegeuk Kim
ittle bit complicated and adding the version to SONAME >> will likely cause big or small problems for so many downstream >> projects. >> >> Why don't we simply add the libf2fs_format? That won't hurt anyway. :) >> >> Regards, >> Kai-Chung Yan >> >&g

Re: [f2fs-dev] [PATCH 2/2] f2fs: do more integrity verification for superblock

2015-12-14 Thread Jaegeuk Kim
Hi Chao, I also got superblock failure. It seems that your patch doesn't handle correctly if segment0_blkaddr is not zero. Please see below. On Fri, Dec 11, 2015 at 04:09:23PM +0800, Chao Yu wrote: > Do more sanity check for superblock during ->mount. > > Signed-off-by: Chao Yu

[f2fs-dev] [PATCH] mkfs.f2fs: fix storing volume label correctly in utf16

2015-12-14 Thread Jaegeuk Kim
This patch fixes to store volume label as utf16 correctly. Many conversion codes are copied from exfat-tools. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount.c | 11 include/f2fs_fs.h | 7 ++- lib/libf2fs.c

[f2fs-dev] [PATCH] f2fs: add symbol to avoid any confusion with tools

2015-12-14 Thread Jaegeuk Kim
This patch adds MAX_VOLUME_NAME to sync with f2fs-tools. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- include/linux/f2fs_fs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 25c6324..e59c3be 100644 --- a/i

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

2015-12-14 Thread Jaegeuk Kim
Change log from v3: o add grub_test_bit_le() o fix label handling with utf16 o change some minor concerns -- >8 -- From 4ab813c29851113da04d9ca84670219434ee570e Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 17 Nov 2015 12:45:13 -0800 Subject: [PATCH] F2F

[f2fs-dev] [PATCH 2/2] defrag.f2fs: return error if there is no space

2015-12-17 Thread Jaegeuk Kim
This patch checks whether there is a space or not to allocate new blocks. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index 735ed90..4b38df8

[f2fs-dev] [PATCH 1/2] defrag.f2fs: eliminate unexpected journal entries

2015-12-17 Thread Jaegeuk Kim
When moving data or node blocks, it changes current segment information dynamtically. Meanwhile, its journal entry space is recovered by old stale data. This patch makes sure that its journal space is zeroed out. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/defrag.c | 1 +

Re: [f2fs-dev] [PATCH 1/3] f2fs: backup raw_super in sbi

2015-12-15 Thread Jaegeuk Kim
> > > -Original Message- > > From: Chao Yu [mailto:chao2...@samsung.com] > > Sent: Tuesday, December 15, 2015 5:17 PM > > To: Jaegeuk Kim (jaeg...@kernel.org); Yunlei He (heyun...@huawei.com) > > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-ker...

Re: [f2fs-dev] [PATCH 7/8] f2fs: introduce new option for controlling data flush

2015-12-15 Thread Jaegeuk Kim
Hi, On Tue, Dec 15, 2015 at 01:35:21PM +0800, Chao Yu wrote: > Add a new option 'data_flush' to enable/disable data flush functionality > in checkpoint. > > Signed-off-by: Chao Yu > --- > Documentation/filesystems/f2fs.txt | 2 ++ > fs/f2fs/checkpoint.c | 2

Re: [f2fs-dev] [PATCH 3/3] f2fs: introduce __f2fs_commit_super

2015-12-15 Thread Jaegeuk Kim
Hi Chao, On Tue, Dec 15, 2015 at 05:20:50PM +0800, Chao Yu wrote: > Introduce __f2fs_commit_super to include duplicated codes in > f2fs_commit_super for cleanup. > > Signed-off-by: Chao Yu > --- > fs/f2fs/super.c | 28 +--- > 1 file changed, 13

[f2fs-dev] [PATCH 2/3] lib: fix test_bit_le functions

2015-12-15 Thread Jaegeuk Kim
This patch fixes test_bit_le functions for dentry bit operations. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.c| 12 ++-- include/f2fs_fs.h | 6 +++--- lib/libf2fs.c | 26 ++ mkfs/f2fs_format.c | 3 ++- 4 files chang

[f2fs-dev] [PATCH 1/3] mkfs.f2fs: remove extent_cache entry for parent directory

2015-12-15 Thread Jaegeuk Kim
Currently, directory should not have any extent cache entry. Otherwise, fsck.f2fs will trigger a false-alarmed report. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- mkfs/f2fs_format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfs/f2fs_format.c

[f2fs-dev] [PATCH 3/3] lib: use u8/u32/u64 for bit operations

2015-12-15 Thread Jaegeuk Kim
This cleans up the bit operations. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/fsck.c | 6 ++ include/f2fs_fs.h | 12 +--- lib/libf2fs.c | 19 --- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c

Re: [f2fs-dev] [PATCH 3/3 v2] f2fs: use lock_buffer when changing superblock

2015-12-09 Thread Jaegeuk Kim
Agreed. Change log from v1: o apply for _undo_ flow as well >From ea212a4a7a432e0ecd0f0f53971b70172b3e7f96 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Mon, 7 Dec 2015 10:18:54 -0800 Subject: [PATCH] f2fs: use lock_buffer when changing superblock When mod

Re: [f2fs-dev] [PATCH 5/8] f2fs: support data flush in checkpoint

2015-12-15 Thread Jaegeuk Kim
Hi Chao, On Tue, Dec 15, 2015 at 01:33:18PM +0800, Chao Yu wrote: > Previously, when finishing a checkpoint, we only keep consistency of all fs > meta info including meta inode, node inode, dentry page of directory inode, > so, after a sudden power cut, f2fs can recover from last checkpoint with

Re: [f2fs-dev] [PATCH 8/8] f2fs: fix to avoid deadlock between checkpoint and writepages

2015-12-15 Thread Jaegeuk Kim
Hi Chao, On Tue, Dec 15, 2015 at 01:36:08PM +0800, Chao Yu wrote: > This patch fixes to move f2fs_balance_fs out of sbi->writepages' > coverage to avoid potential ABBA deadlock which was found by lockdep: > > Possible unsafe locking scenario: > > CPU0CPU1 >

[f2fs-dev] [PATCH] defrag.f2fs: fix not to allocate current segment

2015-12-15 Thread Jaegeuk Kim
This patch fixes allocating wrong segment which has zero data but is registered as a current segment. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index d34c704..8

Re: [f2fs-dev] [PATCH 7/8] f2fs: introduce new option for controlling data flush

2015-12-15 Thread Jaegeuk Kim
Hi Chao, On Wed, Dec 16, 2015 at 10:38:27AM +0800, Chao Yu wrote: ... > > > +++ b/fs/f2fs/super.c > > > @@ -67,6 +67,7 @@ enum { > > > Opt_extent_cache, > > > Opt_noextent_cache, > > > Opt_noinline_data, > > > + Opt_data_flush, > > > > Need Opt_nodata_flush too. > > We need this unless

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-03 Thread Jaegeuk Kim
Hello, On Mon, Jan 04, 2016 at 01:57:27PM +0800, Fan Li wrote: > > > > -Original Message- > > From: Chao Yu [mailto:chao2...@samsung.com] > > Sent: Thursday, December 31, 2015 2:34 PM > > To: 'Fan Li'; 'Jaegeuk Kim' > > Cc: linux-f2fs-devel@lists.so

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Jaegeuk Kim
Hi, On Mon, Jan 04, 2016 at 07:13:43PM +0800, Fan Li wrote: > > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Monday, January 04, 2016 2:56 PM > > To: Fan Li > > Cc: 'Chao Yu'; linux-f2fs-devel@lists.sourceforge.ne

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Jaegeuk Kim
Hi, ... > > > > Nope, what I'm talking about is *correctness* of our ->fiemap > > > > interface, but you're trying > > to avoid it by saying "support more > > > cases, > > > > it's an improvement". That doesn't make any sense to me, since > > > > correctness issue still not > > be fixed. > > >

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Jaegeuk Kim
Hi, > > > > > > > > On 12/30/15 5:17 PM, Fan Li wrote: > > > > > > > > > f2fs allows preallocation beyond isize, but f2fs_fiemap > > > > > > > > > only look up extents within isize. Therefore add this support. > > > > > > > > > > > > > > > > > > Note: It's possible that there are holes after

[f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk

2016-01-02 Thread Jaegeuk Kim
After reading a page, we need to check whether there is any error. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 89a978c..11b2111 100644 --- a/fs/f2fs/data.c +++ b/f

Re: [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk

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

Re: [f2fs-dev] [PATCH 2/3] f2fs: cover more area with nat_tree_lock

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

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-05 Thread Jaegeuk Kim
Hi, ... > > > > > > > > Nope, what I'm talking about is *correctness* of our > > > > > > > > ->fiemap interface, but you're trying to avoid it by saying > > > > > > > > "support more > > > > > > > cases, > > > > > > > > it's an improvement". That doesn't make any sense to me, since > > > > > >

Re: [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk

2016-01-05 Thread Jaegeuk Kim
On Wed, Jan 06, 2016 at 11:14:22AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, January 06, 2016 10:30 AM > > To: Chao Yu > > Cc: linux-ker...@vger.kernel.org; linu

[f2fs-dev] [PATCH 1/3] f2fs: avoid unnecessary f2fs_balance_fs calls

2016-01-07 Thread Jaegeuk Kim
Only when node page is newly dirtied, it needs to check whether we need to do f2fs_gc. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 4 ++-- fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/inode.c | 19 ++- fs/f2fs/node.c | 26 ++ f

[f2fs-dev] [PATCH 3/3] f2fs: clean up f2fs_balance_fs

2016-01-07 Thread Jaegeuk Kim
This patch adds one parameter to clean up all the callers of f2fs_balance_fs. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c| 17 ++--- fs/f2fs/f2fs.h| 2 +- fs/f2fs/file.c| 17 - fs/f2fs/inline.c | 3 +-- fs/f2fs/inode.c

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

2015-12-29 Thread Jaegeuk Kim
drop atomic data, and will be recovered by database with journal >From cb33fc8bc30981c370ec70fe68871130109793ec Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 29 Dec 2015 15:46:33 -0800 Subject: [PATCH] f2fs: fix f2fs_ioc_abort_volatile_write There are two rules t

Re: [f2fs-dev] [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs

2015-12-29 Thread Jaegeuk Kim
Hi Chao, On Tue, Dec 29, 2015 at 02:26:53PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, December 29, 2015 6:54 AM > > To: Chao Yu > > Cc: linux-f2fs-de

[f2fs-dev] [PATCH 1/5] f2fs: remove f2fs_bug_on in terms of max_depth

2015-12-31 Thread Jaegeuk Kim
There is no report on this bug_on case, but if malicious attacker changed this field intentionally, we can just reset it as a MAX value. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/dir.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH 2/5] f2fs: write pending bios when cp_error is set

2015-12-31 Thread Jaegeuk Kim
oop+0xcc/0xd0 [] syscall_return_slowpath+0xcc/0xe0 [] int_ret_from_sys_call+0x25/0x9f Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 2 +- fs/f2fs/node.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/f

[f2fs-dev] [PATCH 3/5] f2fs: use IPU for fdatasync

2015-12-31 Thread Jaegeuk Kim
This patch fixes missing IPU condition when fdatasync is called. With this patch, fdatasync is able to avoid additional node writes for recovery. 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/

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

2015-12-31 Thread Jaegeuk Kim
gt; in android, and hope this can be applied. But, I can understand that if you > were considerring about risk control and backward compatibility, since this > change affects all atomic related ioctls. > > > For other databases, I can understand that they can use atomic_write without

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

2015-12-30 Thread Jaegeuk Kim
Hello, On Wed, Dec 30, 2015 at 09:34:40AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, December 30, 2015 8:05 AM > > To: Chao Yu > > Cc: linux-f2fs-de

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

2016-01-08 Thread Jaegeuk Kim
Change log from v5: o fix build warning for ARM, reported by Michael Zimmermann Thanks to Michael for testing this patch. -- >8 -- From 284fd2a6d5e07770cc021c8f59b538471c35 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 17 Nov 2015 12:45:13 -0800 Subjec

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

2016-01-08 Thread Jaegeuk Kim
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, > > > -Original Message- > > From: Chao Yu [mailto:c...@kernel.org] > > Sent: Friday, January 01, 201

[f2fs-dev] [PATCH] f2fs: monitor the number of background checkpoint

2016-01-09 Thread Jaegeuk Kim
This patch adds to show the number of background checkpoint. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/debug.c | 3 ++- fs/f2fs/f2fs.h| 4 +++- fs/f2fs/segment.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c

[f2fs-dev] [PATCH] f2fs: fix wrong memory condition check

2016-01-09 Thread Jaegeuk Kim
This patch fixes wrong decision for avaliable_free_memory. The return valus is already set as false, so we should consider true condition below only. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/f

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

2016-01-09 Thread Jaegeuk Kim
If there is an error during commit, we should keep the flag in order to abort it. 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 dfaed51..db0b2cb 100644 --- a/f

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

2016-01-08 Thread Jaegeuk Kim
This patch adds last time that user requested filesystem operations. This information is used to detect whether system is idle or not later. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++ fs/f2fs/data.c | 1

[f2fs-dev] [PATCH 1/2] f2fs: introduce time and interval facility

2016-01-08 Thread Jaegeuk Kim
This patch adds time and interval arrays to store some timing variables. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 21 - fs/f2fs/segment.c| 2 +- fs/f2fs/super.c | 7 +++ 4 files chang

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

2015-12-22 Thread Jaegeuk Kim
The f2fs_balance_fs doesn't need to cover f2fs_new_inode or f2fs_find_entry works. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/namei.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 2c32110..8

[f2fs-dev] [PATCH 1/4] f2fs: check inline_data flag at converting time

2015-12-22 Thread Jaegeuk Kim
We can check inode's inline_data flag when calling to convert it. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 8 +++- fs/f2fs/file.c | 58 ++-- fs/f2fs/inline.c | 3 +++ 3 files changed, 29 insertions(

[f2fs-dev] [PATCH 3/4] f2fs: record node block allocation in dnode_of_data

2015-12-22 Thread Jaegeuk Kim
This patch introduces recording node block allocation in dnode_of_data. This information helps to figure out whether any node block is allocated during specific file operations. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 1 + fs/f2fs/f2fs.h | 1 + fs/f2fs/file

[f2fs-dev] [PATCH 1/2] man: add missing man pages

2015-12-22 Thread Jaegeuk Kim
This patch adds missing man pages. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- man/Makefile.am | 2 +- man/defrag.f2fs.8 | 74 +++ man/dump.f2fs.8 | 68 ++ man/fsck.f2fs.8

[f2fs-dev] [PATCH 2/2] man: modify mkfs.f2fs man page

2015-12-22 Thread Jaegeuk Kim
This patch adds missing [sectors] option in mkfs.f2fs, and removes meaningless version. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- man/mkfs.f2fs.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man/mkfs.f2fs.8 b/man/mkfs.f2fs.8 index 068c4c1..cdbde96

Re: [f2fs-dev] [PATCH 4/5] f2fs: support data flush in ioctl

2015-12-24 Thread Jaegeuk Kim
Hi Chao, On Thu, Dec 24, 2015 at 06:10:25PM +0800, Chao Yu wrote: > Sometimes user want to sync all data belong to superblock into storage > for persistence, 'syncfs' syscall is one option, still f2fs supports > similar one through ioctl, difference is that sb releted kworker is > online for

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

2015-12-24 Thread Jaegeuk Kim
Hi Chao, On Fri, Dec 25, 2015 at 09:18:06AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Friday, December 25, 2015 5:52 AM > > To: Chao Yu > > Cc: linux-fsde...@vger.kern

Re: [f2fs-dev] [PATCH 3/4] f2fs: record node block allocation in dnode_of_data

2015-12-23 Thread Jaegeuk Kim
Hi Chao, On Wed, Dec 23, 2015 at 04:00:36PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, December 23, 2015 9:00 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@v

Re: [f2fs-dev] [PATCH 4/4] f2fs: call f2fs_balance_fs only when node was changed

2015-12-23 Thread Jaegeuk Kim
Change log v2: - add dio case >From c2d16a526371954671f9c8cff5f09f9d230f7993 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 22 Dec 2015 13:23:35 -0800 Subject: [PATCH] f2fs: call f2fs_balance_fs only when node was changed If user tries to update or read

Re: [f2fs-dev] [PATCH 4/4] f2fs: call f2fs_balance_fs only when node was changed

2015-12-23 Thread Jaegeuk Kim
Hi Chao, On Wed, Dec 23, 2015 at 05:46:59PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, December 23, 2015 9:00 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@v

Re: [f2fs-dev] [PATCH 3/4 v2] f2fs: record node block allocation in dnode_of_data

2015-12-23 Thread Jaegeuk Kim
Change log from v1: - remove redundant set - adjust memory alignment >From 60c6a898094535e850268dd77701255a37cce3d3 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaeg...@kernel.org> Date: Tue, 22 Dec 2015 12:59:54 -0800 Subject: [PATCH] f2fs: record node block allocation in dnod

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

2015-12-24 Thread Jaegeuk Kim
On Thu, Dec 24, 2015 at 01:49:24PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Thursday, December 24, 2015 10:15 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@vger.ke

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

2015-12-24 Thread Jaegeuk Kim
Hi Chao, On Thu, Dec 24, 2015 at 01:50:32PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Thursday, December 24, 2015 10:15 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@v

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

2015-12-18 Thread Jaegeuk Kim
This patch improves the allocation speed. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fsck/f2fs.h | 2 +- fsck/mount.c | 10 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fsck/f2fs.h b/fsck/f2fs.h index af5cc40..f990527 100644 --- a/fsck/f2fs.h +++

Re: [f2fs-dev] [PATCH 3/5] f2fs: report readonly status in ->fsync

2015-12-28 Thread Jaegeuk Kim
Hi Chao, Thanks Marc for your report. On Mon, Dec 28, 2015 at 05:59:19PM +0800, Chao Yu wrote: > > -Original Message- > > From: Marc Lehmann [mailto:schm...@schmorp.de] > > Sent: Saturday, December 26, 2015 2:33 PM > > To: Chao Yu > > Cc: linux-f2fs-devel@lists.sourceforge.net > >

Re: [f2fs-dev] [PATCH] f2fs: add a segment and section num check in sanity_check_raw_super

2015-12-28 Thread Jaegeuk Kim
Hi Yunlei, Could you send a v2 for this? Thanks, On Tue, Dec 29, 2015 at 08:58:24AM +0800, He YunLei wrote: > On 2015/12/29 7:10, Jaegeuk Kim wrote: > >Hi Yunlei, > > > >On Sat, Dec 26, 2015 at 10:55:45AM +0800, He YunLei wrote: > >>On 2015/12/26 10:46, Yunlei

Re: [f2fs-dev] [RFC PATCH 2/2] f2fs: export a threshold in sysfs for controlling dio serialization

2015-12-28 Thread Jaegeuk Kim
Hi Chao, On Mon, Dec 28, 2015 at 06:05:45PM +0800, Chao Yu wrote: > As Yunlei He reported when he test with the patch ("f2fs: enhance > multithread dio write performance"): > "Does share writepages mutex lock have an effect on cache write? > Here is AndroBench result on my phone: > > Before

[f2fs-dev] [PATCH 2/3] f2fs: use i_size_read to get i_size

2015-12-28 Thread Jaegeuk Kim
We need to use i_size_read() to get inode->i_size. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/data.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index f34f42a..8a89810 100644 --- a/fs/f2fs/data.c +++ b/fs/f2

[f2fs-dev] [PATCH 3/3] f2fs: load largest extent all the time

2015-12-28 Thread Jaegeuk Kim
Otherwise, we can get mismatched largest extent information. One example is: 1. mount f2fs w/ extent_cache 2. make a small extent 3. umount 4. mount f2fs w/o extent_cache 5. update the largest extent 6. umount 7. mount f2fs w/ extent_cache 8. get the old extent made by #2 Signed-off-by: Jaegeuk

[f2fs-dev] [PATCH 1/2] f2fs: use atomic variable for total_extent_tree

2015-12-21 Thread Jaegeuk Kim
It would be better to use atomic variable for total_extent_tree. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/debug.c| 5 +++-- fs/f2fs/extent_cache.c | 8 fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 3 ++- fs/f2fs/shrinker.c | 3 ++- 5

[f2fs-dev] [PATCH 2/2] f2fs: speed up shrinking extent tree entries

2015-12-21 Thread Jaegeuk Kim
If there is no candidates for shrinking slab entries, we don't need to traverse any trees at all. Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- fs/f2fs/extent_cache.c | 12 fs/f2fs/f2fs.h | 1 + fs/f2fs/shrinker.c | 2 +- 3 files changed, 14 insertions

Re: [f2fs-dev] [PATCH 1/2] f2fs: use atomic variable for total_extent_tree

2015-12-21 Thread Jaegeuk Kim
On Tue, Dec 22, 2015 at 01:28:09PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, December 22, 2015 11:39 AM > > To: linux-ker...@vger.kernel.org; linux-fsde...@vger.ke

Re: [f2fs-dev] [PATCH 2/2] f2fs: speed up shrinking extent tree entries

2015-12-21 Thread Jaegeuk Kim
On Mon, Dec 21, 2015 at 07:38:41PM -0800, Jaegeuk Kim wrote: > If there is no candidates for shrinking slab entries, we don't need to > traverse > any trees at all. > > Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> > --- > fs/f2fs/extent_cache.c | 12 +++

Re: [f2fs-dev] [PATCH 2/2] f2fs: speed up shrinking extent tree entries

2015-12-21 Thread Jaegeuk Kim
_ext_tree); > atomic_dec(>total_zombie_tree); > ... Sure. :) Thanks, > } > > Other parts look good to me. :) > > Reviewed-by: Chao Yu <chao2...@samsung.com> > > Thanks, > > > -Original Message- > > From: Jaegeuk Kim [mailt

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