]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs: various operations on mounted fs
authorZorro Lang <zlang@redhat.com>
Wed, 14 Sep 2016 15:55:58 +0000 (23:55 +0800)
committerEryu Guan <eguan@redhat.com>
Thu, 15 Sep 2016 04:26:58 +0000 (12:26 +0800)
commit81dc4bc7280ca01f8048f7db85492c3282ed070a
tree18bc7d15365a6bf200d64b1f437da9dab631f8cd
parentf4a4c64c296e25ea5556a88fb6b11ceb542c0687
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>
tests/xfs/284 [new file with mode: 0755]
tests/xfs/284.out [new file with mode: 0644]
tests/xfs/group