Message ID | 20241231115603.1307976-1-kovalev@altlinux.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [f2fs-dev,6.1.y] f2fs: fix to do sanity check on F2FS_INLINE_DATA flag in inode during GC | expand |
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 687b2ce82c8542..8e6e91fedbf32a 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1577,6 +1577,17 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, continue; } + if (f2fs_has_inline_data(inode)) { + iput(inode); + set_sbi_flag(sbi, SBI_NEED_FSCK); + printk_ratelimited("%sF2FS-fs (%s): " + "inode %lx has both inline_data flag and " + "data block, nid=%u, ofs_in_node=%u", + KERN_INFO, sbi->sb->s_id, + inode->i_ino, dni.nid, ofs_in_node); + continue; + } + err = f2fs_gc_pinned_control(inode, gc_type, segno); if (err == -EAGAIN) { iput(inode);