Files
apfstests/tests/xfs/284.out
T
Zorro Lang 81dc4bc728 xfs: various operations on mounted fs
xfsprogs takes use of ustat(2) to check if a given device is
mounted, but ustat(2) is deprecated and may not be available on
newer architectures, e.g. aarch64. In such cases, xfsprogs failed to
detect mounted device, which would result in something like
xfs_mdrestore overwriting a mounted XFS.

So adding a case to do xfs_mdrestore, xfs_copy, xfs_db, mkfs and
xfs_repair against mounted XFS to make sure they refuse to do so.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-09-15 12:26:58 +08:00

9 lines
495 B
Plaintext

QA output created by 284
xfs_metadump: SCRATCH_DEV contains a mounted and writable filesystem
xfs_mdrestore: a filesystem is mounted on target device "SCRATCH_DEV", cannot restore to a mounted filesystem.
xfs_copy: a filesystem is mounted on target device "SCRATCH_DEV".
xfs_db: SCRATCH_DEV contains a mounted filesystem
mkfs.xfs: SCRATCH_DEV contains a mounted filesystem
xfs_repair: SCRATCH_DEV contains a mounted and writable filesystem
xfs_repair: SCRATCH_DEV contains a mounted filesystem