All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Fasheh <mfasheh@suse.de>
To: fstests@vger.kernel.org
Cc: Dave Chinner <david@fromorbit.com>
Subject: [PATCH] btrfs/104: replace ugly sleep with subvol sync
Date: Mon, 9 Nov 2015 16:30:02 -0800	[thread overview]
Message-ID: <20151110003002.GK15575@wotan.suse.de> (raw)

Btrfsprogs now has 'subvolume sync' which will wait until deleted subvolumes
are cleaned from disk.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
---
 tests/btrfs/104 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/btrfs/104 b/tests/btrfs/104
index 80161a3..6848b87 100644
--- a/tests/btrfs/104
+++ b/tests/btrfs/104
@@ -146,11 +146,9 @@ _scratch_remount
 # referenced above.
 _run_btrfs_util_prog subvolume delete $SCRATCH_MNT/snap1
 
-# There is no way from userspace to force btrfs_drop_snapshot to run
-# at a given time (even via mount/unmount). We must wait for it to
-# start and complete. This is the shortest time on my tests systems I
-# have found which always allows drop_snapshot to run to completion.
-sleep 45
+# Subvol delete is a delayed operation, wait for it to complete before
+# unmounting.
+_run_btrfs_util_prog subvolume sync $SCRATCH_MNT
 
 _scratch_unmount
 
-- 
2.1.2


             reply	other threads:[~2015-11-10  0:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  0:30 Mark Fasheh [this message]
2015-11-12  0:49 ` [PATCH] btrfs/104: replace ugly sleep with subvol sync Dave Chinner
2015-11-12 17:08   ` Mark Fasheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151110003002.GK15575@wotan.suse.de \
    --to=mfasheh@suse.de \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.