summaryrefslogtreecommitdiff
path: root/tests/xfs/142
blob: 60b750edaafdd65821db3f3fd7f5bffc5123b1b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2021 Oracle.  All Rights Reserved.
#
# FS QA Test No. 142
#
# This is a regression test for commit d0c20d38af13 "xfs: fix
# xfs_bmap_validate_extent_raw when checking attr fork of rt files", which
# fixes the bmap record validator so that it will not check the attr fork
# extent mappings of a realtime file against the size of the realtime volume.

. ./common/preamble
_begin_fstest auto quick rw attr realtime

# Import common functions.
. ./common/filter

# real QA test starts here
_supported_fs xfs
_require_scratch
_require_realtime

# Format filesystem with very tiny realtime volume
_scratch_mkfs -r size=256k > $seqres.full
_scratch_mount >> $seqres.full

# Create a realtime file
$XFS_IO_PROG -f -R -c 'pwrite 0 64k' -c stat $SCRATCH_MNT/v >> $seqres.full

# Add enough xattr data to force creation of xattr blocks at a higher address
# on the data device than the size of the realtime volume
for i in `seq 0 16`; do
	$ATTR_PROG -s user.test$i $SCRATCH_MNT/v < $SCRATCH_MNT/v >> $seqres.full
done

# Force flushing extent maps to disk to trip the verifier
_scratch_cycle_mount

# Now let that unmount
echo Silence is golden.

# success, all done
status=0
exit