]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
common/rc: _scratch_mkfs_sized supports extra arguments
authorZorro Lang <zlang@kernel.org>
Tue, 26 Nov 2024 01:23:40 +0000 (17:23 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 28 Nov 2024 13:39:49 +0000 (21:39 +0800)
commit98a76c6c51da4b3048e491977a76fdfd27f01b6a
tree3938e923e245ba27439986f9f62a95ff4120abb2
parentf06e93a4b1afbf960c1bae00a8123062b169ab15
common/rc: _scratch_mkfs_sized supports extra arguments

To give more arguments to _scratch_mkfs_sized, we generally do as:

  MKFS_OPTIONS="-L oldlabel $MKFS_OPTIONS" _scratch_mkfs_sized $fs_size

to give "-L oldlabel" to it. But if _scratch_mkfs_sized fails, it
will get rid of the whole MKFS_OPTIONS and try to mkfs again.
Likes:

  ** mkfs failed with extra mkfs options added to "-L oldlabel -m rmapbt=1" by test 157 **
  ** attempting to mkfs using only test 157 options: -d size=524288000 -b size=4096 **

But that's not the fault of "-L oldlabel". So for keeping the mkfs
options ("-L oldlabel") we need, we'd better to let the
scratch_mkfs_sized to support extra arguments, rather than using
global MKFS_OPTIONS.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: fix string quoting issues]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc