Re: [f2fs-dev] [PATCH v2] f2fs: introduce "strict_fsync" for posix standard fsync

2018-02-09 Thread Jaegeuk Kim
On 02/02, Junling Zheng wrote: > Commit "0a007b97aad6"(f2fs: recover directory operations by fsync) > fixed xfstest generic/342 case, but it also increased the written > data and caused the performance degradation. In most cases, there's > no need to do so heavily fsync actually. > > So we

[f2fs-dev] [PATCH RFC v5] f2fs: flush cp pack except cp pack 2 page at first

2018-02-09 Thread Gao Xiang via Linux-f2fs-devel
Previously, we attempt to flush the whole cp pack in a single bio, however, when suddenly powering off at this time, we could get into an extreme scenario that cp pack 1 page and cp pack 2 page are updated and latest, but payload or current summaries are still partially outdated. (see reliable

Re: [f2fs-dev] [PATCH 2/2] f2fs: support {d,id,did,x}node checksum

2018-02-09 Thread Jaegeuk Kim
On 02/01, Chao Yu wrote: > > > On 2018/2/1 6:15, Jaegeuk Kim wrote: > > On 01/31, Chao Yu wrote: > >> On 2018/1/31 10:02, Jaegeuk Kim wrote: > >>> What if we want to add more entries in addition to node_checksum? Do we > >>> have > >>> to add a new feature flag at every time? How about adding a

Re: [f2fs-dev] [PATCH RFC v4] f2fs: flush cp pack except cp pack 2 page at first

2018-02-09 Thread Jaegeuk Kim
On 02/01, Gao Xiang wrote: > Hi Jaegeuk and Chao, > > On 2018/2/1 6:28, Jaegeuk Kim wrote: > > On 01/31, Chao Yu wrote: > > > On 2018/1/31 14:39, Gaoxiang (OS) wrote: > > > > Previously, we attempt to flush the whole cp pack in a single bio, > > > > however, when suddenly powering off at this

Re: [f2fs-dev] [RFC PATCH 0/2] f2fs: introduce lost+found feature

2018-02-09 Thread Jaegeuk Kim
On 02/06, Sheng Yong wrote: > This patchset introduces lost+found feature in f2fs. If the feature is > enabled, f2fs should avoid to encrypting root directory. In that case, we need to add test_dummy_encryption likewise ext4. > > For more information, please check the mail "f2fs-tools:

Re: [f2fs-dev] [PATCH 2/2] f2fs: support {d,id,did,x}node checksum

2018-02-09 Thread Chao Yu
On 2018/2/10 9:41, Jaegeuk Kim wrote: > On 02/01, Chao Yu wrote: >> >> >> On 2018/2/1 6:15, Jaegeuk Kim wrote: >>> On 01/31, Chao Yu wrote: On 2018/1/31 10:02, Jaegeuk Kim wrote: > What if we want to add more entries in addition to node_checksum? Do we > have > to add a new

[f2fs-dev] [PATCH] f2fs: handle quota for orphan inodes

2018-02-09 Thread Jaegeuk Kim
This is to fix missing dquot_initialize for orphan inodes. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index

Re: [f2fs-dev] [RFC PATCH 2/5] f2fs-tools: init f2fs_configuration as 0

2018-02-09 Thread Jaegeuk Kim
On 02/08, Chao Yu wrote: > On 2018/2/6 12:31, Sheng Yong wrote: > > Signed-off-by: Sheng Yong > > Reviewed-by: Chao Yu Sheng Yong, I only merged this patch in this set. ;) > > Thanks,

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Yunlong Song
As what I point in last mail, if the atomic file is not committed yet, gc_data_segment will register_inmem_page the GCed data pages. This will cause these data pages written twice, the first write happens in move_data_page->do_write_data_page, and the second write happens in later

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Chao Yu
On 2018/2/8 11:11, Yunlong Song wrote: > Then the GCed data pages are totally mixed with the inmem atomic pages, If we add dio_rwsem, GC flow is exclude with atomic write flow. There will be not race case to mix GCed page into atomic pages. Or you mean: -

Re: [f2fs-dev] [RFC PATCH 1/5] mkfs.f2fs: introduce mkfs parameters in f2fs_configuration

2018-02-09 Thread Chao Yu
Hi Sheng Yong, On 2018/2/9 11:21, Sheng Yong wrote: > Hi, Chao > > Add Hyojun. > > On 2018/2/8 21:30, Chao Yu wrote: >> On 2018/2/6 12:31, Sheng Yong wrote: >>>   /* only root inode was written before truncating dnodes */ >>>   last_inode_pos = start_inode_pos + >>> -   

Re: [f2fs-dev] [RFC PATCH 4/5] mkfs.f2fs: create lost+found directory

2018-02-09 Thread Chao Yu
Hi Sheng Yong, On 2018/2/9 11:21, Sheng Yong wrote: > Hi, Chao > > On 2018/2/8 23:08, Chao Yu wrote: >> On 2018/2/6 12:31, Sheng Yong wrote: >>> This patch introduces a new feature F2FS_FEATURE_LOST_FOUND. It can be >>> switched on by indicating a new option `lost+found' with -O. If >> >> Not

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Yunlong Song
Back to the problem, if we skip out, then the f2fs_gc will go into dead loop if the apps only atomic start but never atomic commit. The main aim of my two patches is to remove the skip action to avoid the dead loop. On 2018/2/9 21:26, Chao Yu wrote: On 2018/2/9 20:56, Yunlong Song wrote: As

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Chao Yu
On 2018/2/9 21:29, Yunlong Song wrote: > Back to the problem, if we skip out, then the f2fs_gc will go > into dead loop if the apps only atomic start but never atomic That's another issue, which I have suggest to set a threshold time to release atomic/volatile pages by balance_fs_bg. Thanks, >

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Yunlong Song
The problem is that you can not find a proper value of the threshold time, when f2fs_gc select the GCed data page of the atomic file (which has atomic started but not atomic committed yet), then f2fs_gc will run into loop, and all the f2fs ops will be blocked in f2fs_balane_fs. If the threshold

Re: [f2fs-dev] [PATCH] dump.f2fs: correct the seg type in ssa_dump

2018-02-09 Thread Chao Yu
On 2018/2/6 16:47, Junling Zheng wrote: > Fix the mixed using of "ret" in ssa_dump. > > Signed-off-by: Junling Zheng Reviewed-by: Chao Yu Thanks, -- Check out the vibrant

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Chao Yu
On 2018/2/9 20:56, Yunlong Song wrote: > As what I point in last mail, if the atomic file is not committed > yet, gc_data_segment will register_inmem_page the GCed data pages. We will skip GCing that page as below check: - move_data_{page,block} - f2fs_is_atomic_file() skip out; No?

Re: [f2fs-dev] [PATCH] f2fs: remove unneed reada during build free nids

2018-02-09 Thread Chao Yu
On 2018/2/9 11:58, Yunlei He wrote: > This patch remove unneed reada during build free nids. > If few nids left, three will introduce a lot of no hit > read io. I guess it is due to be lack of commit c1fe3e981440 ("Revert "f2fs: reuse nids more aggressively""), before that commit, we will update