diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-04-27 21:08:33 -0700 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2021-05-09 22:37:50 +0800 |
commit | 2837d7c32d701310e663c66b5fb2b4cdad686763 (patch) | |
tree | aae33d04b051137dbf91462e1cda09111481c8a8 /common | |
parent | 05dc92277171ef01f6a55ac193df8eb067c779b9 (diff) |
xfs: test upgrading filesystem to bigtime
Test that we can upgrade an existing filesystem to use bigtime.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com> (xfs/908 only)
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/xfs | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1185,3 +1185,19 @@ _xfs_timestamp_range() awk '{printf("%s %s", $1, $2);}' fi } + +# Require that the scratch device exists, that mkfs can format with bigtime +# enabled, that the kernel can mount such a filesystem, and that xfs_info +# advertises the presence of that feature. +_require_scratch_xfs_bigtime() +{ + _require_scratch + + _scratch_mkfs -m bigtime=1 &>/dev/null || \ + _notrun "mkfs.xfs doesn't support bigtime feature" + _try_scratch_mount || \ + _notrun "kernel doesn't support xfs bigtime feature" + $XFS_INFO_PROG "$SCRATCH_MNT" | grep -q -w "bigtime=1" || \ + _notrun "bigtime feature not advertised on mount?" + _scratch_unmount +} |