diff mbox series

gfs2: Recognize block size in _scratch_mkfs_sized

Message ID 20240111152730.4339-1-agruenba@redhat.com (mailing list archive)
State New, archived
Headers show
Series gfs2: Recognize block size in _scratch_mkfs_sized | expand

Commit Message

Andreas Gruenbacher Jan. 11, 2024, 3:27 p.m. UTC
Fix the block size recognition logic in _scratch_mkfs_sized() to work
for gfs2 as well.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zorro Lang Jan. 11, 2024, 8:40 p.m. UTC | #1
On Thu, Jan 11, 2024 at 04:27:30PM +0100, Andreas Gruenbacher wrote:
> Fix the block size recognition logic in _scratch_mkfs_sized() to work
> for gfs2 as well.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index cc92fe06..9d947df2 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -931,7 +931,7 @@ _scratch_mkfs_sized()
>  	btrfs)
>  		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-s ?+([0-9]+).*/\1/p'`
>  		;;
> -	ext2|ext3|ext4|ext4dev|reiser4|ocfs2|reiserfs)
> +	ext2|ext3|ext4|ext4dev|reiser4|ocfs2|reiserfs|gfs2)
>  		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`

OK, by checking the mkfs.gfs2 manual, it really uses "-b <BlockSize>" to specify
a blocksize. So this fix makes sense to me.

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

Thanks,
Zorro

>  		;;
>  	udf)
> -- 
> 2.43.0
> 
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index cc92fe06..9d947df2 100644
--- a/common/rc
+++ b/common/rc
@@ -931,7 +931,7 @@  _scratch_mkfs_sized()
 	btrfs)
 		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-s ?+([0-9]+).*/\1/p'`
 		;;
-	ext2|ext3|ext4|ext4dev|reiser4|ocfs2|reiserfs)
+	ext2|ext3|ext4|ext4dev|reiser4|ocfs2|reiserfs|gfs2)
 		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
 		;;
 	udf)