syzbot has bisected this issue to:
commit 275dca4630c165edea9abe27113766bc1173f878
Author: Eric Biggers
Date: Wed Dec 27 17:14:28 2023 +
f2fs: move release of block devices to after kill_block_super()
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16071613e8
start
If data block in compressed cluster is not persisted with metadata
during checkpoint, after SPOR, the data may be corrupted, let's
guarantee to write compressed page by checkpoint.
Fixes: 4c8ff7095bef ("f2fs: support data compression")
Reviewed-by: Daeho Jeong
Signed-off-by: Chao Yu
---
When we overwrite compressed cluster w/ normal cluster, we should
not unlock cp_rwsem during f2fs_write_raw_pages(), otherwise data
will be corrupted if partial blocks were persisted before CP & SPOR,
due to cluster metadata wasn't updated atomically.
Fixes: 4c8ff7095bef ("f2fs: support data
From: Sheng Yong
Compressed cluster may not be released due to we can fail in
release_compress_blocks(), fix to handle reserved compressed
cluster correctly in reserve_compress_blocks().
Fixes: 4c8ff7095bef ("f2fs: support data compression")
Signed-off-by: Sheng Yong
Signed-off-by: Chao Yu
verify_blkaddr() will trigger panic once we inject fault into
f2fs_is_valid_blkaddr(), fix to remove this unnecessary f2fs_bug_on().
Fixes: 18792e64c86d ("f2fs: support fault injection for
f2fs_is_valid_blkaddr()")
Reviewed-by: Daeho Jeong
Signed-off-by: Chao Yu
---
fs/f2fs/f2fs.h | 4 +---
1
We will encounter below inconsistent status when FAULT_BLKADDR type
fault injection is on.
Info: checkpoint state = d6 : nat_bits crc fsck compacted_summary
orphan_inodes sudden-power-off
[ASSERT] (fsck_chk_inode_blk:1254) --> ino: 0x1c100 has i_blocks: 00c0,
but has 191 blocks
[FIX]
In reserve_compress_blocks(), we update blkaddrs of dnode in prior to
inc_valid_block_count(), it may cause inconsistent status bewteen
i_blocks and blkaddrs once inc_valid_block_count() fails.
To fix this issue, it needs to reverse their invoking order.
Fixes: c75488fb4d82 ("f2fs: introduce
Thanks, let me resend v5 w/ blow cleanups.
On 2024/1/13 9:39, Jaegeuk Kim wrote:
Cleaned up a bit:
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1443,13 +1443,14 @@ void f2fs_compress_write_end_io(struct bio *bio, struct
page *page)
}
static int f2fs_write_raw_pages(struct
On 2024/1/13 1:16, Jaegeuk Kim wrote:
[1] changed the below condition, which made f2fs_put_page() voided.
This patch reapplies the AL's resolution in -next from [2].
- if (S_ISDIR(old_inode->i_mode)) {
+ if (old_is_dir && old_dir != new_dir) {
old_dir_entry =
On 01/12, Eric Biggers wrote:
> On Fri, Jan 12, 2024 at 05:28:31PM -0800, Jaegeuk Kim wrote:
> > On 01/12, Eric Biggers wrote:
> > > On Fri, Jan 12, 2024 at 04:57:47PM -0800, Eric Biggers wrote:
> > > > From: Eric Biggers
> > > >
> > > > kill_f2fs_super() is called even if f2fs_fill_super()
Cleaned up a bit:
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1443,13 +1443,14 @@ void f2fs_compress_write_end_io(struct bio *bio, struct
page *page)
}
static int f2fs_write_raw_pages(struct compress_ctx *cc,
- int *submitted,
+
On Fri, Jan 12, 2024 at 05:28:31PM -0800, Jaegeuk Kim wrote:
> On 01/12, Eric Biggers wrote:
> > On Fri, Jan 12, 2024 at 04:57:47PM -0800, Eric Biggers wrote:
> > > From: Eric Biggers
> > >
> > > kill_f2fs_super() is called even if f2fs_fill_super() fails.
> > > f2fs_fill_super() frees the
On 01/12, Eric Biggers wrote:
> On Fri, Jan 12, 2024 at 04:57:47PM -0800, Eric Biggers wrote:
> > From: Eric Biggers
> >
> > kill_f2fs_super() is called even if f2fs_fill_super() fails.
> > f2fs_fill_super() frees the struct f2fs_sb_info, so it must set
> > sb->s_fs_info to NULL to prevent it
On 2024/1/13 8:57, Eric Biggers wrote:
From: Eric Biggers
kill_f2fs_super() is called even if f2fs_fill_super() fails.
f2fs_fill_super() frees the struct f2fs_sb_info, so it must set
sb->s_fs_info to NULL to prevent it from being freed again.
Oh, I missed that case as well during reviewing,
On Fri, Jan 12, 2024 at 04:57:47PM -0800, Eric Biggers wrote:
> From: Eric Biggers
>
> kill_f2fs_super() is called even if f2fs_fill_super() fails.
> f2fs_fill_super() frees the struct f2fs_sb_info, so it must set
> sb->s_fs_info to NULL to prevent it from being freed again.
>
> Fixes:
From: Eric Biggers
kill_f2fs_super() is called even if f2fs_fill_super() fails.
f2fs_fill_super() frees the struct f2fs_sb_info, so it must set
sb->s_fs_info to NULL to prevent it from being freed again.
Fixes: 275dca4630c1 ("f2fs: move release of block devices to after
kill_block_super()")
On Fri, Jan 12, 2024 at 04:32:21PM -0800, syzbot wrote:
> loop0: detected capacity change from 0 to 63271
> F2FS-fs (loop0): Mismatch start address, segment0(512) cp_blkaddr(605)
> F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock
> F2FS-fs (loop0): invalid crc value
> F2FS-fs
syzbot has found a reproducer for the following issue on:
HEAD commit:70d201a40823 Merge tag 'f2fs-for-6.8-rc1' of git://git.ker..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=176d9debe8
kernel config:
Reviewed-by: Daeho Jeong
On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote:
>
> We will encounter below inconsistent status when FAULT_BLKADDR type
> fault injection is on.
>
> Info: checkpoint state = d6 : nat_bits crc fsck compacted_summary
> orphan_inodes sudden-power-off
> [ASSERT]
Reviewed-by: Daeho Jeong
On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote:
>
> verify_blkaddr() will trigger panic once we inject fault into
> f2fs_is_valid_blkaddr(), fix to remove this unnecessary f2fs_bug_on().
>
> Fixes: 18792e64c86d ("f2fs: support fault injection for
>
Reviewed-by: Daeho Jeong
On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote:
>
> In reserve_compress_blocks(), we update blkaddrs of dnode in prior to
> inc_valid_block_count(), it may cause inconsistent status bewteen
> i_blocks and blkaddrs once inc_valid_block_count() fails.
>
> To fix this
On Thu, Jan 11, 2024 at 5:06 PM Chao Yu wrote:
>
> On 2024/1/12 1:15, Daeho Jeong wrote:
> > On Wed, Jan 10, 2024 at 5:33 PM Chao Yu wrote:
> >>
> >> On 2024/1/11 9:18, Daeho Jeong wrote:
> >>> On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote:
>
> From: Sheng Yong
>
>
Reviewed-by: Daeho Jeong
On Thu, Jan 11, 2024 at 9:17 AM Daeho Jeong wrote:
>
> On Wed, Jan 10, 2024 at 5:26 PM Chao Yu wrote:
> >
> > On 2024/1/11 8:55, Daeho Jeong wrote:
> > > On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote:
> > >>
> > >> If data block in compressed cluster is not persisted
Reviewed-by: Daeho Jeong
On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote:
>
> When we overwrite compressed cluster w/ normal cluster, we should
> not unlock cp_rwsem during f2fs_write_raw_pages(), otherwise data
> will be corrupted if partial blocks were persisted before CP & SPOR,
> due to
On Thu, 11 Jan 2024 at 23:12, Al Viro wrote:
>
> Where would you end up with old_dir_page != NULL and old_dir_entry == NULL?
D'oh.
You are of course right, and I missed that connection. Happily my
merge still works, just isn't as minimal as yours.
I see that Jaegeuk already posted the patch
syzbot has found a reproducer for the following issue on:
HEAD commit:70d201a40823 Merge tag 'f2fs-for-6.8-rc1' of git://git.ker..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=13973ca5e8
kernel config:
Hello,
syzbot found the following issue on:
HEAD commit:70d201a40823 Merge tag 'f2fs-for-6.8-rc1' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17e19adbe8
kernel config: https://syzkaller.appspot.com/x/.config?x=4607bc15d1c4bb90
Posted this.
https://lore.kernel.org/lkml/20240112171645.3929428-1-jaeg...@kernel.org/T/#u
On 01/12, Jaegeuk Kim wrote:
> On 01/12, Al Viro wrote:
> > On Thu, Jan 11, 2024 at 09:05:51PM -0800, Linus Torvalds wrote:
> > > On Thu, 11 Jan 2024 at 10:28, Jaegeuk Kim wrote:
> > > >
> > > >
[1] changed the below condition, which made f2fs_put_page() voided.
This patch reapplies the AL's resolution in -next from [2].
- if (S_ISDIR(old_inode->i_mode)) {
+ if (old_is_dir && old_dir != new_dir) {
old_dir_entry = f2fs_parent_dir(old_inode, _dir_page);
On 01/12, Al Viro wrote:
> On Thu, Jan 11, 2024 at 09:05:51PM -0800, Linus Torvalds wrote:
> > On Thu, 11 Jan 2024 at 10:28, Jaegeuk Kim wrote:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
> > > tags/f2fs-for-6.8-rc1
> >
> > Hmm. I got a somewhat confusing
On Wed, Jan 10, 2024 at 07:54:44PM -0800, Eric Biggers wrote:
> On Tue, Nov 21, 2023 at 02:39:05PM -0800, Eric Biggers wrote:
> > This series adds a test that verifies the on-disk format of encrypted
> > files that use a crypto data unit size that differs from the filesystem
> > block size. This
31 matches
Mail list logo