common: skip zoned devices in _require_populate_commands
PATCH 1/1 common: skip zoned devices in _require_populate_commands
mdrestore doesn't work on zoned device, so skip tests using to pre-populate a file system image.
This was previously papered over by requiring fallocate, which got removed in commit eff1baf42a79 ("common/populate: drop fallocate mode 0 requirement").
Note that the populate helpers for placement on the data device anyway, so they never exercised the rt device. Maybe we should skip them for all rt device setups and not just zoned ones to save some execution time?
--- common/populate | 4 ++++ 1 file changed, 4 insertions(+)
common/populate +4 -0
@@ -20,6 +20,10 @@ _require_populate_commands() { _require_command "$XFS_DB_PROG" "xfs_db" _require_command "$WIPEFS_PROG" "wipefs" _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore" + + # mdrestore can't restore to zoned devices + _require_non_zoned_device $SCRATCH_DEV + _require_non_zoned_device $SCRATCH_RTDEV ;; ext*) _require_command "$DUMPE2FS_PROG" "dumpe2fs"
Signature · 1 line
2.47.2
Quoted 22 lines · Christoph Hellwig
mdrestore doesn't work on zoned device, so skip tests using to pre-populate a file system image.
This was previously papered over by requiring fallocate, which got removed in commit
eff1baf42a79("common/populate: drop fallocate mode 0 requirement").Note that the populate helpers for placement on the data device anyway, so they never exercised the rt device. Maybe we should skip them for all rt device setups and not just zoned ones to save some execution time?
Signed-off-by Christoph Hellwig <[email protected]>--- common/populate | 4 ++++ 1 file changed, 4 insertions(+)common/populate +0
-0
common/populate _require_populate_commands() { · line 26
Quoted 7 lines
common/populate +4
-0@@ -20,6 +20,10 @@ _require_populate_commands() { _require_command "$XFS_DB_PROG" "xfs_db" _require_command "$WIPEFS_PROG" "wipefs" _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore" + + # mdrestore can't restore to zoned devices + _require_non_zoned_device $SCRATCH_DEV + _require_non_zoned_device $SCRATCH_RTDEV
Do you need to _notrun the other mdrestore tests too?
I was wondering why this patch didn't add a helper:
# Check if mdrestore is supported, must come after _scratch_check
_require_scratch_mdrestore() {
_require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore"
_require_non_zoned_device $SCRATCH_DEV
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
_require_non_zoned_device $SCRATCH_LOGDEV
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
_require_non_zoned_device $SCRATCH_RTDEV
}which is then pasted in everywhere?
--D
Quoted 7 lines
common/populate +0
-0;; ext*) _require_command "$DUMPE2FS_PROG" "dumpe2fs"Signature · 1 line
2.47.2
Quoted 1 line · Darrick J. Wong
Do you need to
_notrunthe other mdrestore tests too?
All the the other ones seem to just restore to files, which works.
Quoted 4 lines
I was wondering why this patch didn't add a helper:
# Check if mdrestore is supported, must come after
_scratch_check_require_scratch_mdrestore(){
That seems reasonable, I'll look into it.