diff mbox series

[04/17] common: extend the zoned device checks in _require_dm_target

Message ID 20250312064541.664334-5-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
Also check for zoned log and rt devices in _require_dm_target

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

Comments

Darrick J. Wong March 12, 2025, 8:09 p.m. UTC | #1
On Wed, Mar 12, 2025 at 07:44:56AM +0100, Christoph Hellwig wrote:
> Also check for zoned log and rt devices in _require_dm_target
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  common/rc | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index dcdfa86e43b1..753e86f91a04 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2501,6 +2501,12 @@ _require_dm_target()
>  	case $target in
>  	snapshot|thin-pool)
>  		_require_non_zoned_device ${SCRATCH_DEV}
> +	        if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then

Silly nit: -n not -b, to be consistent with the codebase?

(Doesn't really matter since _require_non_zoned_device never aborts the
test if it's fed something that isn't a block device)

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> +			_require_non_zoned_device ${SCRATCH_RTDEV}
> +		fi
> +	        if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_LOGDEV" ]; then
> +			_require_non_zoned_device ${SCRATCH_LOGDEV}
> +		fi
>  		;;
>  	esac
>  }
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index dcdfa86e43b1..753e86f91a04 100644
--- a/common/rc
+++ b/common/rc
@@ -2501,6 +2501,12 @@  _require_dm_target()
 	case $target in
 	snapshot|thin-pool)
 		_require_non_zoned_device ${SCRATCH_DEV}
+	        if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then
+			_require_non_zoned_device ${SCRATCH_RTDEV}
+		fi
+	        if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_LOGDEV" ]; then
+			_require_non_zoned_device ${SCRATCH_LOGDEV}
+		fi
 		;;
 	esac
 }