Skip to content

Commit 5b55cbc

Browse files
Dave Chinnerdchinner
authored andcommitted
xfs: don't assert fail on perag references on teardown
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@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
1 parent 5672225 commit 5b55cbc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/xfs/libxfs/xfs_ag.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ __xfs_free_perag(
173173
struct xfs_perag *pag = container_of(head, struct xfs_perag, rcu_head);
174174

175175
ASSERT(!delayed_work_pending(&pag->pag_blockgc_work));
176-
ASSERT(atomic_read(&pag->pag_ref) == 0);
177176
kmem_free(pag);
178177
}
179178

@@ -192,7 +191,7 @@ xfs_free_perag(
192191
pag = radix_tree_delete(&mp->m_perag_tree, agno);
193192
spin_unlock(&mp->m_perag_lock);
194193
ASSERT(pag);
195-
ASSERT(atomic_read(&pag->pag_ref) == 0);
194+
XFS_IS_CORRUPT(pag->pag_mount, atomic_read(&pag->pag_ref) != 0);
196195

197196
cancel_delayed_work_sync(&pag->pag_blockgc_work);
198197
xfs_iunlink_destroy(pag);

0 commit comments

Comments
 (0)