xfs/016: calculate minimum log size and end locations
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 9 Jul 2019 17:49:47 +0000 (10:49 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sat, 13 Jul 2019 04:21:13 +0000 (12:21 +0800)
commitee3677a868200abda82857b4232454224d034420
treec736191d7b76bc67e5b4d257ea96d2ed2bd1c36d
parent241c25a975f40006547fa791531ee595f541f9d6
xfs/016: calculate minimum log size and end locations

xfs/016 looks for corruption in the log when the log wraps.  However,
it hardcodes the minimum log size and the "95%" point where it wants to
start the "nudge and check for corruption" part of the test.  New
features require larger logs, which causes the test to fail when it
can't mkfs with the smaller log size and when that 95% point doesn't put
us within 20x "_log_traffic 2"s of the end of the log.

Fix the first problem by using the new min log size helper and replace
the 95% figure with an estimate of where we need to be to guarantee that
the 20x loop wraps the log.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/016
tests/xfs/016.out