mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: create a test for xfs log grant head leak detection
Changes in the XFS logging code have lead to small leaks in the log grant heads that consume log space slowly over time. Such problems have gone undetected for an unnecessarily long time due to code complexity and potential for very subtle problems. Losing only a few bytes per logged item on a reasonably large enough fs (10s of GB) means only the most continuously stressful workloads will cause a severe enough failure (deadlock due to log reservation exhaustion) quickly enough to indicate something is seriously wrong. Recent changes in XFS export the state of the various log heads through sysfs to aid in userspace/runtime analysis of the log. This test runs a workload against an XFS filesystem, quiesces the fs and verifies that the log reserve and write grant heads have not leaked any space with respect to the current head of the physical log. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
34ff5cdfc4
commit
f170290a83
@@ -1131,6 +1131,23 @@ _require_xfs_finobt()
|
||||
umount $SCRATCH_MNT
|
||||
}
|
||||
|
||||
# this test requires xfs sysfs attribute support
|
||||
#
|
||||
_require_xfs_sysfs()
|
||||
{
|
||||
attr=$1
|
||||
sysfsdir=/sys/fs/xfs
|
||||
testdev=`_short_dev $TEST_DEV`
|
||||
|
||||
if [ ! -e $sysfsdir ]; then
|
||||
_notrun "no kernel support for XFS sysfs attributes"
|
||||
fi
|
||||
|
||||
if [ ! -z $1 ] && [ ! -e $sysfsdir/$testdev/$attr ]; then
|
||||
_notrun "sysfs attribute '$attr' is not supported"
|
||||
fi
|
||||
}
|
||||
|
||||
# this test requires that external log/realtime devices are not in use
|
||||
#
|
||||
_require_nonexternal()
|
||||
|
||||
Reference in New Issue
Block a user