Unverified Commit 58befe88 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3608 xfs: fix two corruption problems

Merge Pull Request from: @ci-robot 
 
PR sync from: Long Li <leo.lilong@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3ZFO5ZYSSQSLRAYV5IYBTE4PFFUQJAP3/ 
This patch set fix two corruption problems:

Long Li (1):
  xfs: shutdown to ensure submits buffers on LSN boundaries

yangerkun (1):
  xfs: shutdown xfs once inode double free


-- 
2.31.1
 
https://gitee.com/openeuler/kernel/issues/I8RN63
https://gitee.com/openeuler/kernel/issues/I8RNQD 
 
Link:https://gitee.com/openeuler/kernel/pulls/3608

 

Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents f31cd96b 604f2bd6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1970,7 +1970,11 @@ xfs_difree_inobt(
	 */
	off = agino - rec.ir_startino;
	ASSERT(off >= 0 && off < XFS_INODES_PER_CHUNK);
	ASSERT(!(rec.ir_free & XFS_INOBT_MASK(off)));

	if (XFS_IS_CORRUPT(mp, rec.ir_free & XFS_INOBT_MASK(off))) {
		error = -EFSCORRUPTED;
		goto error0;
	}
	/*
	 * Mark the inode free & increment the count.
	 */
+5 −1
Original line number Diff line number Diff line
@@ -3220,8 +3220,12 @@ xlog_do_recovery_pass(
	 * Submit buffers that have been added from the last record processed,
	 * regardless of error status.
	 */
	if (!list_empty(&buffer_list))
	if (!list_empty(&buffer_list)) {
		if (error)
			xfs_force_shutdown(log->l_mp, SHUTDOWN_META_IO_ERROR);

		error2 = xfs_buf_delwri_submit(&buffer_list);
	}

	if (error && first_bad)
		*first_bad = rhead_blk;