]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
populate: wipe external xfs log devices when restoring a cached image
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Oct 2022 01:45:33 +0000 (18:45 -0700)
committerZorro Lang <zlang@kernel.org>
Sat, 15 Oct 2022 05:04:33 +0000 (13:04 +0800)
commit3436c281c43b141af62a43e0ba766cb55087c277
tree0c9d7aa39dff0f92246b56a5855b4d8d28cd058e
parent317d1c6cd84b8f3bf61b9e2debd0d159c283388c
populate: wipe external xfs log devices when restoring a cached image

The fs population code has the ability to save cached metadumps of
filesystems to save time when running fstests.  The cached images should
be unmounted cleanly, so we never save the contents of external log
devices.

Unfortunately, the cache restore code fails to wipe the external log
when restoring a clean image, so we end up with strange test failures
because the log doesn't match the filesystem:

* ERROR: mismatched uuid in log
*            SB : 5ffec625-d3bb-4f4e-a181-1f9efe543d9c
*            log: 607bd75a-a63d-400c-8779-2139f0a3d384

Worse yet, xfs_repair will overwrite a filesystem's uuid with the log
uuid, which leads to corruption messages later on:

Metadata corruption detected at 0x561f69a9a2a8, xfs_agf block 0x8/0x1000
xfs_db: cannot init perag data (117). Continuing anyway.

Solve this by wiping the log device when restoring.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/populate