diff mbox

xfstests: check if the scratch dev pool is mounted in _require_scratch

Message ID 20130626191804.GA20692@lenny.home.zabbo.net (mailing list archive)
State Not Applicable
Headers show

Commit Message

Zach Brown June 26, 2013, 7:18 p.m. UTC
> $SCRATCH_DEV, so anybody who wants to just use the scratch mnt with the scratch
> dev will fail to work because we never unmount the scratch mount.

Yeah, this is annoying.

> Fix this by
> checking to see if the scratch dev pool is mounted at scratch mnt and unmount it
> so we can run our test.  This fixes the issue I was seeing by running

But this fix seems bonkers.  Can we have _scratch_unmount unmount the
mountpoint instead of the device?  That's what Eric suggested when I
whined about this a while ago.

- z

index fe6bbfc..481486a 100644
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Josef Bacik June 26, 2013, 7:34 p.m. UTC | #1
On Wed, Jun 26, 2013 at 12:18:04PM -0700, Zach Brown wrote:
> > $SCRATCH_DEV, so anybody who wants to just use the scratch mnt with the scratch
> > dev will fail to work because we never unmount the scratch mount.
> 
> Yeah, this is annoying.
> 
> > Fix this by
> > checking to see if the scratch dev pool is mounted at scratch mnt and unmount it
> > so we can run our test.  This fixes the issue I was seeing by running
> 
> But this fix seems bonkers.  Can we have _scratch_unmount unmount the
> mountpoint instead of the device?  That's what Eric suggested when I
> whined about this a while ago.
> 

Well actually we probably need both, since we need callers of _scratch_umount to
actually work.  But my patch is slightly wrong, I need to be making sure the
device is actually mounted at scratch mnt before I unmount it, otherwise error
out.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/common/rc
+++ b/common/rc
@@ -280,7 +280,7 @@  _scratch_mount()
 
 _scratch_unmount()
 {
-    $UMOUNT_PROG $SCRATCH_DEV
+    $UMOUNT_PROG $SCRATCH_MNT
 }
 
 _scratch_remount()