diff mbox series

[06/17] common: support internal RT device in _require_realtime

Message ID 20250312064541.664334-7-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/17] xfs/177: force a small file system size | expand

Commit Message

Christoph Hellwig March 12, 2025, 6:44 a.m. UTC
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(-)

Comments

Darrick J. Wong March 12, 2025, 8:12 p.m. UTC | #1
On Wed, Mar 12, 2025 at 07:44:58AM +0100, Christoph Hellwig wrote:
> If SCRATCH_DEV is a zoned device it implies an internal zoned RT device
> and should not be skipped in _require_realtime.

/methinks that should be a comment in the code itself.

> Signed-off-by: Christoph Hellwig <hch@lst.de>

With that changed,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  common/rc | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index b0131526380a..00a315db0fe7 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2354,10 +2354,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.45.2
> 
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index b0131526380a..00a315db0fe7 100644
--- a/common/rc
+++ b/common/rc
@@ -2354,10 +2354,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