linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] common: skip zoned devices in _require_populate_commands
@ 2025-05-12 13:18 Christoph Hellwig
  2025-05-12 15:08 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2025-05-12 13:18 UTC (permalink / raw)
  To: zlang; +Cc: djwong, hans.holmberg, linux-xfs, fstests

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 <hch@lst.de>
---
 common/populate | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/populate b/common/populate
index 50dc75d35259..6190eac7ad83 100644
--- a/common/populate
+++ b/common/populate
@@ -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"
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] common: skip zoned devices in _require_populate_commands
  2025-05-12 13:18 [PATCH] common: skip zoned devices in _require_populate_commands Christoph Hellwig
@ 2025-05-12 15:08 ` Darrick J. Wong
  2025-05-12 15:27   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2025-05-12 15:08 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, hans.holmberg, linux-xfs, fstests

On Mon, May 12, 2025 at 03:18:19PM +0200, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---
>  common/populate | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/common/populate b/common/populate
> index 50dc75d35259..6190eac7ad83 100644
> --- a/common/populate
> +++ b/common/populate
> @@ -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


>  		;;
>  	ext*)
>  		_require_command "$DUMPE2FS_PROG" "dumpe2fs"
> -- 
> 2.47.2
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] common: skip zoned devices in _require_populate_commands
  2025-05-12 15:08 ` Darrick J. Wong
@ 2025-05-12 15:27   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-05-12 15:27 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, zlang, hans.holmberg, linux-xfs, fstests

On Mon, May 12, 2025 at 08:08:24AM -0700, Darrick J. Wong wrote:
> Do you need to _notrun the other mdrestore tests too?

All the the other ones seem to just restore to files, which works.

> 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-12 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 13:18 [PATCH] common: skip zoned devices in _require_populate_commands Christoph Hellwig
2025-05-12 15:08 ` Darrick J. Wong
2025-05-12 15:27   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).