From patchwork Wed Apr 25 05:48:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 10361659 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 8B97F60225 for ; Wed, 25 Apr 2018 05:48:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AF4E28F52 for ; Wed, 25 Apr 2018 05:48:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FC2228F55; Wed, 25 Apr 2018 05:48:47 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, 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 B673428F52 for ; Wed, 25 Apr 2018 05:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750991AbeDYFsS (ORCPT ); Wed, 25 Apr 2018 01:48:18 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:43270 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751361AbeDYFsM (ORCPT ); Wed, 25 Apr 2018 01:48:12 -0400 Received: by mail-pg0-f65.google.com with SMTP id f132so12536191pgc.10; Tue, 24 Apr 2018 22:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ifN4C87ekzo/MwJN9Hmf68Xsj0/iPJ8ZF3IE+B+6WcA=; b=sFONOTlZT4sA9TVl7QVT1MhyjpFnIGT+kZmXtnR7B/8S6+slAXoI2oyVx27c+nlv+t tmCWhe/ihI28BWys1yNRSb7Sg2lpjUEkPggNvyQWGNv7wxwHe9SSbv/Gp8RBaXVF9eY0 edMImYSRcfr7r+jX6qjYr6QYssnvYwr6tuBlXOTSxuwfZVfM7SZhPadBilS+4sqaobvd iCosNNgnwTe25VJ4FhsgzDfIaXMZG4JTufQfdtQj5tn2pZaJEngormJhlPLB8TjFPtkh Z9WQ5o64zirN5OU2ecXq+EH10ILUi6b7ETwVPXL2+YdWPX3u3nF0s8iiAeYyBAi/jbuc YFYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ifN4C87ekzo/MwJN9Hmf68Xsj0/iPJ8ZF3IE+B+6WcA=; b=RX0nCPCE857TLycwAO+4twM6cHQPRtNz9suXS8OChWqFrOyKYDkMn4fpt21KVP1G4y OSvqr/UmDjnqysTMgg0RnDCRbrjDOJx4mwTsXI73f4yahTROQETNHDU/gzxPDBfSSaiu 9iSTf9wYpgRG4ynOU1PzztpXlfG/KIwIqEZqJfpkS6jgAvWHiE/FzgrIzykPMVW4bbiU CTr2lkLF514X8CM10HIh4t+4hpMw7St7danMI0PQjAcI1trz8OQs4grfra24AdHu9mlh 6OzJ+INogCIVsaOw36NgfGzwaaKdgMS3VVKOnIi4QlbXOfd39iFe0Pw8CD03GTd2Ow3A AXhw== X-Gm-Message-State: ALQs6tBoH0NpgFTKK2xTplq5vECMDJv9bgsci7xGg+sEdjTjvauRJnzr SFGOIt0rE3pwDZlaBTEiR2S8ncqIsbg= X-Google-Smtp-Source: AIpwx49QIyV3NWOegojLYZ4VeT8rWVXRK7OSVIi9LBJSiQp2kyjVVAili9CH7lokYl2sGgSBiIHggw== X-Received: by 10.101.101.71 with SMTP id a7mr9431627pgw.216.1524635291173; Tue, 24 Apr 2018 22:48:11 -0700 (PDT) Received: from localhost ([128.199.137.77]) by smtp.gmail.com with ESMTPSA id l63sm41788190pfi.6.2018.04.24.22.48.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Apr 2018 22:48:10 -0700 (PDT) Date: Wed, 25 Apr 2018 13:48:07 +0800 From: Eryu Guan To: Amir Goldstein Cc: Miklos Szeredi , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: Re: [PATCH 2/2] overlay/04{1,3,4}: enable xino feature Message-ID: <20180425054807.GG11384@desktop> References: <1524061018-20413-1-git-send-email-amir73il@gmail.com> <1524061018-20413-3-git-send-email-amir73il@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1524061018-20413-3-git-send-email-amir73il@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Apr 18, 2018 at 05:16:58PM +0300, Amir Goldstein wrote: > These tests check for constant inode number on copy up with nonsamefs > layer configuration. This problem is fixes only when opting-in with the > xino=on mount option, so let the tests enable the mount option on new > kernels and notrun on old kernels. > > Signed-off-by: Amir Goldstein > --- > tests/overlay/041 | 15 +++++++++++---- > tests/overlay/043 | 13 ++++++++++--- > tests/overlay/044 | 15 +++++++++++---- > 3 files changed, 32 insertions(+), 11 deletions(-) > > diff --git a/tests/overlay/041 b/tests/overlay/041 > index 4e72348..9de61f7 100755 > --- a/tests/overlay/041 > +++ b/tests/overlay/041 > @@ -70,7 +70,14 @@ _scratch_mkfs > upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER > workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK > > -_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir > +# enabling xino in this test requires that base filesystem inode numbers will > +# not use bit 63 in inode number of the test files, because bit 63 is used by > +# overlayfs to indicate the layer. Let's just assume that this is true for all > +# tested filesystems and if we are wrong, the test may fail > +_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o xino=on || > + _notrun "mount overlay with xino failed" > +_check_scratch_fs_option "xino" || \ > + _notrun "faild to enable xino" > > test_dir=$SCRATCH_MNT/test_dir/ > > @@ -171,7 +178,7 @@ subdir_d=$($here/src/t_dir_type $pure_lower_dir $pure_lower_subdir_st_ino) > _scratch_unmount > > # check overlayfs > -_overlay_check_scratch_dirs $lowerdir $upperdir $workdir > +_overlay_check_scratch_dirs $lowerdir $upperdir $workdir -o xino=on > > # Verify pure lower residing in dir which has another lower layer > middir=$OVL_BASE_TEST_DIR/$seq-ovl-mid > @@ -189,7 +196,7 @@ _scratch_mkfs > upperdir=$OVL_BASE_SCRATCH_MNT/ovl-upper > workdir=$OVL_BASE_SCRATCH_MNT/ovl-work > > -_overlay_scratch_mount_dirs $middir:$lowerdir $upperdir $workdir > +_overlay_scratch_mount_dirs $middir:$lowerdir $upperdir $workdir -o xino=on > > # Copy up test_dir > touch $test_dir/test_file > @@ -212,7 +219,7 @@ subdir_d=$($here/src/t_dir_type $pure_lower_dir $pure_lower_subdir_st_ino) > echo "Pure lower in dir which has another lower layer: Invalid d_ino reported for subdir" > > # check overlayfs > -_overlay_check_scratch_dirs "$middir:$lowerdir" $upperdir $workdir > +_overlay_check_scratch_dirs "$middir:$lowerdir" $upperdir $workdir -o xino=on 041 fails the fsck.overlay check, but I think that's a different issue. *** fsck.overlay output *** fsck.overlay:[Error]: Faile to resolve upperdir:/mnt/scratch/ovl-upper:No such file or directory Please specify correct lowerdirs and upperdir! Usage: fsck.overlay [-o lowerdir=,upperdir=,workdir=] [-pnyvhV] Options: -o, specify underlying directories of overlayfs multiple lower directories use ':' as separator -p, automatic repair (no questions) -n, make no changes to the filesystem -y, assume "yes" to all questions -v, --verbose print more messages of overlayfs -h, --help display this usage of overlayfs -V, --version display version information *** end fsck.overlay output > > echo "Silence is golden" > status=0 > diff --git a/tests/overlay/043 b/tests/overlay/043 > index 46df686..66771c0 100755 > --- a/tests/overlay/043 > +++ b/tests/overlay/043 > @@ -83,7 +83,14 @@ _scratch_mkfs >>$seqres.full 2>&1 > upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER > workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK > > -_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir > +# enabling xino in this test requires that base filesystem inode numbers will > +# not use bit 63 in inode number of the test files, because bit 63 is used by > +# overlayfs to indicate the layer. Let's just assume that this is true for all > +# tested filesystems and if we are wrong, the test may fail > +_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o xino=on || \ > + _notrun "mount overlay with xino failed" > +_check_scratch_fs_option "xino" || \ > + _notrun "faild to enable xino" 043 still fails for me, kernel is v4.17-rc2 [root@fedoravm xfstests]# diff -u tests/overlay/043.out /root/workspace/xfstests/results//xfs_4k/overlay/043.out.bad I used ext4 as underlying filesystem, but xfs failed too. > > FILES="dir file symlink chrdev blkdev fifo socket" > > @@ -150,13 +157,13 @@ check_inode_numbers $testdir $tmp.after_copyup $tmp.after_move > > # Verify that the inode numbers survive a mount cycle > $UMOUNT_PROG $SCRATCH_MNT > -_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir > +_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o xino=on > > # Compare inode numbers before/after mount cycle > check_inode_numbers $testdir $tmp.after_move $tmp.after_cycle > > # check overlayfs > -_overlay_check_scratch_dirs $lowerdir $upperdir $workdir > +_overlay_check_scratch_dirs $lowerdir $upperdir $workdir -o xino=on > > echo "Silence is golden" > status=0 > diff --git a/tests/overlay/044 b/tests/overlay/044 > index 2ab3035..0e74128 100755 > --- a/tests/overlay/044 > +++ b/tests/overlay/044 > @@ -99,8 +99,15 @@ _scratch_mkfs >>$seqres.full 2>&1 > upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER > workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK > > -# Enable overlay index feature to prevent breaking hardlinks on copy up > -_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o index=on > +# Enable overlay index feature to prevent breaking hardlinks on copy up. > +# enabling xino in this test requires that base filesystem inode numbers will > +# not use bit 63 in inode number of the test files, because bit 63 is used by > +# overlayfs to indicate the layer. Let's just assume that this is true for all > +# tested filesystems and if we are wrong, the test may fail > +_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o index=on,xino=on || \ > + _notrun "mount overlay with xino failed" > +_check_scratch_fs_option "xino" || \ > + _notrun "faild to enable xino" > > rm -f $tmp.* > > @@ -124,8 +131,8 @@ check_ino_nlink $SCRATCH_MNT $tmp.before $tmp.after_one > > # Verify that the hardlinks survive a mount cycle > $UMOUNT_PROG $SCRATCH_MNT > -_overlay_check_scratch_dirs $lowerdir $upperdir $workdir -o index=on > -_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o index=on > +_overlay_check_scratch_dirs $lowerdir $upperdir $workdir -o index=on,xino=on > +_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o index=on,xino=on 044 passes! Thanks, Eryu > > echo "== After mount cycle ==" > cat $FILES > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- tests/overlay/043.out 2018-02-25 15:15:00.135387405 +0800 +++ /root/workspace/xfstests/results//xfs_4k/overlay/043.out.bad 2018-04-25 13:44:24.378262790 +0800 @@ -1,2 +1,11 @@ QA output created by 043 +--- /tmp/29215.after_copyup 2018-04-25 13:44:23.888271267 +0800 ++++ /tmp/29215.after_move 2018-04-25 13:44:24.115267339 +0800 +@@ -1,4 +1,4 @@ +-9223372036888371331 dir ++50333121 dir + 9223372036871553155 file + 9223372036871553156 symlink + 9223372036871553157 chrdev +dir not found by ino 9223372036888371331 (from /tmp/29215.after_copyup) Silence is golden