aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-07-03 10:03:38 -0700
committerZorro Lang <zlang@kernel.org>2023-07-07 22:04:27 +0800
commit2fc1f5dc90f497bf971024c2b160f8ca6e4ed59a (patch)
treed22586143ff62fd1a0aa1c45dd1425527853d58a
parente7006c6dc1c2ec0259582dd76afb088a7769546f (diff)
downloadxfstests-dev-2fc1f5dc90f497bf971024c2b160f8ca6e4ed59a.tar.gz
xfs/529: fix bogus failure when realtime is configured
If I have a realtime volume configured, this test will sometimes trip over this: XFS: Assertion failed: nmaps == 1, file: fs/xfs/xfs_dquot.c, line: 360 Call Trace: xfs_dquot_disk_alloc+0x3dc/0x400 [xfs 97e1fa8953d397b1fb9732df4de7fa9070bda501] xfs_qm_dqread+0xc9/0x190 [xfs 97e1fa8953d397b1fb9732df4de7fa9070bda501] xfs_qm_dqget+0xa8/0x230 [xfs 97e1fa8953d397b1fb9732df4de7fa9070bda501] xfs_qm_vop_dqalloc+0x160/0x600 [xfs 97e1fa8953d397b1fb9732df4de7fa9070bda501] xfs_setattr_nonsize+0x318/0x520 [xfs 97e1fa8953d397b1fb9732df4de7fa9070bda501] notify_change+0x30e/0x490 chown_common+0x13e/0x1f0 do_fchownat+0x8d/0xe0 __x64_sys_fchownat+0x1b/0x20 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fa6985e2cae The test injects the bmap_alloc_minlen_extent error, which refuses to allocate file space unless it's exactly minlen long. However, a precondition of this injection point is that the free space on the data device must be sufficiently fragmented that there are small free extents. However, if realtime and rtinherit are enabled, the punch-alternating call will operate on a realtime file, which only serves to write 0x55 patterns into the realtime bitmap. Hence the test preconditions are not satisfied, so the test is not serving its purpose. Fix it by disabling rtinherit=1 on the rootdir so that we actually fragment the bnobt/cntbt as required. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/xfs/5294
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/xfs/529 b/tests/xfs/529
index 83d24da0ac..cd176877f5 100755
--- a/tests/xfs/529
+++ b/tests/xfs/529
@@ -32,6 +32,10 @@ echo "Format and mount fs"
_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full
_scratch_mount -o uquota >> $seqres.full
+# bmap_alloc_minlen_extent only applies to the datadev space allocator, so
+# we force the filesystem not to use the realtime volume.
+_xfs_force_bdev data $SCRATCH_MNT
+
bsize=$(_get_file_block_size $SCRATCH_MNT)
echo "* Delalloc to written extent conversion"