Patch "xfs: don't assert fail on perag references on teardown" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xfs: don't assert fail on perag references on teardown

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-don-t-assert-fail-on-perag-references-on-teardown.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From stable-owner@xxxxxxxxxxxxxxx Sat Mar 18 11:15:45 2023
From: Amir Goldstein <amir73il@xxxxxxxxx>
Date: Sat, 18 Mar 2023 12:15:15 +0200
Subject: xfs: don't assert fail on perag references on teardown
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Sasha Levin <sashal@xxxxxxxxxx>, "Darrick J . Wong" <djwong@xxxxxxxxxx>, Leah Rumancik <leah.rumancik@xxxxxxxxx>, Chandan Babu R <chandan.babu@xxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, Dave Chinner <dchinner@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>
Message-ID: <20230318101529.1361673-2-amir73il@xxxxxxxxx>

From: Dave Chinner <dchinner@xxxxxxxxxx>

commit 5b55cbc2d72632e874e50d2e36bce608e55aaaea upstream.

[backport for 5.10.y, prior to perag refactoring in v5.14]

Not fatal, the assert is there to catch developer attention. I'm
seeing this occasionally during recoveryloop testing after a
shutdown, and I don't want this to stop an overnight recoveryloop
run as it is currently doing.

Convert the ASSERT to a XFS_IS_CORRUPT() check so it will dump a
corruption report into the log and cause a test failure that way,
but it won't stop the machine dead.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/xfs/xfs_mount.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -126,7 +126,6 @@ __xfs_free_perag(
 {
 	struct xfs_perag *pag = container_of(head, struct xfs_perag, rcu_head);
 
-	ASSERT(atomic_read(&pag->pag_ref) == 0);
 	kmem_free(pag);
 }
 
@@ -145,7 +144,7 @@ xfs_free_perag(
 		pag = radix_tree_delete(&mp->m_perag_tree, agno);
 		spin_unlock(&mp->m_perag_lock);
 		ASSERT(pag);
-		ASSERT(atomic_read(&pag->pag_ref) == 0);
+		XFS_IS_CORRUPT(pag->pag_mount, atomic_read(&pag->pag_ref) != 0);
 		xfs_iunlink_destroy(pag);
 		xfs_buf_hash_destroy(pag);
 		call_rcu(&pag->rcu_head, __xfs_free_perag);


Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are

queue-5.10/xfs-fallocate-should-call-file_modified.patch
queue-5.10/attr-add-setattr_should_drop_sgid.patch
queue-5.10/xfs-set-prealloc-flag-in-xfs_alloc_file_space.patch
queue-5.10/xfs-purge-dquots-after-inode-walk-fails-during-quotacheck.patch
queue-5.10/fs-use-consistent-setgid-checks-in-is_sxid.patch
queue-5.10/xfs-remove-xfs_prealloc_sync.patch
queue-5.10/attr-add-in_group_or_capable.patch
queue-5.10/xfs-don-t-assert-fail-on-perag-references-on-teardown.patch
queue-5.10/xfs-don-t-leak-btree-cursor-when-insrec-fails-after-a-split.patch
queue-5.10/fs-move-s_isgid-stripping-into-the-vfs_-helpers.patch
queue-5.10/xfs-remove-xfs_setattr_time-declaration.patch
queue-5.10/fs-move-should_remove_suid.patch
queue-5.10/attr-use-consistent-sgid-stripping-checks.patch
queue-5.10/fs-add-mode_strip_sgid-helper.patch
queue-5.10/xfs-use-setattr_copy-to-set-vfs-inode-attributes.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux