Skip to contentSkip to conversation

gfs2: Recognize block size in _scratch_mkfs_sized

PATCH In review Andreas Gruenbacher 2 participants 2 messages Jan 11, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs2: Recognize block size in _scratch_mkfs_sized

Fix the block size recognition logic in _scratch_mkfs_sized() to work for gfs2 as well.

---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
index cc92fe06..9d947df2 100644
@@ -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)
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Andreas Gruenbacher

Fix the block size recognition logic in _scratch_mkfs_sized() to work for gfs2 as well.

---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +0 -0
index cc92fe06..9d947df2 100644

common/rc _scratch_mkfs_sized() · line 935

Quoted 6 lines
common/rc +1 -1
@@ -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.

Thanks,
Zorro

Quoted 6 lines
common/rc +0 -0
 		;;
 	udf)
Signature · 1 line
2.43.0