diff mbox series

[1/2] common: make rt_ops local in _try_scratch_mkfs_sized

Message ID 20241008105055.11928-2-hans.holmberg@wdc.com (mailing list archive)
State New
Headers show
Series _scratch_mkfs_sized fixes for xfs rt devices | expand

Commit Message

Hans Holmberg Oct. 8, 2024, 10:52 a.m. UTC
From: Hans Holmberg <Hans.Holmberg@wdc.com>

If we call _try_scratch_mkfs_size with $SCRATCH_RTDEV set followed by
a call with $SCRATCH_RTDEV cleared, rt_ops will have stale size
parameters that will cause mkfs.xfs to fail with:
"size specified for non-existent rt subvolume"

Make rt_ops local to fix this.

Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/rc | 1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Oct. 8, 2024, 11:34 a.m. UTC | #1
On Tue, Oct 08, 2024 at 10:52:04AM +0000, Hans Holmberg wrote:
> From: Hans Holmberg <Hans.Holmberg@wdc.com>
> 
> If we call _try_scratch_mkfs_size with $SCRATCH_RTDEV set followed by
> a call with $SCRATCH_RTDEV cleared, rt_ops will have stale size
> parameters that will cause mkfs.xfs to fail with:
> "size specified for non-existent rt subvolume"
> 
> Make rt_ops local to fix this.
> 
> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Note that the signoff here and for the next patch was just due to
me applying it to my staging tree.  For submission feel free to turn
this into:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Darrick J. Wong Oct. 8, 2024, 5:02 p.m. UTC | #2
On Tue, Oct 08, 2024 at 10:52:04AM +0000, Hans Holmberg wrote:
> From: Hans Holmberg <Hans.Holmberg@wdc.com>
> 
> If we call _try_scratch_mkfs_size with $SCRATCH_RTDEV set followed by
> a call with $SCRATCH_RTDEV cleared, rt_ops will have stale size
> parameters that will cause mkfs.xfs to fail with:
> "size specified for non-existent rt subvolume"
> 
> Make rt_ops local to fix this.
> 
> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

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

--D

> ---
>  common/rc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/rc b/common/rc
> index 35738d7b6bf3..c9aae1ad0b90 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1030,6 +1030,7 @@ _try_scratch_mkfs_sized()
>  	local blocksize=$2
>  	local def_blksz
>  	local blocksize_opt
> +	local rt_ops
>  
>  	case $FSTYP in
>  	xfs)
> -- 
> 2.34.1
>
Zorro Lang Oct. 10, 2024, 6:58 a.m. UTC | #3
On Tue, Oct 08, 2024 at 10:52:04AM +0000, Hans Holmberg wrote:
> From: Hans Holmberg <Hans.Holmberg@wdc.com>
> 
> If we call _try_scratch_mkfs_size with $SCRATCH_RTDEV set followed by
> a call with $SCRATCH_RTDEV cleared, rt_ops will have stale size
> parameters that will cause mkfs.xfs to fail with:
> "size specified for non-existent rt subvolume"
> 
> Make rt_ops local to fix this.

Hahahha, local and export issue again :)

Reviewed-by: Zorro Lang <zlang@redhat.com>

> 
> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  common/rc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/rc b/common/rc
> index 35738d7b6bf3..c9aae1ad0b90 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1030,6 +1030,7 @@ _try_scratch_mkfs_sized()
>  	local blocksize=$2
>  	local def_blksz
>  	local blocksize_opt
> +	local rt_ops
>  
>  	case $FSTYP in
>  	xfs)
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 35738d7b6bf3..c9aae1ad0b90 100644
--- a/common/rc
+++ b/common/rc
@@ -1030,6 +1030,7 @@  _try_scratch_mkfs_sized()
 	local blocksize=$2
 	local def_blksz
 	local blocksize_opt
+	local rt_ops
 
 	case $FSTYP in
 	xfs)