xfs/449: test xfs_info on a mounted block device
PATCH 1/1 xfs/449: test xfs_info on a mounted block device
There was a bug, xfs_info fails on a mounted block device:
# xfs_info /dev/mapper/testdev xfs_info: /dev/mapper/testdev contains a mounted filesystem
fatal error -- couldn't initialize XFS library
xfsprogs has fixed it by:
bbb43745 xfs_info: use findmnt to handle mounted block devices
Signed-off-by Zorro Lang <[email protected]>
--- tests/xfs/449 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
tests/xfs/449 +9 -4
@@ -60,10 +60,15 @@ echo GROWFS >> $seqres.full cat $tmp.growfs >> $seqres.full diff -u $tmp.mkfs $tmp.growfs -$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info -echo INFO >> $seqres.full -cat $tmp.info >> $seqres.full -diff -u $tmp.mkfs $tmp.info +$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info.mnt +echo INFO_MNT >> $seqres.full +cat $tmp.info.mnt >> $seqres.full +diff -u $tmp.mkfs $tmp.info.mnt + +$XFS_INFO_PROG $SCRATCH_DEV > $tmp.info.dev +echo INFO_DEV >> $seqres.full +cat $tmp.info.dev >> $seqres.full +diff -u $tmp.mkfs $tmp.info.dev echo "Silence is golden." status=0
Signature · 1 line
2.17.2
Quoted 5 lines · Zorro Lang
There was a bug,
xfs_infofails on a mounted block device:# xfs_info /dev/mapper/testdev xfs_info: /dev/mapper/testdev contains a mounted filesystem
Quoted 7 lines
fatal error -- couldn't initialize XFS library
xfsprogs has fixed it by:
bbb43745xfs_info: use findmnt to handle mounted block devicesSigned-off-by Zorro Lang <[email protected]>
Looks ok,
Reviewed-by Darrick J. Wong <[email protected]>
--D
Quoted 31 lines
--- tests/xfs/449 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)tests/xfs/449 +9
-4@@ -60,10 +60,15 @@ echo GROWFS >> $seqres.full cat $tmp.growfs >> $seqres.full diff -u $tmp.mkfs $tmp.growfs -$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info -echo INFO >> $seqres.full -cat $tmp.info >> $seqres.full -diff -u $tmp.mkfs $tmp.info +$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info.mnt +echo INFO_MNT >> $seqres.full +cat $tmp.info.mnt >> $seqres.full +diff -u $tmp.mkfs $tmp.info.mnt + +$XFS_INFO_PROG $SCRATCH_DEV > $tmp.info.dev +echo INFO_DEV >> $seqres.full +cat $tmp.info.dev >> $seqres.full +diff -u $tmp.mkfs $tmp.info.dev echo "Silence is golden." status=0Signature · 1 line
2.17.2