Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Chao Yu
Hi Daeho, On 2023/1/31 0:34, Daeho Jeong wrote: Hi Chao, I read your patch series now and I like it. Thank you for checking the patches. :) However, how about a race condition between start_atomic_write and abort_atomic_write? Yup, I noticed that issue, I guess we can avoid this race cond

[f2fs-dev] [syzbot] [f2fs?] KASAN: use-after-free Read in __shrink_extent_tree

2023-01-31 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:7c46948a6e9c Merge tag 'fs.fuse.acl.v6.2-rc6' of git://git.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=12c1d8ed48 kernel config: https://syzkaller.appspot.com/x/.config?x=c8d5c2ee6c2bd4b8 das

[f2fs-dev] [PATCH 2/3] f2fs: fix to update age extent correctly during truncation

2023-01-31 Thread Chao Yu
nr_free may be less than len, we should update age extent cache w/ range [fofs, len] rather than [fofs, nr_free]. Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache") Signed-off-by: Chao Yu --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/f

[f2fs-dev] [PATCH 1/3] f2fs: clean up __update_extent_tree_range()

2023-01-31 Thread Chao Yu
No logic change, just avoid goto statement. Signed-off-by: Chao Yu --- fs/f2fs/extent_cache.c | 66 -- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index d70ad6a44cbf..cf65a188d112 100644 -

[f2fs-dev] [PATCH 3/3] f2fs: fix to update age extent in f2fs_do_zero_range()

2023-01-31 Thread Chao Yu
We should update age extent in f2fs_do_zero_range() like we did in f2fs_truncate_data_blocks_range(). Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache") Signed-off-by: Chao Yu --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index

[f2fs-dev] [syzbot] [f2fs?] KASAN: use-after-free Write in __attach_extent_node

2023-01-31 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:7c46948a6e9c Merge tag 'fs.fuse.acl.v6.2-rc6' of git://git.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13f04ecd48 kernel config: https://syzkaller.appspot.com/x/.config?x=c8d5c2ee6c2bd4b8 das

Re: [f2fs-dev] [PATCH v3 2/2] f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx()

2023-01-31 Thread Jaegeuk Kim
On 01/31, Chao Yu wrote: > On 2023/1/21 0:16, Yangtao Li wrote: > > Convert to use iostat_lat_type as parameter instead of raw number. > > BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, and rename > > iotype to page_type to match the definition. > > > > Reported-by: kernel test robot > >

Re: [f2fs-dev] [PATCH 1/3] f2fs: clean up __update_extent_tree_range()

2023-01-31 Thread Jaegeuk Kim
On 01/31, Chao Yu wrote: > No logic change, just avoid goto statement. I wanted to avoid a deep if/else statement. > > Signed-off-by: Chao Yu > --- > fs/f2fs/extent_cache.c | 66 -- > 1 file changed, 31 insertions(+), 35 deletions(-) > > diff --git a/fs

Re: [f2fs-dev] [PATCH] f2fs: fix to handle F2FS_IOC_START_ATOMIC_REPLACE in f2fs_compat_ioctl()

2023-01-31 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sat, 28 Jan 2023 18:32:26 +0800 you wrote: > Otherwise, 32-bits binary call ioctl(F2FS_IOC_START_ATOMIC_REPLACE) will > fail in 64-bits kernel. > > Fixes: 41e8f85a75fc ("f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE") >

Re: [f2fs-dev] [PATCH] f2fs: clean up i_compress_flag and i_compress_level usage

2023-01-31 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sat, 28 Jan 2023 18:30:11 +0800 you wrote: > .i_compress_level was introduced by commit 3fde13f817e2 ("f2fs: compress: > support compress level"), but never be used. > > This patch updates as below: > - load high 8-bits

[f2fs-dev] Patchwork summary for: f2fs

2023-01-31 Thread patchwork-bot+f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Series: [f2fs-dev,1/8] f2fs: remove __add_sum_entry Submitter: Christoph Hellwig Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=713525 Lore

Re: [f2fs-dev] [PATCH v3 1/2] f2fs: fix to avoid potential memory corruption in __update_iostat_latency()

2023-01-31 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sat, 21 Jan 2023 00:16:55 +0800 you wrote: > Add iotype sanity check to avoid potential memory corruption. > This is to fix the compile error below: > > fs/f2fs/iostat.c:231 __update_iostat_latency() error: buffer overf

Re: [f2fs-dev] [PATCH 1/8] f2fs: remove __add_sum_entry

2023-01-31 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Thu, 19 Jan 2023 07:36:18 +0100 you wrote: > This function just assigns a summary entry. This can be done entirely > typesafe with an open code struct assignment that relies on array > indexing. > > Signed-off-by: Chri

Re: [f2fs-dev] [PATCH 1/3] f2fs: clean up __update_extent_tree_range()

2023-01-31 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 31 Jan 2023 22:46:59 +0800 you wrote: > No logic change, just avoid goto statement. > > Signed-off-by: Chao Yu > --- > fs/f2fs/extent_cache.c | 66 -- > 1 file changed, 31

Re: [f2fs-dev] [PATCH v2] f2fs: reduce stack memory cost by using bitfield in struct f2fs_io_info

2023-01-31 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Mon, 30 Jan 2023 09:20:12 +0800 you wrote: > This patch tries to use bitfield in struct f2fs_io_info to improve > memory usage. > > struct f2fs_io_info { > ... > int need_lock:8;/* indicate we need to lock

Re: [f2fs-dev] [PATCH 1/5] f2fs: introduce trace_f2fs_replace_atomic_write_block

2023-01-31 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Mon, 9 Jan 2023 11:44:49 +0800 you wrote: > Commit 3db1de0e582c ("f2fs: change the current atomic write way") > removed old tracepoints, but it missed to add new one, this patch > fixes to introduce trace_f2fs_replace_a

Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Daeho Jeong
Hi Chao, On Tue, Jan 31, 2023 at 3:37 AM Chao Yu wrote: > > Hi Daeho, > > On 2023/1/31 0:34, Daeho Jeong wrote: > > Hi Chao, > > > > I read your patch series now and I like it. > > Thank you for checking the patches. :) > > > However, how about a race condition between start_atomic_write and > >

Re: [f2fs-dev] [PATCH] fscrypt: Copy the memcg information to the ciphertext page

2023-01-31 Thread Tejun Heo
Hello, On Sun, Jan 29, 2023 at 09:26:57PM +, Matthew Wilcox wrote: > > > diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c > > > index e78be66bbf01..a4e76f96f291 100644 > > > --- a/fs/crypto/crypto.c > > > +++ b/fs/crypto/crypto.c > > > @@ -205,6 +205,9 @@ struct page *fscrypt_encrypt_pagec

Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Daeho Jeong
On Tue, Jan 31, 2023 at 11:13 AM Daeho Jeong wrote: > > Hi Chao, > > On Tue, Jan 31, 2023 at 3:37 AM Chao Yu wrote: > > > > Hi Daeho, > > > > On 2023/1/31 0:34, Daeho Jeong wrote: > > > Hi Chao, > > > > > > I read your patch series now and I like it. > > > > Thank you for checking the patches. :)

Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Daeho Jeong
On Tue, Jan 31, 2023 at 1:38 PM Daeho Jeong wrote: > > On Tue, Jan 31, 2023 at 11:13 AM Daeho Jeong wrote: > > > > Hi Chao, > > > > On Tue, Jan 31, 2023 at 3:37 AM Chao Yu wrote: > > > > > > Hi Daeho, > > > > > > On 2023/1/31 0:34, Daeho Jeong wrote: > > > > Hi Chao, > > > > > > > > I read your

Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Daeho Jeong
On Tue, Jan 31, 2023 at 1:57 PM Daeho Jeong wrote: > > On Tue, Jan 31, 2023 at 1:38 PM Daeho Jeong wrote: > > > > On Tue, Jan 31, 2023 at 11:13 AM Daeho Jeong wrote: > > > > > > Hi Chao, > > > > > > On Tue, Jan 31, 2023 at 3:37 AM Chao Yu wrote: > > > > > > > > Hi Daeho, > > > > > > > > On 2023

Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Chao Yu
Hi Daeho, On 2023/2/1 6:34, Daeho Jeong wrote: On Tue, Jan 31, 2023 at 1:57 PM Daeho Jeong wrote: On Tue, Jan 31, 2023 at 1:38 PM Daeho Jeong wrote: On Tue, Jan 31, 2023 at 11:13 AM Daeho Jeong wrote: Hi Chao, On Tue, Jan 31, 2023 at 3:37 AM Chao Yu wrote: Hi Daeho, On 2023/1/31 0:

Re: [f2fs-dev] [PATCH] f2fs: synchronize atomic write aborts

2023-01-31 Thread Daeho Jeong
On Tue, Jan 31, 2023 at 5:40 PM Chao Yu wrote: > > Hi Daeho, > > On 2023/2/1 6:34, Daeho Jeong wrote: > > On Tue, Jan 31, 2023 at 1:57 PM Daeho Jeong wrote: > >> > >> On Tue, Jan 31, 2023 at 1:38 PM Daeho Jeong wrote: > >>> > >>> On Tue, Jan 31, 2023 at 11:13 AM Daeho Jeong wrote: > >

Re: [f2fs-dev] [PATCH] fscrypt: Copy the memcg information to the ciphertext page

2023-01-31 Thread Eric Biggers
On Tue, Jan 31, 2023 at 11:27:44AM -1000, Tejun Heo wrote: > Hello, > > On Sun, Jan 29, 2023 at 09:26:57PM +, Matthew Wilcox wrote: > > > > diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c > > > > index e78be66bbf01..a4e76f96f291 100644 > > > > --- a/fs/crypto/crypto.c > > > > +++ b/fs/cry