mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs: fix test failures after commit 27d077ec0b
Commit 27d077ec0b (common: use mount/umount helpers everywhere) made
a few btrfs tests fail (btrfs/003 and btrfs/011). These tests create
filesystems with multiple devices and test the device replace feature,
which need to unmount using the mount path ($SCRATCH_MNT) because
unmounting using one of the devices as an argument ($SCRATCH_DEV) does
not always work - after replace operations we get in /proc/mounts a
device other than $SCRATCH_DEV associated with the mount point
$SCRATCH_MNT (this is mentioned in a comment at btrfs/011 for example),
so we need to pass that other device to the umount program or pass it the
mount point.
Fix this by making _sctatch_unmount() pass $SCRATCH_MNT to umount instead
of $SCRATCH_DEV (when the filesystem being tested is btrfs).
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
042dad6267
commit
c327d5a637
@@ -316,11 +316,17 @@ _scratch_mount()
|
|||||||
|
|
||||||
_scratch_unmount()
|
_scratch_unmount()
|
||||||
{
|
{
|
||||||
if [ "$FSTYP" == "overlay" ]; then
|
case "$FSTYP" in
|
||||||
|
overlay)
|
||||||
_overlay_scratch_unmount
|
_overlay_scratch_unmount
|
||||||
else
|
;;
|
||||||
|
btrfs)
|
||||||
|
$UMOUNT_PROG $SCRATCH_MNT
|
||||||
|
;;
|
||||||
|
*)
|
||||||
$UMOUNT_PROG $SCRATCH_DEV
|
$UMOUNT_PROG $SCRATCH_DEV
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_scratch_remount()
|
_scratch_remount()
|
||||||
|
|||||||
Reference in New Issue
Block a user