xfstests: create a test for xfs log grant head leak detection
authorBrian Foster <bfoster@redhat.com>
Tue, 17 Jun 2014 23:33:46 +0000 (09:33 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 17 Jun 2014 23:33:46 +0000 (09:33 +1000)
commitf170290a83c4471ca92afabc60a1e41ccb8495db
treeef16b0bc18340b2a357e30a3316c0f0b239a671b
parent34ff5cdfc474b485d62e8ecda66856046573e11c
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>
common/rc
tests/xfs/011 [new file with mode: 0755]
tests/xfs/011.out [new file with mode: 0644]
tests/xfs/group