Re: [f2fs-dev] [PATCH v2 3/4] f2fs: atomic: fix to truncate pagecache before on-disk metadata truncation

2024-07-29 Thread Chao Yu
On 2024/7/30 0:26, Jaegeuk Kim wrote: On 07/26, Chao Yu wrote: We should always truncate pagecache while truncating on-disk data. Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts") Signed-off-by: Chao Yu --- v2: - fix to use cow_inode instead of inode fs/f2fs/file.c | 1 + 1 file

[f2fs-dev] [PATCH v2] f2fs: fix to avoid use-after-free in f2fs_stop_gc_thread()

2024-07-29 Thread Chao Yu
syzbot reports a f2fs bug as below: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_report+0xe8/0x550 mm/kasan/report.c:491 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 instrument_atomic_re

Re: [f2fs-dev] [PATCH] inject.f2fs: fix some build errors

2024-07-29 Thread Jaegeuk Kim
On 07/29, Daeho Jeong wrote: > On Thu, Jul 25, 2024 at 11:41 AM Jaegeuk Kim wrote: > > > > Signed-off-by: Jaegeuk Kim > > --- > > fsck/inject.c | 28 +++- > > 1 file changed, 15 insertions(+), 13 deletions(-) > > > > diff --git a/fsck/inject.c b/fsck/inject.c > > index 2a

Re: [f2fs-dev] [PATCH] inject.f2fs: fix some build errors

2024-07-29 Thread Daeho Jeong
On Thu, Jul 25, 2024 at 11:41 AM Jaegeuk Kim wrote: > > Signed-off-by: Jaegeuk Kim > --- > fsck/inject.c | 28 +++- > 1 file changed, 15 insertions(+), 13 deletions(-) > > diff --git a/fsck/inject.c b/fsck/inject.c > index 2a21dae293f6..4ffdfd0f0b5d 100644 > --- a/fsck/in

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-29 Thread Christoph Hellwig
On Sun, Jul 28, 2024 at 10:44:12PM -0400, Theodore Ts'o wrote: > > > > Personally, I prefer the implementation of method two. > > But there's also method zero --- keep things the way they are, and > don't try to add a new astraction. > > Advantage: > > -- Code has worked for decades, so it is v

Re: [f2fs-dev] [PATCH v2 3/4] f2fs: atomic: fix to truncate pagecache before on-disk metadata truncation

2024-07-29 Thread Jaegeuk Kim
On 07/26, Chao Yu wrote: > We should always truncate pagecache while truncating on-disk data. > > Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts") > Signed-off-by: Chao Yu > --- > v2: > - fix to use cow_inode instead of inode > fs/f2fs/file.c | 1 + > 1 file changed, 1 insertion(+)

Re: [f2fs-dev] [PATCH] f2fs: don't traverse directory blocks after EOF

2024-07-29 Thread Jaegeuk Kim
On 07/29, Chao Yu wrote: > On 2024/7/27 11:27, Jaegeuk Kim wrote: > > On 07/26, Chao Yu wrote: > > > On 2024/7/26 0:55, Jaegeuk Kim wrote: > > > > On 07/12, Chao Yu wrote: > > > > > All directory blocks are within the scope of i_size, so let's limit > > > > > the end_block to just check valid diren

Re: [f2fs-dev] [syzbot] [f2fs?] WARNING in rcu_sync_dtor

2024-07-29 Thread Theodore Ts'o
On Mon, Jul 29, 2024 at 03:27:21PM +0200, Jan Kara wrote: > > So in ext4 we have EXT4_FLAGS_SHUTDOWN flag which we now use > internally instead of SB_RDONLY flag for checking whether the > filesystem was shutdown (because otherwise races between remount and > hitting fs error were really messy). H

Re: [f2fs-dev] [syzbot] [f2fs?] WARNING in rcu_sync_dtor

2024-07-29 Thread Jan Kara
On Mon 29-07-24 11:10:09, Christian Brauner wrote: > On Fri, Jul 26, 2024 at 08:23:02AM GMT, syzbot wrote: > > syzbot has bisected this issue to: > > > > commit b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5 > > Author: Chao Yu > > Date: Sun Apr 23 15:49:15 2023 + > > > > f2fs: support error

Re: [f2fs-dev] [syzbot] [f2fs?] WARNING in rcu_sync_dtor

2024-07-29 Thread Christian Brauner
On Fri, Jul 26, 2024 at 08:23:02AM GMT, syzbot wrote: > syzbot has bisected this issue to: > > commit b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5 > Author: Chao Yu > Date: Sun Apr 23 15:49:15 2023 + > > f2fs: support errors=remount-ro|continue|panic mountoption > > bisection log: https: