summaryrefslogtreecommitdiff
path: root/common/xfs
diff options
context:
space:
mode:
authorHironori Shiina <shiina.hironori@gmail.com>2022-10-17 11:11:51 -0400
committerZorro Lang <zlang@kernel.org>2022-10-27 23:31:15 +0800
commit1ffa16c57368127e387b474c57b2cc801a98aec7 (patch)
treeb7543c0d33100da44e7292c8ba2015702957a970 /common/xfs
parenta75c5f50584e03ca7862ad51f48efd2d524d1dc5 (diff)
xfs: test for fixing wrong root inode number in dump
Test '-x' option of xfsrestore. With this option, a wrong root inode number in a dump file is corrected. A root inode number can be wrong in a dump created by problematic xfsdump (v3.1.7 - v3.1.9) with bulkstat misuse. In this test, a corrupted dump file is created by overwriting a root inode number in a header. Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Hironori Shiina <shiina.hironori@fujitsu.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'common/xfs')
-rw-r--r--common/xfs6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/xfs b/common/xfs
index e1c15d3d..8334880e 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1402,3 +1402,9 @@ _xfs_filter_mkfs()
print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n";
}'
}
+
+_require_xfsrestore_xflag()
+{
+ $XFSRESTORE_PROG -h 2>&1 | grep -q -e '-x' || \
+ _notrun 'xfsrestore does not support -x flag.'
+}