public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Su Yue <glass.su@suse.com>
To: fstests@vger.kernel.org
Cc: linux-bcachefs@vger.kernel.org, l@damenly.org,
	bfoster@redhat.com, Su Yue <glass.su@suse.com>
Subject: [PATCH v2 2/2] common/rc: improve block size support for bcachefs
Date: Wed, 17 Jan 2024 17:23:09 +0800	[thread overview]
Message-ID: <20240117092309.1134595-2-glass.su@suse.com> (raw)
In-Reply-To: <20240117092309.1134595-1-glass.su@suse.com>

For bcachefs, def_blksz is never assigned even MKFS_OPTIONS contains option
'--block_size'. So block size of bcachefs on scratch dev is always 4096
if _scratch_mkfs_sized is called without second parameter.

Add the pattern to set def_blksz if '--block_size' is given in MKFS_OPTIONS.

Signed-off-by: Su Yue <glass.su@suse.com>
---
changelog:
v2:
    Born.
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/rc b/common/rc
index 31c21d2a8360..6a01de69cf05 100644
--- a/common/rc
+++ b/common/rc
@@ -950,6 +950,9 @@ _scratch_mkfs_sized()
 	jfs)
 		def_blksz=4096
 		;;
+	bcachefs)
+		def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*(--block_size)[ =]?+([0-9]+).*/\2/p'`
+		;;
 	esac
 
 	[ -n "$def_blksz" ] && blocksize=$def_blksz
-- 
2.43.0


  reply	other threads:[~2024-01-17  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17  9:23 [PATCH v2 1/2] fstests: introduce MKFS_BCACHEFS_PROG for bcachefs Su Yue
2024-01-17  9:23 ` Su Yue [this message]
2024-01-17 17:55   ` [PATCH v2 2/2] common/rc: improve block size support " Brian Foster
2024-01-18  2:59     ` Su Yue
2024-01-19 16:09       ` Brian Foster
2024-01-21  4:00         ` Su Yue
2024-01-22 15:20           ` Brian Foster
2024-01-25  2:10             ` Su Yue
2024-01-26 13:40               ` Brian Foster
2024-01-17 17:54 ` [PATCH v2 1/2] fstests: introduce MKFS_BCACHEFS_PROG " Brian Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240117092309.1134595-2-glass.su@suse.com \
    --to=glass.su@suse.com \
    --cc=bfoster@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=l@damenly.org \
    --cc=linux-bcachefs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox