generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / xfs / 095
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 095
6 #
7 # Test upgrading the XFS log to v2
8 #
9 . ./common/preamble
10 _begin_fstest log v2log auto
11
12 # Import common functions.
13 . ./common/filter
14 . ./common/log
15
16 # real QA test starts here
17
18 # Modify as appropriate.
19 _supported_fs xfs
20 _require_scratch
21 _require_v2log
22
23 if [ "$(blockdev --getss $SCRATCH_DEV)" != "512" ]; then
24         _notrun "need 512b sector size"
25 fi
26
27 export MOUNT_OPTIONS="-o logbsize=64k"
28
29 # try and mount a v1 log with a v2 LRsize
30 # expect failure
31 _mkfs_log "-l version=1 -m crc=0 -d sectsize=512"
32 _scratch_xfs_db -c 'version' | tr ',' '\n' | grep LOGV2
33 _create_log
34
35 # now make the fs a v2 fs and try to mount again
36 # it should succeed this time
37 _scratch_xfs_db -x -c 'version log2' | tr ',' '\n' | grep LOGV2
38 _create_log
39
40 # success, all done
41 status=0
42 exit