]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/rc: force mkfs for xfs in _mkfs_dev
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 28 Oct 2017 17:08:56 +0000 (10:08 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 3 Nov 2017 11:04:49 +0000 (19:04 +0800)
commit36ea1258684bcf0c6001493ca2f3b482dc4f6610
tree2cf7787499f67068c1804e9ce359479ac6dc4d91
parent0862b1d8b6a7c3f0087a021c0958b4bd6799879f
common/rc: force mkfs for xfs in _mkfs_dev

In generic/459, if the DISCARD of the thin device somehow fails with
this message:

device-mapper: thin: Data device (dm-1) discard unsupported: Disabling discard passdown.

Then we can end up with arbitrary gunk in the thin device.  This
causes mkfs to fail because it's afraid to format the device.  Don't
be afraid, just zap it.  FWIW mkfs.xfs thinks that the thinp device
has an xfs external log because sometimes the thinp device just
happen to be backed by the log of the previous test's scratch fs.

Fix this by making the _mkfs_dev helper always format the device,
per Eryu Guan's suggestion.

[eguan: fix subject to reflect the fix is in common/rc]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc