From patchwork Wed Dec 23 04:43:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 7917451 Return-Path: X-Original-To: patchwork-linux-btrfs@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 529299F350 for ; Thu, 24 Dec 2015 12:14:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CBC1205F1 for ; Thu, 24 Dec 2015 12:14:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DC7A204B0 for ; Thu, 24 Dec 2015 12:14:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754645AbbLXMOB (ORCPT ); Thu, 24 Dec 2015 07:14:01 -0500 Received: from mail.kernel.org ([198.145.29.136]:45326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbbLXMOA (ORCPT ); Thu, 24 Dec 2015 07:14:00 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7128204A7; Thu, 24 Dec 2015 12:13:59 +0000 (UTC) Received: from debian3.lan (bl8-199-62.dsl.telepac.pt [85.241.199.62]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C36B204A2; Thu, 24 Dec 2015 12:13:58 +0000 (UTC) From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 1/4 v2] fstests: fix btrfs test failures after commit 27d077ec0bda Date: Wed, 23 Dec 2015 04:43:12 +0000 Message-Id: <1450845795-18729-1-git-send-email-fdmanana@kernel.org> X-Mailer: git-send-email 2.1.3 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DATE_IN_PAST_24_48, 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 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Filipe Manana Commit 27d077ec0bda (common: use mount/umount helpers everywhere) made a few btrfs test fail for 2 different reasons: 1) Some tests (btrfs/029 and btrfs/031) use $SCRATCH_MNT as a mount point for some subvolume created in $TEST_DEV, therefore calling _scratch_unmount does not work as it passes $SCRATCH_DEV as the argument to the umount program. This is intentional to test reflinks accross different mountpoints of the same filesystem but for different subvolumes; 2) For multiple devices filesystems (btrfs/003 and btrfs/011) that test the device replace feature, we 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. Using $SCRATCH_MNT as a mountpoint for a device other than $SCRATCH_DEV is misleading, but that's a different problem that existed long before and this change attempts only to fix the regression from 27d077ec0bda, leaving such cleanups to later. Fix this by making _sctatch_unmmount() pass $SCRATCH_MNT to umount instead of $SCRATCH_DEV. Signed-off-by: Filipe Manana --- V2: Change _sctatch_unmount() to pass $SCRATCH_MNT as the argument to the umount program instead of $SCRATCH_DEV. This makes the btrfs tests pass again. common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index d33e3fb..16a47fe 100644 --- a/common/rc +++ b/common/rc @@ -319,7 +319,7 @@ _scratch_unmount() if [ "$FSTYP" == "overlay" ]; then _overlay_scratch_unmount else - $UMOUNT_PROG $SCRATCH_DEV + $UMOUNT_PROG $SCRATCH_MNT fi }