Revert "f2fs: fix to tag gcing flag on page during block migration"

This reverts commit 7c972c8945.

[  146.693904][ T8878] WARNING: CPU: 2 PID: 8878 at fs/f2fs/segment.c:3335 f2fs_allocate_data_block+0x130/0xd08

panic in:

f2fs_write_data_pages
 -> f2fs_write_multi_pages
  -> f2fs_write_single_data_page
   -> f2fs_do_write_data_page
    -> f2fs_outplace_write_data
     -> do_write_page
      -> f2fs_allocate_data_block

 if (from_gc) {
         f2fs_bug_on(sbi, GET_SEGNO(sbi, old_blkaddr) == NULL_SEGNO);
         se = get_seg_entry(sbi, GET_SEGNO(sbi, old_blkaddr));
         sanity_check_seg_type(sbi, se->type);
         f2fs_bug_on(sbi, IS_NODESEG(se->type));
 }

Bug: 345273844
Bug: 348080443
Change-Id: I62732bbcb37a7864588886b862b590a463b4d1d9
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit c0618d182a9cfbcfb4435de7c37ed32c44051216)
This commit is contained in:
Jaegeuk Kim 2024-06-16 07:08:25 -07:00 committed by Randall Huang
parent 55b024554a
commit 7c4e7f1885
2 changed files with 1 additions and 5 deletions

View File

@ -1034,10 +1034,8 @@ static void set_cluster_dirty(struct compress_ctx *cc)
int i; int i;
for (i = 0; i < cc->cluster_size; i++) for (i = 0; i < cc->cluster_size; i++)
if (cc->rpages[i]) { if (cc->rpages[i])
set_page_dirty(cc->rpages[i]); set_page_dirty(cc->rpages[i]);
set_page_private_gcing(cc->rpages[i]);
}
} }
static int prepare_compress_overwrite(struct compress_ctx *cc, static int prepare_compress_overwrite(struct compress_ctx *cc,

View File

@ -1327,7 +1327,6 @@ static int __clone_blkaddrs(struct inode *src_inode, struct inode *dst_inode,
} }
memcpy_page(pdst, 0, psrc, 0, PAGE_SIZE); memcpy_page(pdst, 0, psrc, 0, PAGE_SIZE);
set_page_dirty(pdst); set_page_dirty(pdst);
set_page_private_gcing(pdst);
f2fs_put_page(pdst, 1); f2fs_put_page(pdst, 1);
f2fs_put_page(psrc, 1); f2fs_put_page(psrc, 1);
@ -4061,7 +4060,6 @@ static int redirty_blocks(struct inode *inode, pgoff_t page_idx, int len)
f2fs_bug_on(F2FS_I_SB(inode), !page); f2fs_bug_on(F2FS_I_SB(inode), !page);
set_page_dirty(page); set_page_dirty(page);
set_page_private_gcing(page);
f2fs_put_page(page, 1); f2fs_put_page(page, 1);
f2fs_put_page(page, 0); f2fs_put_page(page, 0);
} }