[f2fs-dev] [PATCH] f2fs: assign REQ_RAHEAD to bio for ->readpages

2018-06-21 Thread Jaegeuk Kim
As Jens reported, we'd better assign REQ_RAHEAD to bio by the fact that ->readpages is called only from read-ahead. In Documentation/filesystems/vfs.txt, readpages: called by the VM to read pages associated with the address_space object. This is essentially just a vector version of

Re: [f2fs-dev] [PATCH] f2fs: disable f2fs_check_rb_tree_consistence

2018-06-21 Thread Jaegeuk Kim
On 06/21, Chao Yu wrote: > If there is millions of discard entries cached in rb tree, each > sanity check of it can cause very long latency as held cmd_lock > blocking other lock grabbers. > > In other aspect, we have enabled the check very long time, as > we see, there is no such inconsistent

[f2fs-dev] [PATCH] f2fs: don't issue discard commands in online discard is on

2018-06-21 Thread Jaegeuk Kim
Actually, we don't need to issue discard commands, if discard is on, as mentioned in the comment. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index

[f2fs-dev] [PATCH] f2fs: fix to wait on page writeback before updating page

2018-06-21 Thread Chao Yu
From: Chao Yu In error path of f2fs_move_rehashed_dirents, inode page could be writeback state, so we should wait on inode page writeback before updating it. Signed-off-by: Chao Yu --- fs/f2fs/inline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c

Re: [f2fs-dev] [PATCH v2] f2fs: report error if quota off error during umount

2018-06-21 Thread Chao Yu
On 2018/6/21 20:20, Yunlei He wrote: > Now, we depend on fsck to ensure quota file data is ok, > so we scan whole partition if checkpoint without umount > flag. It's same for quota off error case, which may make > quota file data inconsistent. > > Signed-off-by: Yunlei He > --- >

[f2fs-dev] [PATCH v2] f2fs: report error if quota off error during umount

2018-06-21 Thread Yunlei He
Now, we depend on fsck to ensure quota file data is ok, so we scan whole partition if checkpoint without umount flag. It's same for quota off error case, which may make quota file data inconsistent. Signed-off-by: Yunlei He --- fs/f2fs/super.c | 17 ++--- 1 file changed, 14

Re: [f2fs-dev] [PATCH] fsck.f2fs: clear qf_ino if quota node is removed

2018-06-21 Thread Chao Yu
On 2018/6/21 16:51, Sheng Yong wrote: > If a quota node is corrupted, it may be removed. Then its qf_ino should > also be removed. Yes, I agree that is simplest way by just removing quota sysfiles and trying to rebuild them entirely by rescanning. Refer to below discussion, could you consider to

Re: [f2fs-dev] [PATCH] f2fs: report error if quota off error during umount

2018-06-21 Thread Chao Yu
On 2018/6/21 15:27, Yunlei He wrote: > Now, we depend on fsck to ensure quota file data is ok, > so we scan whole partition if checkpoint without umount > flag. It's same for quota off error case, which may make > quota file data inconsistent. > > Signed-off-by: Yunlei He > --- >

[f2fs-dev] [PATCH] fsck.f2fs: clear qf_ino if quota node is removed

2018-06-21 Thread Sheng Yong
If a quota node is corrupted, it may be removed. Then its qf_ino should also be removed. Signed-off-by: Sheng Yong --- fsck/fsck.c | 19 +-- fsck/fsck.h | 1 + fsck/mount.c | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c

Re: [f2fs-dev] [PATCH v2] f2fs: fix a hungtask problem caused by congestion_wait

2018-06-21 Thread Chao Yu
On 2018/6/21 14:49, Yunlei He wrote: > This patch fix hungtask problem which can be reproduced as follow: > > Thread 0~3: > while true > do > touch /xxx/test/file_xxx > done > > Thread 4 write a new checkpoint every three seconds. > > In the meantime, fio start 16 threads for randwrite.

[f2fs-dev] [PATCH] f2fs: report error if quota off error during umount

2018-06-21 Thread Yunlei He
Now, we depend on fsck to ensure quota file data is ok, so we scan whole partition if checkpoint without umount flag. It's same for quota off error case, which may make quota file data inconsistent. Signed-off-by: Yunlei He --- fs/f2fs/super.c | 7 +-- 1 file changed, 5 insertions(+), 2

[f2fs-dev] [PATCH v2] f2fs: fix a hungtask problem caused by congestion_wait

2018-06-21 Thread Yunlei He
This patch fix hungtask problem which can be reproduced as follow: Thread 0~3: while true do touch /xxx/test/file_xxx done Thread 4 write a new checkpoint every three seconds. In the meantime, fio start 16 threads for randwrite. With my debug info, cycles num will exceed 1000 in

Re: [f2fs-dev] [PATCH] f2fs-tools: fix compile errors on AOSP

2018-06-21 Thread Chao Yu
On 2018/6/20 21:06, Junling Zheng wrote: > Include needed header files directly to fix compile errors on AOSP. > > Signed-off-by: Junling Zheng Reviewed-by: Chao Yu Thanks, -- Check out the vibrant tech community on

Re: [f2fs-dev] [PATCH v2] fsck.f2fs: introduce fsck_chk_curseg_info

2018-06-21 Thread Chao Yu
On 2018/6/20 19:12, Sheng Yong wrote: > If curseg is an empty segment, it will not be checked. This patch > introduces fsck_chk_curseg_info() to check SIT/SSA type of cursegs > to avoid curseg corruption. > > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH] f2fs: Fix uninitialized return in f2fs_ioc_shutdown()

2018-06-21 Thread Chao Yu
On 2018/6/20 18:39, Dan Carpenter wrote: > "ret" can be uninitialized on the success path when "in == > F2FS_GOING_DOWN_FULLSYNC". > > Fixes: 60b2b4ee2bc0 ("f2fs: Fix deadlock in shutdown ioctl") > Signed-off-by: Dan Carpenter Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH] f2fs: use timespec64 for inode timestamps

2018-06-21 Thread Chao Yu
On 2018/6/20 16:02, Arnd Bergmann wrote: > The on-disk representation and the vfs both use 64-bit tv_sec values, > so let's change the last missing piece in the middle. > > Signed-off-by: Arnd Bergmann Reviewed-by: Chao Yu Thanks,