[f2fs-dev] [PATCH 1/3] f2fs: fix wrong value of tracepoint parameter

2020-05-27 Thread Chao Yu
In f2fs_lookup(), we should set @err correctly before printing it in tracepoint. Signed-off-by: Chao Yu --- fs/f2fs/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 63b34a161cf4..2c2f8c36c828 100644 --- a/fs/f2fs/namei.c +++

[f2fs-dev] [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock

2020-05-27 Thread Chao Yu
meta inode page should be flushed under cp_lock, fix it. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index f7de2a1da528..0fcae4d90074 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2260,7 +2260,9 @@ static

[f2fs-dev] [PATCH 2/3] f2fs: remove unneeded return value of __insert_discard_tree()

2020-05-27 Thread Chao Yu
We never use return value of __insert_discard_tree(), so remove it. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 1c48ec866b8c..ebbadde6cbce 100644 --- a/fs/f2fs/segment.c +++

[f2fs-dev] [PATCH] f2fs_io: add randread

2020-05-27 Thread Daeho Jeong
From: Daeho Jeong I've added a new command to evaluate random read. Signed-off-by: Daeho Jeong --- tools/f2fs_io/f2fs_io.c | 64 + 1 file changed, 64 insertions(+) diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index d1889ff..30544c1

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock

2020-05-27 Thread Jaegeuk Kim
On 05/28, Chao Yu wrote: > On 2020/5/28 5:02, Jaegeuk Kim wrote: > > On 05/27, Chao Yu wrote: > >> meta inode page should be flushed under cp_lock, fix it. > > > > It doesn't matter for this case, yes? > > It's not related to discard issue. I meant we really need this or not. :P > > Now, I

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock

2020-05-27 Thread Chao Yu
On 2020/5/28 5:02, Jaegeuk Kim wrote: > On 05/27, Chao Yu wrote: >> meta inode page should be flushed under cp_lock, fix it. > > It doesn't matter for this case, yes? It's not related to discard issue. Now, I got some progress, I can reproduce that bug occasionally. Thanks, > >> >>

Re: [f2fs-dev] [PATCH v3] f2fs: avoid inifinite loop to wait for flushing node pages at cp_error

2020-05-27 Thread Chao Yu
On 2020/5/28 4:56, Jaegeuk Kim wrote: > On 05/27, Chao Yu wrote: >> On 2020/5/26 9:56, Jaegeuk Kim wrote: >>> On 05/26, Chao Yu wrote: On 2020/5/26 9:11, Chao Yu wrote: > On 2020/5/25 23:06, Jaegeuk Kim wrote: >> On 05/25, Chao Yu wrote: >>> On 2020/5/25 11:56, Jaegeuk Kim wrote:

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock

2020-05-27 Thread Chao Yu
On 2020/5/28 9:26, Jaegeuk Kim wrote: > On 05/28, Chao Yu wrote: >> On 2020/5/28 5:02, Jaegeuk Kim wrote: >>> On 05/27, Chao Yu wrote: meta inode page should be flushed under cp_lock, fix it. >>> >>> It doesn't matter for this case, yes? >> >> It's not related to discard issue. > > I meant

Re: [f2fs-dev] [PATCH] f2fs: protect new segment allocation in expand_inode_data

2020-05-27 Thread Chao Yu
On 2020/5/27 12:02, Daeho Jeong wrote: > From: Daeho Jeong > > Found a new segemnt allocation without f2fs_lock_op() in > expand_inode_data(). So, when we do fallocate() for a pinned file > and trigger checkpoint very frequently and simultaneously. F2FS gets > stuck in the below code of

Re: [f2fs-dev] [PATCH] f2fs: fix retry logic in f2fs_write_cache_pages()

2020-05-27 Thread Chao Yu
On 2020/5/27 10:20, Sahitya Tummala wrote: > In case a compressed file is getting overwritten, the current retry > logic doesn't include the current page to be retried now as it sets > the new start index as 0 and new end index as writeback_index - 1. > This causes the corresponding cluster to be

Re: [f2fs-dev] [PATCH] f2fs: compress: don't compress any datas after cp stop

2020-05-27 Thread Chao Yu
Jaegeuk, could you please review this patch? On 2020/5/26 9:55, Chao Yu wrote: > While compressed data writeback, we need to drop dirty pages like we did > for non-compressed pages if cp stops, however it's not needed to compress > any data in such case, so let's detect cp stop condition in >

Re: [f2fs-dev] [PATCH] f2fs: fix retry logic in f2fs_write_cache_pages()

2020-05-27 Thread Chao Yu
On 2020/5/28 10:45, Chao Yu wrote: > On 2020/5/27 10:20, Sahitya Tummala wrote: >> In case a compressed file is getting overwritten, the current retry >> logic doesn't include the current page to be retried now as it sets >> the new start index as 0 and new end index as writeback_index - 1. >>

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock

2020-05-27 Thread Jaegeuk Kim
On 05/27, Chao Yu wrote: > meta inode page should be flushed under cp_lock, fix it. It doesn't matter for this case, yes? > > Signed-off-by: Chao Yu > --- > fs/f2fs/file.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index

Re: [f2fs-dev] [PATCH v3] f2fs: avoid inifinite loop to wait for flushing node pages at cp_error

2020-05-27 Thread Jaegeuk Kim
On 05/27, Chao Yu wrote: > On 2020/5/26 9:56, Jaegeuk Kim wrote: > > On 05/26, Chao Yu wrote: > >> On 2020/5/26 9:11, Chao Yu wrote: > >>> On 2020/5/25 23:06, Jaegeuk Kim wrote: > On 05/25, Chao Yu wrote: > > On 2020/5/25 11:56, Jaegeuk Kim wrote: > >> Shutdown test is somtimes hung,