From patchwork Tue Jul 11 19:52:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9835435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EF77A602A0 for ; Tue, 11 Jul 2017 19:51:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E058628553 for ; Tue, 11 Jul 2017 19:51:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D43892856A; Tue, 11 Jul 2017 19:51:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56F0528553 for ; Tue, 11 Jul 2017 19:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934177AbdGKTv7 (ORCPT ); Tue, 11 Jul 2017 15:51:59 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35801 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933409AbdGKTv6 (ORCPT ); Tue, 11 Jul 2017 15:51:58 -0400 Received: by mail-wr0-f194.google.com with SMTP id z45so624023wrb.2; Tue, 11 Jul 2017 12:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bu8n4Ts1m+63lsuSnSJlfVWJT4iqAWCLcVzC2DE8oGg=; b=lj4LmIH1izRxu7gfxoA7aikjadN9n8U4Vt20e13rPSMtaRY1ePoUcgjbVfof+sypPv aJ4z/IznSlg+L5AmxYhbQio1Jl08acsu6Lcj1fmIeoIFnnt0xTzQgKw+vHZe/i8VjnW2 w72nDV7HulaAcV5chl3MGpGbbx2IjZeliOo0bBJ+T8Jz98dXZ6UKlOw1HRDMUt39nO/U i4ZTMyMdAkjJWv7GnS453X0DGDX9mQKORg2H1IRZrYYoO8kU7CtZDsYV1GtAjoHtllKP 1NuPRTTi2R5eKurbZc+3T3Wj/nPWcTxDn71eXsDRUP7RWr92sU/EXirSHImzR1EvvVSu bxFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Bu8n4Ts1m+63lsuSnSJlfVWJT4iqAWCLcVzC2DE8oGg=; b=FhVKe5QYntJh2Q2hspTkH9nb0DYMw+YrWnNaE+2v7aQGIf+JSrAO9dS1eorGO+5pd6 l7DIw7Si/Gr20VJwp8ZgoX4CCd+81A+BGJzLDcU5uCOQ8gG4yARgFSs8+KF8hPGfgeuu Lfv4d5CydqaiggIZVTBdH8AQCBNOiRIGwYlfiswu9w17XFMtPQyrEebS06oLZ/EYaDoh RbMAepGtMITYqhQH7Dw58hiBl5m/0gLOmC4JLLw4MBD1d5XZ2YpQsa8wqCi5o3iGFMrd LKieBmoGysUlVAykHzg9XmvvUL/Ba6vt8Rm1AJ+z/Y9w/WpIo0roDR8zNnD9f0KKqegX IhPg== X-Gm-Message-State: AIVw112YFNQTs5TymerrT5Ym6ExOvi2QMoqKngRMe4ndNGYEv2y/Akqn 9Zo6qffWtvHdrw== X-Received: by 10.28.169.5 with SMTP id s5mr5515wme.90.1499802716616; Tue, 11 Jul 2017 12:51:56 -0700 (PDT) Received: from localhost.localdomain (bzq-79-182-137-119.red.bezeqint.net. [79.182.137.119]) by smtp.gmail.com with ESMTPSA id q2sm302581wmg.3.2017.07.11.12.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 12:51:56 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 2/5] overlay/014: fix test with inodes index enabled Date: Tue, 11 Jul 2017 22:52:03 +0300 Message-Id: <1499802726-11045-3-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499802726-11045-1-git-send-email-amir73il@gmail.com> References: <1499802726-11045-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When overlayfs is configured with CONFIG_OVERLAY_FS_INDEX=y, workdir from previous overlay mount cannot be reused in a new overlay mount that uses a different upper dir. Fix the test to use a different workdir when mounting with a different upper dir. This change has not effect on older kernels and overlay configured without CONFIG_OVERLAY_FS_INDEX. Signed-off-by: Amir Goldstein --- tests/overlay/014 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/overlay/014 b/tests/overlay/014 index 40d10f5..6a551b7 100755 --- a/tests/overlay/014 +++ b/tests/overlay/014 @@ -63,12 +63,13 @@ lowerdir1=$OVL_BASE_SCRATCH_MNT/lower1 lowerdir2=$OVL_BASE_SCRATCH_MNT/lower2 upperdir=$OVL_BASE_SCRATCH_MNT/upper workdir=$OVL_BASE_SCRATCH_MNT/workdir -mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir +workdir2=$OVL_BASE_SCRATCH_MNT/workdir2 +mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir $workdir2 mkdir -p $lowerdir1/testdir/d # mount overlay with $lowerdir2 as upperdir, and remove & recreate testdir, # make testdir on $lowerdir2 opaque -_overlay_mount_dirs $lowerdir1 $lowerdir2 $workdir $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT +_overlay_mount_dirs $lowerdir1 $lowerdir2 $workdir2 $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT rm -rf $SCRATCH_MNT/testdir mkdir -p $SCRATCH_MNT/testdir/visibledir # unmount overlayfs but not base fs