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

!14180 xfs: allow inode inactivation during a ro mount log recovery

parents 3b65d856 a4451ac4
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1841,8 +1841,11 @@ xfs_inode_needs_inactive(
	if (VFS_I(ip)->i_mode == 0)
		return false;

	/* If this is a read-only mount, don't do this (would generate I/O) */
	if (xfs_is_readonly(mp))
	/*
	 * If this is a read-only mount, don't do this (would generate I/O)
	 * unless we're in log recovery and cleaning the iunlinked list.
	 */
	if (xfs_is_readonly(mp) && !xlog_recovery_needed(mp->m_log))
		return false;

	/* If the log isn't running, push inodes straight to reclaim. */
@@ -1902,8 +1905,11 @@ xfs_inactive(
	mp = ip->i_mount;
	ASSERT(!xfs_iflags_test(ip, XFS_IRECOVERY));

	/* If this is a read-only mount, don't do this (would generate I/O) */
	if (xfs_is_readonly(mp))
	/*
	 * If this is a read-only mount, don't do this (would generate I/O)
	 * unless we're in log recovery and cleaning the iunlinked list.
	 */
	if (xfs_is_readonly(mp) && !xlog_recovery_needed(mp->m_log))
		goto out;

	/* Metadata inodes require explicit resource cleanup. */