From patchwork Thu Apr 27 15:09:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9703013 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 996056032C for ; Thu, 27 Apr 2017 15:09:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99C17285EA for ; Thu, 27 Apr 2017 15:09:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EA7428655; Thu, 27 Apr 2017 15:09:39 +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 4746B285EA for ; Thu, 27 Apr 2017 15:09:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934903AbdD0PJi (ORCPT ); Thu, 27 Apr 2017 11:09:38 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33290 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934542AbdD0PJh (ORCPT ); Thu, 27 Apr 2017 11:09:37 -0400 Received: by mail-wm0-f68.google.com with SMTP id y10so5221691wmh.0; Thu, 27 Apr 2017 08:09:36 -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=fuKdR2zncnLjQo+NBwBFcgUvui04MKCi7sotLkYZcnA=; b=rIzoJvDjUS/HEVIFVDJ6PbJ9Yxhb+ABGaFr+n7SVnqj2Jlyrrgvy2ZQ98p8xr55k5n 1u+kO3bhZksJHSNNV+LzwI7Fm9fmx2/iK3ojcy36XnTMgkEzUcrg0JncltGMBD66xxID C2E6sbqzT3GPIz9+L4+byRYTW6g31PsR0HDo6LKkWT1wMVH5YYnVXQCT23Soe5YVybkC uyEvw4vSSbiOvY/Tp3LxggbXwCxVJgrJIH7Y7W/LiyGzj2EXwdRLGZ29CbmTxhJc6NKT khs5cZV5KsaLlwb/YFKMLzMdoaoCxrjGl1pnwdx099GfzDC4flT3pEwpW1diMZr3HwBv yQQw== 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=fuKdR2zncnLjQo+NBwBFcgUvui04MKCi7sotLkYZcnA=; b=JQron5NuLmjT3f+0i2MqHp5ECwhRGhXqR8K1eMxTK6XUWzbqCC6dZOMIWJ9GbDFs4z Q17izH0QybUgOtqy+HDf3TiFBKW4LN14jBFg/uVw1jro1zniSHHqG5rPmkk8zQFKqDTp uSfzvvAVPv8CfjN6FQGQ7u+GHyZ81/D5jInlj9bO2hiXpPltwPZzJwfVjovy0WCGK3B2 1fkPL0B3QrqpV9JyYMPEhfjdrhzQtgBkWGZmrh0RbBSnoJs+r7TI4+GrB2+7i3zfoVm/ roZbm26NrfhliffBvPJUD9pRuvgBezsgJ2X2GhVpfwYYMsw3ODDNeSvkrZBeAESsU/2V aQTQ== X-Gm-Message-State: AN3rC/58w4GHD1wRdeo3aTV8iT/Y0PqTrQrIiNAyadk3ZoaIxucvLwq0 5tPPVBmFwsfmEw== X-Received: by 10.28.8.145 with SMTP id 139mr2353866wmi.26.1493305775785; Thu, 27 Apr 2017 08:09:35 -0700 (PDT) Received: from amir-VirtualBox.lan (bzq-79-179-55-127.red.bezeqint.net. [79.179.55.127]) by smtp.gmail.com with ESMTPSA id p17sm3519265wmd.11.2017.04.27.08.09.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Apr 2017 08:09:35 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , Xiong Zhou , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 5/5] overlay/017: test persistent inode numbers after mount cycle Date: Thu, 27 Apr 2017 18:09:35 +0300 Message-Id: <1493305775-12559-6-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493305775-12559-1-git-send-email-amir73il@gmail.com> References: <1493305775-12559-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 Overlayfs directory inodes are constant across copy up, but not persistent on mount cycle. Compare the inode numbers before and after mount cycle. Signed-off-by: Amir Goldstein --- tests/overlay/017 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/overlay/017 b/tests/overlay/017 index 1cf684d..fe66f4c 100755 --- a/tests/overlay/017 +++ b/tests/overlay/017 @@ -9,7 +9,8 @@ # - stat file A shows inode number Y != X # # Also test if d_ino of readdir entries changes after copy up -# and if inode numbers persist after rename and drop caches. +# and if inode numbers persist after rename, drop caches and +# mount cycle. # #----------------------------------------------------------------------- # @@ -133,6 +134,19 @@ done diff -u $tmp.before $tmp.after_copyup diff -u $tmp.after_copyup $tmp.after_move +# Verify that the inode numbers survive a mount cycle +_scratch_cycle_mount + +record_inode_numbers $testdir $tmp.after_cycle + +cat $tmp.after_move | while read ino f; do + find $testdir/ -inum $ino -maxdepth 1 | grep -q $f || \ + echo "$f not found by ino $ino" +done + +# Compare before..after - expect silence +diff -u $tmp.after_move $tmp.after_cycle + echo "Silence is golden" status=0 exit