blob: 57a650acab8701cb6a0758c8416c4f28d88ca9b1 (
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
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022 Red Hat, Inc. All Rights Reserved.
#
# FS QA Test No. 545
#
# Create a filesystem which contains an inode with a lower number
# than the root inode. Ensure that xfsdump/xfsrestore handles this.
#
. ./common/preamble
_begin_fstest auto quick dump prealloc
# Import common functions.
. ./common/dump
_supported_fs xfs
_require_xfs_io_command "falloc"
_require_scratch
# Create a filesystem which contains a fake root inode
inums=($(_scratch_xfs_create_fake_root))
root_inum=${inums[0]}
fake_inum=${inums[1]}
# Now try a dump and restore. Cribbed from xfs/068
_create_dumpdir_stress
echo -n "Before: " >> $seqres.full
_count_dumpdir_files | tee $tmp.before >> $seqres.full
# filter out the file count, it changes as fsstress adds new operations
_do_dump_restore | sed -e "/entries processed$/s/[0-9][0-9]*/NUM/g"
echo -n "After: " >> $seqres.full
_count_restoredir_files | tee $tmp.after >> $seqres.full
diff -u $tmp.before $tmp.after
# success, all done
status=0
exit
|