From patchwork Tue Nov 10 00:30:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Fasheh X-Patchwork-Id: 7587141 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B038E9F1AF for ; Tue, 10 Nov 2015 00:30:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA5162069D for ; Tue, 10 Nov 2015 00:30:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB7D720693 for ; Tue, 10 Nov 2015 00:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752011AbbKJAaF (ORCPT ); Mon, 9 Nov 2015 19:30:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:58940 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751565AbbKJAaD (ORCPT ); Mon, 9 Nov 2015 19:30:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A0E27AABB; Tue, 10 Nov 2015 00:29:42 +0000 (UTC) Date: Mon, 9 Nov 2015 16:30:02 -0800 From: Mark Fasheh To: fstests@vger.kernel.org Cc: Dave Chinner Subject: [PATCH] btrfs/104: replace ugly sleep with subvol sync Message-ID: <20151110003002.GK15575@wotan.suse.de> Reply-To: Mark Fasheh MIME-Version: 1.0 Content-Disposition: inline Organization: SUSE Labs User-Agent: Mutt/1.5.21 (2010-09-15) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Btrfsprogs now has 'subvolume sync' which will wait until deleted subvolumes are cleaned from disk. Signed-off-by: Mark Fasheh --- 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