Thread (17 messages) 17 messages, 3 authors, 2021-08-16
STALE1761d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]

[PATCH v2 2/8] common/rc: fix blocksize detection for btrfs

From: Naohiro Aota <naohiro.aota@wdc.com>
Date: 2021-08-11 15:13:03
Also in: fstests
Subsystem: the rest · Maintainer: Linus Torvalds

Mkfs.btrfs's "-b" does not specify the block size but the file system size.
Use "-s" to detect it instead.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 common/rc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 4cb062e2fd3f..7b80820ff680 100644
--- a/common/rc
+++ b/common/rc
@@ -978,7 +978,10 @@ _scratch_mkfs_sized()
 	xfs)
 		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
 		;;
-	ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|ocfs2|reiserfs)
+	btrfs)
+		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-s ?+([0-9]+).*/\1/p'`
+		;;
+	ext2|ext3|ext4|ext4dev|udf|reiser4|ocfs2|reiserfs)
 		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
 		;;
 	jfs)
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help