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

2015-12-15 Thread Chao Yu
Hi Jaegeuk, The 7, 8 patches could not be merged on current dev-test branch due to I generate them on incorrect base line. I will rebase and resent them tomorrow, sorry for the noisy. Thanks, On 12/15/15 1:35 PM, Chao Yu wrote: > Add a new option 'data_flush' to enable/disable data flush

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

2015-12-15 Thread Jaegeuk Kim
Hello, Cool, I also think it would be good to support versions to libs. I don't expect that libs are likely to move so fast. Thanks, 2015-12-15 7:28 GMT-08:00 Hans-Christoph Steiner : > > It would be great to have the full versioned shared library, but if > it'll make things move

[f2fs-dev] [PATCH 2/3] f2fs: don't grab super block buffer header all the time

2015-12-15 Thread Chao Yu
We have already got one copy of valid super block in memory, do not grab buffer header of super block all the time. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 8 ++ fs/f2fs/super.c | 81

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

2015-12-15 Thread Chao Yu
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 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index

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

2015-12-15 Thread Chao Yu
Hi Jaegeuk, Yunlei, I help do some edits and send it out as my patch's base. :) But if you want to send patch by yourself, please ignore this patch. Thanks, > -Original Message- > From: Chao Yu [mailto:chao2...@samsung.com] > Sent: Tuesday, December 15, 2015 5:17 PM > To: Jaegeuk Kim

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

2015-12-15 Thread Chao Yu
Hi all, > > It looks good to me, but can we releasing grabbed block buffer > > 'sbi->raw_super_buf' > > as Chao Yu said. > > If then, don't we need to recover the polluted superblock? We need, if we change to not grab super block buffer header, instead, we have to record current super block no

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

2015-12-15 Thread 殷啟聰
Hi Kim, Maybe we can forget about the versioning for now. Libtool's versioning mechanism is a little 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. :)

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

2015-12-15 Thread Jaegeuk Kim
On Tue, Dec 15, 2015 at 05:40:51PM +0800, Chao Yu wrote: > Hi Jaegeuk, Yunlei, > > I help do some edits and send it out as my patch's base. :) > > But if you want to send patch by yourself, please ignore this patch. No problem to merge this patch. Thanks Chao. > > Thanks, > > > -Original

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 --- fsck/fsck.c| 12 ++-- include/f2fs_fs.h | 6 +++--- lib/libf2fs.c | 26 ++ mkfs/f2fs_format.c | 3 ++- 4 files changed, 21

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

[f2fs-dev] [PATCH v2 7/7] f2fs: support data flush in checkpoint

2015-12-15 Thread Chao Yu
Previously, when finishing a checkpoint, we have persisted 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 full directory structure. But during checkpoint, we didn't flush dirty pages of

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

2015-12-15 Thread Chao Yu
Introduce __f2fs_commit_super to include duplicated codes in f2fs_commit_super for cleanup. Signed-off-by: Chao Yu --- v2: - clean up codes. --- fs/f2fs/super.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git

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

2015-12-15 Thread Hans-Christoph Steiner
It would be great to have the full versioned shared library, but if it'll make things move faster, we can solve our Android SDK issues with only a static library. Then the shared library can come later. .hc 殷啟聰: > Hi Kim, > > Maybe we can forget about the versioning for now. Libtool's

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

2015-12-15 Thread Chao Yu
Add a new option 'data_flush' to enable data flush functionality. Signed-off-by: Chao Yu --- v2: - rebase last dev-test branch. - fix to set option correctly. --- Documentation/filesystems/f2fs.txt | 2 ++ fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c

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 --- fsck/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index d34c704..8418dcc

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

2015-12-15 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Wednesday, December 16, 2015 6:01 AM > To: Chao Yu > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org > Subject: Re: [PATCH 8/8] f2fs: fix to avoid deadlock between checkpoint

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

2015-12-15 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Wednesday, December 16, 2015 6:03 AM > To: Chao Yu > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org > Subject: Re: [PATCH 7/8] f2fs: introduce new option for controlling data

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

2015-12-15 Thread Chao Yu
Hi Jaegeuk, > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Wednesday, December 16, 2015 5:59 AM > To: Chao Yu > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org > Subject: Re: [PATCH 5/8] f2fs: support data flush in checkpoint > > Hi

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