public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* finishe xfstests support for zoned XFS
@ 2025-05-01 13:38 Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 1/4] xfs: check for zoned-specific errors in _try_scratch_mkfs_xfs Christoph Hellwig
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-01 13:38 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J. Wong, Hans Holmberg, fstests, linux-xfs

Hi all,

this series adds the remaining core bits to support zoned XFS file
systems, to go along with the kernel code in 6.15-rc and the xfsprogs
series on the list.  It does not include several newly developed
test cases which will be sent separately.

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

* [PATCH 1/4] xfs: check for zoned-specific errors in _try_scratch_mkfs_xfs
  2025-05-01 13:38 finishe xfstests support for zoned XFS Christoph Hellwig
@ 2025-05-01 13:38 ` Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 2/4] common: notrun in mkfs_dev for too small zoned file systems Christoph Hellwig
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-01 13:38 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J. Wong, Hans Holmberg, fstests, linux-xfs

Check for a few errors issued for unsupported zoned configurations in
_try_scratch_mkfs_xfs so that the test is not run instead of failed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/xfs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/xfs b/common/xfs
index 96c15f3c7bb0..39650bac6c23 100644
--- a/common/xfs
+++ b/common/xfs
@@ -160,6 +160,11 @@ _try_scratch_mkfs_xfs()
 
 	grep -q crc=0 $tmp.mkfsstd && _force_xfsv4_mount_options
 
+	grep -q "zoned file systems do not support" $tmp.mkfserr && \
+		_notrun "Not supported on zoned file systems"
+	grep -q "must be greater than the minimum zone count" $tmp.mkfserr && \
+		_notrun "Zone count too small"
+
 	if [ $mkfs_status -eq 0 -a "$LARGE_SCRATCH_DEV" = yes ]; then
 		# manually parse the mkfs output to get the fs size in bytes
 		local fs_size
-- 
2.47.2


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

* [PATCH 2/4] common: notrun in mkfs_dev for too small zoned file systems
  2025-05-01 13:38 finishe xfstests support for zoned XFS Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 1/4] xfs: check for zoned-specific errors in _try_scratch_mkfs_xfs Christoph Hellwig
@ 2025-05-01 13:38 ` Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 3/4] common: support internal RT device in _require_realtime Christoph Hellwig
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-01 13:38 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J. Wong, Hans Holmberg, fstests, linux-xfs

Similar to the regular scratch_mkfs, skip the test if the file system
would be so small that there's not enough zones.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/rc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/rc b/common/rc
index 9bed6dad9303..f9ffe2d279bc 100644
--- a/common/rc
+++ b/common/rc
@@ -906,6 +906,10 @@ _mkfs_dev()
 {
     local tmp=`mktemp -u`
     if ! _try_mkfs_dev "$@" 2>$tmp.mkfserr 1>$tmp.mkfsstd; then
+	grep -q "must be greater than the minimum zone count" $tmp.mkfserr && \
+		_notrun "Zone count too small"
+	grep -q "too small for zoned allocator" $tmp.mkfserr && \
+		_notrun "Zone count too small"
 	# output stored mkfs output
 	cat $tmp.mkfserr >&2
 	cat $tmp.mkfsstd
-- 
2.47.2


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

* [PATCH 3/4] common: support internal RT device in _require_realtime
  2025-05-01 13:38 finishe xfstests support for zoned XFS Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 1/4] xfs: check for zoned-specific errors in _try_scratch_mkfs_xfs Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 2/4] common: notrun in mkfs_dev for too small zoned file systems Christoph Hellwig
@ 2025-05-01 13:38 ` Christoph Hellwig
  2025-05-01 13:38 ` [PATCH 4/4] common: support internal RT devices in scratch_mkfs_sized Christoph Hellwig
  2025-05-01 15:02 ` finishe xfstests support for zoned XFS Darrick J. Wong
  4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-01 13:38 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J. Wong, Hans Holmberg, fstests, linux-xfs

If SCRATCH_DEV is a zoned device it implies an internal zoned RT device
and should not be skipped in _require_realtime.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/rc | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/common/rc b/common/rc
index f9ffe2d279bc..b174d77a75da 100644
--- a/common/rc
+++ b/common/rc
@@ -2351,10 +2351,15 @@ _require_no_large_scratch_dev()
 #
 _require_realtime()
 {
-    [ "$USE_EXTERNAL" = yes ] || \
-	_notrun "External volumes not in use, skipped this test"
-    [ "$SCRATCH_RTDEV" = "" ] && \
-	_notrun "Realtime device required, skipped this test"
+	local zone_type=`_zone_type $SCRATCH_DEV`
+	if [ "${zone_type}" = "none" ]; then
+		if [ "$USE_EXTERNAL" != "yes" ]; then
+			_notrun "External volumes not in use, skipped this test"
+		fi
+		if [ "$SCRATCH_RTDEV" = "" ]; then
+			_notrun "Realtime device required, skipped this test"
+		fi
+	fi
 }
 
 # This test requires that a realtime subvolume is not in use
-- 
2.47.2


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

* [PATCH 4/4] common: support internal RT devices in scratch_mkfs_sized
  2025-05-01 13:38 finishe xfstests support for zoned XFS Christoph Hellwig
                   ` (2 preceding siblings ...)
  2025-05-01 13:38 ` [PATCH 3/4] common: support internal RT device in _require_realtime Christoph Hellwig
@ 2025-05-01 13:38 ` Christoph Hellwig
  2025-05-01 15:02 ` finishe xfstests support for zoned XFS Darrick J. Wong
  4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-01 13:38 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J. Wong, Hans Holmberg, fstests, linux-xfs

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/rc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/common/rc b/common/rc
index b174d77a75da..6176859a8db8 100644
--- a/common/rc
+++ b/common/rc
@@ -1267,6 +1267,7 @@ _try_scratch_mkfs_sized()
 	case $FSTYP in
 	xfs)
 		local rt_ops
+		local zone_type=`_zone_type $SCRATCH_DEV`
 
 		if [ -b "$SCRATCH_RTDEV" ]; then
 			local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV`
@@ -1274,6 +1275,12 @@ _try_scratch_mkfs_sized()
 				_notrun "Scratch rt device too small"
 			fi
 			rt_ops="-r size=$fssize"
+		elif [ "${zone_type}" != "none" ] ||
+		     [[ $MKFS_OPTIONS =~ "zoned=1" ]]; then
+			# Maybe also add back the size check, but it'll require
+			# somewhat complicated arithmetics for the size of the
+			# conventional zones
+			rt_ops="-r size=$fssize"
 		fi
 
 		# don't override MKFS_OPTIONS that set a block size.
-- 
2.47.2


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

* Re: finishe xfstests support for zoned XFS
  2025-05-01 13:38 finishe xfstests support for zoned XFS Christoph Hellwig
                   ` (3 preceding siblings ...)
  2025-05-01 13:38 ` [PATCH 4/4] common: support internal RT devices in scratch_mkfs_sized Christoph Hellwig
@ 2025-05-01 15:02 ` Darrick J. Wong
  4 siblings, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2025-05-01 15:02 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Hans Holmberg, fstests, linux-xfs

On Thu, May 01, 2025 at 08:38:54AM -0500, Christoph Hellwig wrote:
> Hi all,
> 
> this series adds the remaining core bits to support zoned XFS file
> systems, to go along with the kernel code in 6.15-rc and the xfsprogs
> series on the list.  It does not include several newly developed
> test cases which will be sent separately.

The series looks ok (by which I mean I've been running this for weeks
with no issues) so
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 13:38 finishe xfstests support for zoned XFS Christoph Hellwig
2025-05-01 13:38 ` [PATCH 1/4] xfs: check for zoned-specific errors in _try_scratch_mkfs_xfs Christoph Hellwig
2025-05-01 13:38 ` [PATCH 2/4] common: notrun in mkfs_dev for too small zoned file systems Christoph Hellwig
2025-05-01 13:38 ` [PATCH 3/4] common: support internal RT device in _require_realtime Christoph Hellwig
2025-05-01 13:38 ` [PATCH 4/4] common: support internal RT devices in scratch_mkfs_sized Christoph Hellwig
2025-05-01 15:02 ` finishe xfstests support for zoned XFS Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox