generic/223: Don't clear MKFS_OPTION before calling _scratch_mkfs_geom()
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Thu, 6 Aug 2020 02:13:37 +0000 (10:13 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 9 Aug 2020 17:03:58 +0000 (01:03 +0800)
commit2aaaef91f30560688407f92dbd6688a90b99fd20
tree8719de1dcae5d8c92b44b6faf45c04739174e981
parent49ba983a76a65c93e0d379d9e6dff315d19fd0d7
generic/223: Don't clear MKFS_OPTION before calling _scratch_mkfs_geom()

Current _scratch_mkfs_geom() adds geometry parameters to the end of the
MKFS_OPTIONS blindly.  ext4 can accept the last one if geometry parameters
and original MKFS_OPTION have the same mkfs options but xfs cannot accept
them and reports "xxx option is respecified" error.  Make _scratch_mkfs_geom()
override the same mkfs options in original MKFS_OPTION by geometry parameters.

With this change, generic/223 doesn't need to clear original MKFS_OPTION
before calling _scratch_mkfs_geom() and can use other mkfs options in original
MKFS_OPTION.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/generic/223