From patchwork Thu Mar 16 19:33:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178275 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B946C6FD1F for ; Thu, 16 Mar 2023 19:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbjCPTdO (ORCPT ); Thu, 16 Mar 2023 15:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbjCPTdN (ORCPT ); Thu, 16 Mar 2023 15:33:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A200815CAA; Thu, 16 Mar 2023 12:33:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3A03D62100; Thu, 16 Mar 2023 19:33:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93403C433D2; Thu, 16 Mar 2023 19:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995191; bh=VHn4cJ+oAVXTAVvvC8zIdGmhcTu1MwoYgoCHPIWfsTI=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=YTu27ZYAXXo2NnA6AcqxvGFmvq/XM7i3wRefKo/p5rZBSsCigcoC3yea1dLk72ciL tA8PPKVKIX+wQ7l7VgNgYWu4zfkDIwngA85aa4VGxQjb+KiwdpdssyyuitYaHzwVxz fXb0sroLpMTjvLccMgFgxLMZAj7Zt/HpPp/sE4D4V++LusGULMcmQrwg3hJnoyeqrM PfhXa4GuzA2z9def4bVSIKCUz5raSk0+JhQI+PsMZ6u9AT0b8/wNIygYo1gN49mgo1 S4UVLEJoKMDk2cNfJ/n8rd0UXV7JcGVALvqzuwePe1R84TSSrGqZ07IunwEr2BKvjB svr0DlV4VeYKQ== Date: Thu, 16 Mar 2023 12:33:11 -0700 Subject: [PATCH 01/14] xfs/122: update for parent pointers From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417668.17926.7983061083890838561.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Update test for parent pointers. Signed-off-by: Darrick J. Wong --- tests/xfs/122.out | 3 +++ tests/xfs/206 | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/xfs/122.out b/tests/xfs/122.out index 43461e875c..0877f14bf2 100644 --- a/tests/xfs/122.out +++ b/tests/xfs/122.out @@ -109,7 +109,10 @@ sizeof(struct xfs_legacy_timestamp) = 8 sizeof(struct xfs_log_dinode) = 176 sizeof(struct xfs_log_legacy_timestamp) = 8 sizeof(struct xfs_map_extent) = 32 +sizeof(struct xfs_parent_name_rec) = 16 +sizeof(struct xfs_parent_ptr) = 280 sizeof(struct xfs_phys_extent) = 16 +sizeof(struct xfs_pptr_info) = 104 sizeof(struct xfs_refcount_key) = 4 sizeof(struct xfs_refcount_rec) = 12 sizeof(struct xfs_rmap_key) = 20 diff --git a/tests/xfs/206 b/tests/xfs/206 index 904d53deb0..b29edeadf0 100755 --- a/tests/xfs/206 +++ b/tests/xfs/206 @@ -66,7 +66,8 @@ mkfs_filter() -e "/.*crc=/d" \ -e "/^Default configuration/d" \ -e "/metadir=.*/d" \ - -e '/rgcount=/d' + -e '/rgcount=/d' \ + -e '/parent=/d' } # mkfs slightly smaller than that, small log for speed. From patchwork Thu Mar 16 19:33:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8490C6FD19 for ; Thu, 16 Mar 2023 19:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229932AbjCPTdd (ORCPT ); Thu, 16 Mar 2023 15:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbjCPTdc (ORCPT ); Thu, 16 Mar 2023 15:33:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5131F51F98; Thu, 16 Mar 2023 12:33:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CB207620FA; Thu, 16 Mar 2023 19:33:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 355DCC433D2; Thu, 16 Mar 2023 19:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995207; bh=B0zkU+dGalY1AAWY8KrhS+F0tQByZ/7/s3aIpszdE7c=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=GxYr+DBJc1G/QtKwwr2W43qJyZB+w3G/HFM4McejepqnWYf3Ol2PFjJLqOioqSZY4 g0HYDZgGGqEQQ74dB3b7GZCX1ao4MoZ7pqIUH7XCgCHYLjCs4crmCaoZc6YJXBySrE /V3xG5gMLm9SjGPRHtha99xRXeF6+BJEV2uMmLnnBK+FtaaHangHbQLSbR1/bEHyU+ QrzdsxxExiCW8bRzAFveWjCXyQ8xB43cuIszhU1g7fnFjF/9HWp23eusLxX4gWADiB sgvZH4g7mS74+szheHcs86RJL6Gyb9dEDGtOC5IJ7aROZiZQFQH0xGfltJgdJGXhL+ OffjJJUok6WmA== Date: Thu, 16 Mar 2023 12:33:26 -0700 Subject: [PATCH 02/14] populate: create hardlinks for parent pointers From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417681.17926.9773642875554425949.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Create some hardlinked files so that we can exercise parent pointers. Signed-off-by: Darrick J. Wong --- common/populate | 38 ++++++++++++++++++++++++++++++++++++++ src/popdir.pl | 11 +++++++++++ 2 files changed, 49 insertions(+) diff --git a/common/populate b/common/populate index 389a762329..d52167964c 100644 --- a/common/populate +++ b/common/populate @@ -376,6 +376,7 @@ _scratch_xfs_populate() { is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")" is_rmapbt="$(_xfs_has_feature "$SCRATCH_MNT" rmapbt -v)" is_reflink="$(_xfs_has_feature "$SCRATCH_MNT" reflink -v)" + is_pptr="$(_xfs_has_feature "$SCRATCH_MNT" parent -v)" # Reverse-mapping btree if [ $is_rmapbt -gt 0 ]; then @@ -412,6 +413,43 @@ _scratch_xfs_populate() { cp --reflink=always "${SCRATCH_MNT}/REFCOUNTBT" "${SCRATCH_MNT}/REFCOUNTBT2" fi + # Parent pointers + if [ $is_pptr -gt 0 ]; then + echo "+ parent pointers" + + # Create a couple of parent pointers + __populate_create_dir "${SCRATCH_MNT}/PPTRS" 1 '' --hardlink --format "two_%d" + + # Create one xattr leaf block of parent pointers + nr="$((blksz * 2 / 16))" + __populate_create_dir "${SCRATCH_MNT}/PPTRS" ${nr} '' --hardlink --format "many%04d" + + # Create multiple xattr leaf blocks of large parent pointers + nr="$((blksz * 16 / 16))" + __populate_create_dir "${SCRATCH_MNT}/PPTRS" ${nr} '' --hardlink --format "y%0254d" + + # Create multiple paths to a file + local moof="${SCRATCH_MNT}/PPTRS/moofile" + touch "${moof}" + for ((i = 0; i < 4; i++)); do + mkdir -p "${SCRATCH_MNT}/PPTRS/SUB${i}" + ln "${moof}" "${SCRATCH_MNT}/PPTRS/SUB${i}/moofile" + done + + # Create parent pointers of various lengths + touch "${SCRATCH_MNT}/PPTRS/vlength" + local len_len + local tst + local fname + ln "${SCRATCH_MNT}/PPTRS/vlength" "${SCRATCH_MNT}/PPTRS/b" + for len in 32 64 96 128 160 192 224 250 255; do + len_len="${#len}" + tst="$(perl -e "print \"b\" x (${len} - (${len_len} + 1))")" + fname="v${tst}${len}" + ln "${SCRATCH_MNT}/PPTRS/vlength" "${SCRATCH_MNT}/PPTRS/${fname}" + done + fi + # Copy some real files (xfs tests, I guess...) echo "+ real files" test $fill -ne 0 && __populate_fill_fs "${SCRATCH_MNT}" 5 diff --git a/src/popdir.pl b/src/popdir.pl index dc0c046b7d..950503c621 100755 --- a/src/popdir.pl +++ b/src/popdir.pl @@ -17,6 +17,7 @@ GetOptions("start=i" => \$start, "dir=s" => \$dir, "remove!" => \$remove, "help!" => \$help, + "hardlink!" => \$hardlink, "verbose!" => \$verbose); @@ -36,6 +37,7 @@ Options: --format=str printf formatting string for file name ("%08d") --verbose verbose output --help this help screen + --hardlink hardlink subsequent files to the first one created EOF exit(1) unless defined $help; # otherwise... @@ -51,12 +53,21 @@ $file_mult = 20 if (!defined $file_mult); $format = "%08d" if (!defined $format); $incr = 1 if (!defined $incr); +if ($hardlink) { + $file_mult = 0; + $link_fname = sprintf($format, $start); +} + for ($i = $start; $i <= $end; $i += $incr) { $fname = sprintf($format, $i); if ($remove) { $verbose && print "rm $fname\n"; unlink($fname) or rmdir($fname) or die("unlink $fname"); + } elsif ($hardlink && $i > $start) { + # hardlink the first file + $verbose && print "ln $link_fname $fname\n"; + link $link_fname, $fname; } elsif ($file_mult == 0 or ($i % $file_mult) == 0) { # create a file $verbose && print "touch $fname\n"; From patchwork Thu Mar 16 19:33:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91554C6FD19 for ; Thu, 16 Mar 2023 19:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230167AbjCPTdt (ORCPT ); Thu, 16 Mar 2023 15:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbjCPTds (ORCPT ); Thu, 16 Mar 2023 15:33:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CDABDF5; Thu, 16 Mar 2023 12:33:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6EC49620DC; Thu, 16 Mar 2023 19:33:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA5A4C433EF; Thu, 16 Mar 2023 19:33:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995222; bh=WJ4XMzKgtUgCmTSdDNJPGhfdBJx2lr4POpSeHisJXb4=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=cTrkLJQYEte9JEupHPTDYxMIPM1r+sG1Ftrl55Lu3zHp3AxmRZxlJwGm6/CQwfann EXz0YGgf/2hEz4USPsd7X/eW9N+SyZGAr93gZK7oQD0CO54iupomHkZ4FlA2EQQljl QH3Ionp2XxzfKT1Z5Qj9OsaFE+5HDDvyTz6q7zqnI89pivkbGHo3lVLevO4KrU9yxU ZuOgHtf4uZ7qdRbAYvJke+yun2O2hMOJdaRW05v6BH4AaHm/rajfkA0U++ElXcZdy4 EnPJ4+nHk73cTS7zRkNjbB8eSxmb2wHjT78vBNAQ7v/i7NvfnrGtX339PZ51yxm/zJ Y/fo3ehz80Xjg== Date: Thu, 16 Mar 2023 12:33:42 -0700 Subject: [PATCH 03/14] xfs/021: adapt golden output files for parent pointers From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417694.17926.9653551273122564815.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Parent pointers change the xattr structure dramatically, so fix this test to handle them. Signed-off-by: Darrick J. Wong --- common/rc | 4 +++ tests/xfs/021 | 15 +++++++++-- tests/xfs/021.cfg | 1 + tests/xfs/021.out.default | 0 tests/xfs/021.out.parent | 64 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 tests/xfs/021.cfg rename tests/xfs/{021.out => 021.out.default} (100%) create mode 100644 tests/xfs/021.out.parent diff --git a/common/rc b/common/rc index 2d870d435a..d8e309a5f3 100644 --- a/common/rc +++ b/common/rc @@ -3312,6 +3312,8 @@ _get_os_name() _link_out_file_named() { + test -n "$seqfull" || _fail "need to set seqfull" + local features=$2 local suffix=$(FEATURES="$features" perl -e ' my %feathash; @@ -3347,6 +3349,8 @@ _link_out_file() { local features + test -n "$seqfull" || _fail "need to set seqfull" + if [ $# -eq 0 ]; then features="$(_get_os_name),$FSTYP" if [ -n "$MOUNT_OPTIONS" ]; then diff --git a/tests/xfs/021 b/tests/xfs/021 index 9432e2acb0..ef307fc064 100755 --- a/tests/xfs/021 +++ b/tests/xfs/021 @@ -67,6 +67,13 @@ _scratch_mkfs_xfs >/dev/null \ echo "*** mount FS" _scratch_mount +seqfull=$0 +if _xfs_has_feature $SCRATCH_MNT parent; then + _link_out_file "parent" +else + _link_out_file "" +fi + testfile=$SCRATCH_MNT/testfile echo "*** make test file 1" @@ -108,7 +115,10 @@ _scratch_unmount >>$seqres.full 2>&1 \ echo "*** dump attributes (1)" _scratch_xfs_db -r -c "inode $inum_1" -c "print a.sfattr" | \ - sed -e '/secure = /d' | sed -e '/parent = /d' + perl -ne ' +/\.secure/ && next; +/\.parent/ && next; + print unless /^\d+:\[.*/;' echo "*** dump attributes (2)" @@ -124,10 +134,11 @@ s/info.hdr/info/; /hdr.info.uuid/ && next; /hdr.info.lsn/ && next; /hdr.info.owner/ && next; +/\.parent/ && next; s/^(hdr.info.magic =) 0x3bee/\1 0xfbee/; s/^(hdr.firstused =) (\d+)/\1 FIRSTUSED/; s/^(hdr.freemap\[0-2] = \[base,size]).*/\1 [FREEMAP..]/; -s/^(entries\[0-2] = \[hashval,nameidx,incomplete,root,local]).*/\1 [ENTRIES..]/; +s/^(entries\[0-[23]] = \[hashval,nameidx,incomplete,root,local]).*/\1 [ENTRIES..]/; print unless /^\d+:\[.*/;' echo "*** done" diff --git a/tests/xfs/021.cfg b/tests/xfs/021.cfg new file mode 100644 index 0000000000..73b127260c --- /dev/null +++ b/tests/xfs/021.cfg @@ -0,0 +1 @@ +parent: parent diff --git a/tests/xfs/021.out b/tests/xfs/021.out.default similarity index 100% rename from tests/xfs/021.out rename to tests/xfs/021.out.default diff --git a/tests/xfs/021.out.parent b/tests/xfs/021.out.parent new file mode 100644 index 0000000000..661d130239 --- /dev/null +++ b/tests/xfs/021.out.parent @@ -0,0 +1,64 @@ +QA output created by 021 +*** mkfs +*** mount FS +*** make test file 1 +# file: .1 +user.a1 +user.a2-- + +*** make test file 2 +1+0 records in +1+0 records out +# file: .2 +user.a1 +user.a2----- +user.a3 + +Attribute "a3" had a 65535 byte value for .2: +size of attr value = 65536 + +*** unmount FS +*** dump attributes (1) +a.sfattr.hdr.totsize = 53 +a.sfattr.hdr.count = 3 +a.sfattr.list[0].namelen = 16 +a.sfattr.list[0].valuelen = 10 +a.sfattr.list[0].root = 0 +a.sfattr.list[0].value = "testfile.1" +a.sfattr.list[1].namelen = 2 +a.sfattr.list[1].valuelen = 3 +a.sfattr.list[1].root = 0 +a.sfattr.list[1].name = "a1" +a.sfattr.list[1].value = "v1\d" +a.sfattr.list[2].namelen = 4 +a.sfattr.list[2].valuelen = 5 +a.sfattr.list[2].root = 0 +a.sfattr.list[2].name = "a2--" +a.sfattr.list[2].value = "v2--\d" +*** dump attributes (2) +hdr.info.forw = 0 +hdr.info.back = 0 +hdr.info.magic = 0xfbee +hdr.count = 4 +hdr.usedbytes = 84 +hdr.firstused = FIRSTUSED +hdr.holes = 0 +hdr.freemap[0-2] = [base,size] [FREEMAP..] +entries[0-3] = [hashval,nameidx,incomplete,root,local] [ENTRIES..] +nvlist[0].valuelen = 8 +nvlist[0].namelen = 2 +nvlist[0].name = "a1" +nvlist[0].value = "value_1\d" +nvlist[1].valueblk = 0x1 +nvlist[1].valuelen = 65535 +nvlist[1].namelen = 2 +nvlist[1].name = "a3" +nvlist[2].valuelen = 10 +nvlist[2].namelen = 16 +nvlist[2].value = "testfile.2" +nvlist[3].valuelen = 8 +nvlist[3].namelen = 7 +nvlist[3].name = "a2-----" +nvlist[3].value = "value_2\d" +*** done +*** unmount From patchwork Thu Mar 16 19:33:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ECFCC6FD1F for ; Thu, 16 Mar 2023 19:34:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbjCPTeF (ORCPT ); Thu, 16 Mar 2023 15:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230290AbjCPTeE (ORCPT ); Thu, 16 Mar 2023 15:34:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F021359F3; Thu, 16 Mar 2023 12:34:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A3C32B82338; Thu, 16 Mar 2023 19:33:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D0E3C433EF; Thu, 16 Mar 2023 19:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995238; bh=K3BpCPcw5QcolF6/fvOmKqU6PzJ39+BNrWoE9SK8owM=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=q4p/+LvPLbFJzwcfmEPHGY570b+XaATJlvr8ED4dmxDmiX/xwAb60TZm7bmP8xNpy 6RHpPFDcgJAtM9ov5TfCkaMPx/3mkYHIja0LK6Tz+YtrtuldPK7gixubID5tFwn5eY WDRGTUdLFhF8e4QB0x8N55JHDQHuHabaKM/zDPsz7NtQmfBuXbveknTBxW0TwsW/Ka O2Kf1TLiq8zEFYb6dpV6qZ9ufjZyTq68XgLI5TcSCaZb8OPsIWdEqVq7RRGSmHbt30 XJEG5zuQgAgFkhFLTydg/RxgiKrsoZP5VsFLaCsHMV98ZZUZhvBGx2HAqaJ1Q0HM8s DrS+aUt9ith/Q== Date: Thu, 16 Mar 2023 12:33:58 -0700 Subject: [PATCH 04/14] generic/050: adapt for parent pointers From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417707.17926.6232799207230898323.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Fix this test when quotas and parent pointers are enabled. Signed-off-by: Darrick J. Wong --- tests/generic/050 | 10 ++++++++++ tests/generic/050.cfg | 1 + tests/generic/050.out.xfsquotaparent | 23 +++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 tests/generic/050.out.xfsquotaparent diff --git a/tests/generic/050 b/tests/generic/050 index 0664f8c0e4..b38401b9fc 100755 --- a/tests/generic/050 +++ b/tests/generic/050 @@ -36,6 +36,16 @@ elif [ "$FSTYP" = "xfs" ] && echo "$MOUNT_OPTIONS" | grep -q quota ; then # Mounting with quota on XFS requires a writable fs, which means # we expect to fail the ro blockdev test with with EPERM. features="xfsquota" + + if _xfs_has_feature $SCRATCH_DEV parent && \ + ! _xfs_has_feature $SCRATCH_DEV realtime; then + # If we have quotas and parent pointers enabled, the primary + # superblock will be written out with the quota flags set when + # the logged xattrs log_incompat feature is set. Hence the + # norecovery mount won't fail due to quota rejecting the + # mismatch between the mount qflags and the ondisk ones. + features="xfsquotaparent" + fi fi _link_out_file "$features" diff --git a/tests/generic/050.cfg b/tests/generic/050.cfg index 1d9d60bc69..85924d117d 100644 --- a/tests/generic/050.cfg +++ b/tests/generic/050.cfg @@ -1,2 +1,3 @@ nojournal: nojournal xfsquota: xfsquota +xfsquotaparent: xfsquotaparent diff --git a/tests/generic/050.out.xfsquotaparent b/tests/generic/050.out.xfsquotaparent new file mode 100644 index 0000000000..b341aca5be --- /dev/null +++ b/tests/generic/050.out.xfsquotaparent @@ -0,0 +1,23 @@ +QA output created by 050 +setting device read-only +mounting read-only block device: +mount: SCRATCH_MNT: permission denied +unmounting read-only filesystem +umount: SCRATCH_DEV: not mounted +setting device read-write +mounting read-write block device: +touch files +going down: +unmounting shutdown filesystem: +setting device read-only +mounting filesystem that needs recovery on a read-only device: +mount: device write-protected, mounting read-only +mount: cannot mount device read-only +unmounting read-only filesystem +umount: SCRATCH_DEV: not mounted +mounting filesystem with -o norecovery on a read-only device: +mount: device write-protected, mounting read-only +unmounting read-only filesystem +setting device read-write +mounting filesystem that needs recovery with -o ro: +*** done From patchwork Thu Mar 16 19:34:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A220C6FD19 for ; Thu, 16 Mar 2023 19:34:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbjCPTeU (ORCPT ); Thu, 16 Mar 2023 15:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbjCPTeS (ORCPT ); Thu, 16 Mar 2023 15:34:18 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38DC01C7E0; Thu, 16 Mar 2023 12:34:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 963FDCE1E65; Thu, 16 Mar 2023 19:34:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A058C433D2; Thu, 16 Mar 2023 19:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995254; bh=jcMPAitEdlmtQO6luu6/YtNbQLTOBOSD+2V5MPg8xLk=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=g4rLsAQBaPnKRl+G2x5vdPTUaqZFchYF1wp27RwIrlJbdKQvKmGHmr+xjmj2HL+w6 qeyyVtAWOGWR/e1k6gT/NTLQs/UuPqN4W0GXnpN1wCS4Y5qbtGeR6TonqxPgfJ73Nr fEw+hSrjlPTaRLlwH7sPWlyholf4/j+p0dosEeX5Ts+CIm9PceKvkn9/wRdRQHG+BJ gKsSOSaNsam+jGAxJ4lHw8fiCDhp6yu8Yu9mK8fRaku0HNO3KcvKux3S/3fd8sxh+o vgrO1G61t8fpvwUnPuzvqMN8WmnF++2JcksRtjgNTaauxIrVochh7IYX/d7gESRBAD EnN7mkCLIFxsw== Date: Thu, 16 Mar 2023 12:34:13 -0700 Subject: [PATCH 05/14] xfs/018: disable parent pointers for this test From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417721.17926.3530090921775489965.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong This test depends heavily on the xattr formats created for new files. Parent pointers break those assumptions, so force parent pointers off. Signed-off-by: Darrick J. Wong --- tests/xfs/018 | 7 ++++++- tests/xfs/191 | 7 ++++++- tests/xfs/288 | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/xfs/018 b/tests/xfs/018 index 1ef51a2e61..34b6e91579 100755 --- a/tests/xfs/018 +++ b/tests/xfs/018 @@ -100,7 +100,12 @@ attr32l="X$attr32k" attr64k="$attr32k$attr32k" echo "*** mkfs" -_scratch_mkfs >/dev/null + +# Parent pointers change the xattr formats sufficiently to break this test. +# Disable parent pointers if mkfs supports it. +mkfs_args=() +$MKFS_XFS_PROG 2>&1 | grep -q parent=0 && mkfs_args+=(-n parent=0) +_scratch_mkfs "${mkfs_args[@]}" >/dev/null blk_sz=$(_scratch_xfs_get_sb_field blocksize) err_inj_attr_sz=$(( blk_sz / 3 - 50 )) diff --git a/tests/xfs/191 b/tests/xfs/191 index 7a02f1be21..0a6c20dad7 100755 --- a/tests/xfs/191 +++ b/tests/xfs/191 @@ -33,7 +33,12 @@ _fixed_by_kernel_commit 7be3bd8856fb "xfs: empty xattr leaf header blocks are no _fixed_by_kernel_commit e87021a2bc10 "xfs: use larger in-core attr firstused field and detect overflow" _fixed_by_git_commit xfsprogs f50d3462c654 "xfs_repair: ignore empty xattr leaf blocks" -_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs +# Parent pointers change the xattr formats sufficiently to break this test. +# Disable parent pointers if mkfs supports it. +mkfs_args=() +$MKFS_XFS_PROG 2>&1 | grep -q parent=0 && mkfs_args+=(-n parent=0) + +_scratch_mkfs_xfs "${mkfs_args[@]}" | _filter_mkfs >$seqres.full 2>$tmp.mkfs cat $tmp.mkfs >> $seqres.full source $tmp.mkfs _scratch_mount diff --git a/tests/xfs/288 b/tests/xfs/288 index aa664a266e..6bfc9ac0c8 100755 --- a/tests/xfs/288 +++ b/tests/xfs/288 @@ -19,8 +19,13 @@ _supported_fs xfs _require_scratch _require_attrs +# Parent pointers change the xattr formats sufficiently to break this test. +# Disable parent pointers if mkfs supports it. +mkfs_args=() +$MKFS_XFS_PROG 2>&1 | grep -q parent=0 && mkfs_args+=(-n parent=0) + # get block size ($dbsize) from the mkfs output -_scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null +_scratch_mkfs_xfs "${mkfs_args[@]}" 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs _scratch_mount From patchwork Thu Mar 16 19:34:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178280 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72779C6FD1F for ; Thu, 16 Mar 2023 19:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229747AbjCPTeh (ORCPT ); Thu, 16 Mar 2023 15:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbjCPTeg (ORCPT ); Thu, 16 Mar 2023 15:34:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E45D2196C; Thu, 16 Mar 2023 12:34:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B41862103; Thu, 16 Mar 2023 19:34:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 989CEC433EF; Thu, 16 Mar 2023 19:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995269; bh=5ojAQWLRuwMuldWRkPKiK/uQHSX78DhaKxe/Ap7vFKw=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=YS9/DXkJGuORjECp0VxZVy4Mu004UEuutoP97x901iRBBVy05v2WnYlUhXFXsvX7l DpLPfBrqI0f5JlFd1aZuTDJ6xvaCmJi5oZPICWquyt7BRfqWnPnfj65VFQUhJzX1FV IfX6FCCzcsvqQGyglvyFSdsMqiKwVFwmfUgf7WwY2cjOHud+wZxCOBz2EkiWszYYRL Z5LPARRI+R7Slwx/4IqmncEPmlnABCpJ8ErdWeCjXj/duejJpLM6PVGByALyFQdbps UtMMoUEY6wW/AHmvVyrJ5EyLnhRy/nzXqvjqCB2LhnAftFkLchNt4HR5Tw3BKypqiv hJKBiUsAhuA6g== Date: Thu, 16 Mar 2023 12:34:29 -0700 Subject: [PATCH 06/14] xfs/306: fix formatting failures with parent pointers From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417734.17926.17975834336799216476.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong The parent pointers feature isn't supported on tiny 20MB filesystems because the larger directory transactions result in larger minimum log sizes, particularly with nrext64 enabled: ** mkfs failed with extra mkfs options added to " -m rmapbt=0, -i nrext64=1, -n parent=1," by test 306 ** ** attempting to mkfs using only test 306 options: -d size=20m -n size=64k ** max log size 5108 smaller than min log size 5310, filesystem is too small We don't support 20M filesystems anymore, so bump the filesystem size up to 100M and skip this test if we can't actually format the filesystem. Convert the open-coded punch-alternating logic into a call to that program to reduce execve overhead, which more than makes up having to write 5x as much data to fragment the free space. Signed-off-by: Darrick J. Wong --- tests/xfs/306 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/xfs/306 b/tests/xfs/306 index b57bf4c0a9..152971cfc3 100755 --- a/tests/xfs/306 +++ b/tests/xfs/306 @@ -23,6 +23,7 @@ _supported_fs xfs _require_scratch_nocheck # check complains about single AG fs _require_xfs_io_command "fpunch" _require_command $UUIDGEN_PROG uuidgen +_require_test_program "punch-alternating" # Disable the scratch rt device to avoid test failures relating to the rt # bitmap consuming all the free space in our small data device. @@ -30,7 +31,8 @@ unset SCRATCH_RTDEV # Create a small fs with a large directory block size. We want to fill up the fs # quickly and then create multi-fsb dirblocks over fragmented free space. -_scratch_mkfs_xfs -d size=20m -n size=64k >> $seqres.full 2>&1 +_scratch_mkfs_xfs -d size=100m -n size=64k >> $seqres.full 2>&1 || \ + _notrun 'could not format tiny scratch fs' _scratch_mount # Fill a source directory with many largish-named files. 1k uuid-named entries @@ -49,10 +51,7 @@ done $XFS_IO_PROG -xc "resblks 16" $SCRATCH_MNT >> $seqres.full 2>&1 dd if=/dev/zero of=$SCRATCH_MNT/file bs=4k >> $seqres.full 2>&1 $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/file >> $seqres.full 2>&1 -size=`_get_filesize $SCRATCH_MNT/file` -for i in $(seq 0 8192 $size); do - $XFS_IO_PROG -c "fpunch $i 4k" $SCRATCH_MNT/file >> $seqres.full 2>&1 -done +$here/src/punch-alternating $SCRATCH_MNT/file # Replicate the src dir several times into fragmented free space. After one or # two dirs, we should have nothing but non-contiguous directory blocks. From patchwork Thu Mar 16 19:34:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E5B7C6FD19 for ; Thu, 16 Mar 2023 19:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230458AbjCPTe6 (ORCPT ); Thu, 16 Mar 2023 15:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230422AbjCPTez (ORCPT ); Thu, 16 Mar 2023 15:34:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83B9D22DC2; Thu, 16 Mar 2023 12:34:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C388062101; Thu, 16 Mar 2023 19:34:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A6AFC433D2; Thu, 16 Mar 2023 19:34:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995285; bh=cU5r1uEN2UPKY6qpN/oMlEgimn71160PP/Eiq+8Qok0=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=NvJQnUxb1a4wH7bgGou44B0Rj8YSbz7qIyezW8OZjfMC/Vcza+URlNfWa8qnN0HAt tHFr7VAFLoEftp9Uh1VmRmjYm5Z5LWSA0uBW1ekmxJtumXL7luaUAk/ROk89A1vGWr 7r3Clk4LUpAsshalGYVx04rnHNrabP9r/2Orc+V/xZDjcbv4uAZus9NW1r+DNfNoba URQD7STh8O10iTbYbU2udXMLw0bMWi+6EabVC2VeaDxE9wwL0kymGQjwQZpoALgkhl n+wbnnncXyFOAM1pT5B4a1EcjaSH9Fwj6irwnvUoQwLxRxscihcXWeipyh0OsNCJbX rhH2KZj5d/IRA== Date: Thu, 16 Mar 2023 12:34:44 -0700 Subject: [PATCH 07/14] common: add helpers for parent pointer tests From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: Allison Henderson , Catherine Hoang , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417747.17926.2327266597230080013.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Allison Henderson Add helper functions in common/parent to parse and verify parent pointers. Also add functions to check that mkfs, kernel, and xfs_io support parent pointers. Signed-off-by: Allison Henderson Signed-off-by: Catherine Hoang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- common/parent | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/rc | 3 + common/xfs | 12 +++ 3 files changed, 213 insertions(+) create mode 100644 common/parent diff --git a/common/parent b/common/parent new file mode 100644 index 0000000000..a0ba7d927a --- /dev/null +++ b/common/parent @@ -0,0 +1,198 @@ +# +# Parent pointer common functions +# + +# +# parse_parent_pointer parents parent_inode parent_pointer_name +# +# Given a list of parent pointers, find the record that matches +# the given inode and filename +# +# inputs: +# parents : A list of parent pointers in the format of: +# inode/generation/name_length/name +# parent_inode : The parent inode to search for +# parent_name : The parent name to search for +# +# outputs: +# PPINO : Parent pointer inode +# PPGEN : Parent pointer generation +# PPNAME : Parent pointer name +# PPNAME_LEN : Parent pointer name length +# +_parse_parent_pointer() +{ + local parents=$1 + local pino=$2 + local parent_pointer_name=$3 + + local found=0 + + # Find the entry that has the same inode as the parent + # and parse out the entry info + while IFS=\/ read PPINO PPGEN PPNAME_LEN PPNAME; do + if [ "$PPINO" != "$pino" ]; then + continue + fi + + if [ "$PPNAME" != "$parent_pointer_name" ]; then + continue + fi + + found=1 + break + done <<< $(echo "$parents") + + # Check to see if we found anything + # We do not fail the test because we also use this + # routine to verify when parent pointers should + # be removed or updated (ie a rename or a move + # operation changes your parent pointer) + if [ $found -eq "0" ]; then + return 1 + fi + + # Verify the parent pointer name length is correct + if [ "$PPNAME_LEN" -ne "${#parent_pointer_name}" ] + then + echo "*** Bad parent pointer:"\ + "name:$PPNAME, namelen:$PPNAME_LEN" + fi + + #return sucess + return 0 +} + +# +# _verify_parent parent_path parent_pointer_name child_path +# +# Verify that the given child path lists the given parent as a parent pointer +# and that the parent pointer name matches the given name +# +# Examples: +# +# #simple example +# mkdir testfolder1 +# touch testfolder1/file1 +# verify_parent testfolder1 file1 testfolder1/file1 +# +# # In this above example, we want to verify that "testfolder1" +# # appears as a parent pointer of "testfolder1/file1". Additionally +# # we verify that the name record of the parent pointer is "file1" +# +# +# #hardlink example +# mkdir testfolder1 +# mkdir testfolder2 +# touch testfolder1/file1 +# ln testfolder1/file1 testfolder2/file1_ln +# verify_parent testfolder2 file1_ln testfolder1/file1 +# +# # In this above example, we want to verify that "testfolder2" +# # appears as a parent pointer of "testfolder1/file1". Additionally +# # we verify that the name record of the parent pointer is "file1_ln" +# +_verify_parent() +{ + local parent_path=$1 + local parent_pointer_name=$2 + local child_path=$3 + + local parent_ppath="$parent_path/$parent_pointer_name" + + # Verify parent exists + if [ ! -d $SCRATCH_MNT/$parent_path ]; then + _fail "$SCRATCH_MNT/$parent_path not found" + else + echo "*** $parent_path OK" + fi + + # Verify child exists + if [ ! -f $SCRATCH_MNT/$child_path ]; then + _fail "$SCRATCH_MNT/$child_path not found" + else + echo "*** $child_path OK" + fi + + # Verify the parent pointer name exists as a child of the parent + if [ ! -f $SCRATCH_MNT/$parent_ppath ]; then + _fail "$SCRATCH_MNT/$parent_ppath not found" + else + echo "*** $parent_ppath OK" + fi + + # Get the inodes of both parent and child + pino="$(stat -c '%i' $SCRATCH_MNT/$parent_path)" + cino="$(stat -c '%i' $SCRATCH_MNT/$child_path)" + + # Get all the parent pointers of the child + parents=($($XFS_IO_PROG -x -c \ + "parent -f -i $pino -n $parent_pointer_name" $SCRATCH_MNT/$child_path)) + if [[ $? != 0 ]]; then + _fail "No parent pointers found for $child_path" + fi + + # Parse parent pointer output. + # This sets PPINO PPGEN PPNAME PPNAME_LEN + _parse_parent_pointer $parents $pino $parent_pointer_name + + # If we didnt find one, bail out + if [ $? -ne 0 ]; then + _fail "No parent pointer record found for $parent_path"\ + "in $child_path" + fi + + # Verify the inode generated by the parent pointer name is + # the same as the child inode + pppino="$(stat -c '%i' $SCRATCH_MNT/$parent_ppath)" + if [ $cino -ne $pppino ] + then + _fail "Bad parent pointer name value for $child_path."\ + "$SCRATCH_MNT/$parent_ppath belongs to inode $PPPINO,"\ + "but should be $cino" + fi + + echo "*** Verified parent pointer:"\ + "name:$PPNAME, namelen:$PPNAME_LEN" + echo "*** Parent pointer OK for child $child_path" +} + +# +# _verify_parent parent_pointer_name pino child_path +# +# Verify that the given child path contains no parent pointer entry +# for the given inode and file name +# +_verify_no_parent() +{ + local parent_pname=$1 + local pino=$2 + local child_path=$3 + + # Verify child exists + if [ ! -f $SCRATCH_MNT/$child_path ]; then + _fail "$SCRATCH_MNT/$child_path not found" + else + echo "*** $child_path OK" + fi + + # Get all the parent pointers of the child + local parents=($($XFS_IO_PROG -x -c \ + "parent -f -i $pino -n $parent_pname" $SCRATCH_MNT/$child_path)) + if [[ $? != 0 ]]; then + return 0 + fi + + # Parse parent pointer output. + # This sets PPINO PPGEN PPNAME PPNAME_LEN + _parse_parent_pointer $parents $pino $parent_pname + + # If we didnt find one, return sucess + if [ $? -ne 0 ]; then + return 0 + fi + + _fail "Parent pointer entry found where none should:"\ + "inode:$PPINO, gen:$PPGEN," + "name:$PPNAME, namelen:$PPNAME_LEN" +} diff --git a/common/rc b/common/rc index d8e309a5f3..7cb543098d 100644 --- a/common/rc +++ b/common/rc @@ -2570,6 +2570,9 @@ _require_xfs_io_command() echo $testio | grep -q "invalid option" && \ _notrun "xfs_io $command support is missing" ;; + "parent") + testio=`$XFS_IO_PROG -x -c "parent" $TEST_DIR 2>&1` + ;; "pwrite") # -N (RWF_NOWAIT) only works with direct vectored I/O writes local pwrite_opts=" " diff --git a/common/xfs b/common/xfs index fec13baec9..68c6dd66f9 100644 --- a/common/xfs +++ b/common/xfs @@ -2091,3 +2091,15 @@ _scratch_find_rt_metadir_entry() { grep "${sfkey}.inumber" | awk '{print $1}' return 0 } + +# this test requires the xfs parent pointers feature +# +_require_xfs_parent() +{ + _scratch_mkfs_xfs_supported -n parent > /dev/null 2>&1 \ + || _notrun "mkfs.xfs does not support parent pointers" + _scratch_mkfs_xfs -n parent > /dev/null 2>&1 + _try_scratch_mount >/dev/null 2>&1 \ + || _notrun "kernel does not support parent pointers" + _scratch_unmount +} From patchwork Thu Mar 16 19:35:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178282 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1179C6FD1F for ; Thu, 16 Mar 2023 19:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbjCPTfK (ORCPT ); Thu, 16 Mar 2023 15:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbjCPTfH (ORCPT ); Thu, 16 Mar 2023 15:35:07 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69FE1410A5; Thu, 16 Mar 2023 12:35:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7DD2BCE1E66; Thu, 16 Mar 2023 19:35:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFA19C433D2; Thu, 16 Mar 2023 19:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995300; bh=D1hxR4hcDzI7zaQzeJcSLRF+m5fWvV0FuHl3W1BItCY=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=ip2hGFqwD6Cat1TZJ1V88JG39kcnCcAj61A7K96e+lsfYyutHzMKZEruuHsnXIhre cnUhnwa7nTppWMj7uZRv8NYSKhMgO42XEDYUWkedqSVhDG8/JyCc/TCxatbnKqjHT1 Mfz09fvqG2ZG0iyeC0GwxmP4HQabeDDBOQG80mQqcynmmEwuqqRsDiIYOQGKKByU7W gsbZF9eqhvdhFQOaLLAFzjBSa6/IRY6Q5RwmKy3toJlWhPt7Xmx7EKWQ2D6+vPyXjA nBIQ1hEjPBBh0JmwbsPLeRZrueRjygB5bryMTCMbo8bobTd8VaEzJiJSH+yM3SATF9 e3PLJHrtBzi/A== Date: Thu, 16 Mar 2023 12:35:00 -0700 Subject: [PATCH 08/14] xfs: add parent pointer test From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: Allison Henderson , Catherine Hoang , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417760.17926.6271389612360061946.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Allison Henderson Add a test to verify basic parent pointers operations (create, move, link, unlink, rename, overwrite). Signed-off-by: Allison Henderson Signed-off-by: Catherine Hoang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- doc/group-names.txt | 1 + tests/xfs/851 | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/851.out | 59 ++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100755 tests/xfs/851 create mode 100644 tests/xfs/851.out diff --git a/doc/group-names.txt b/doc/group-names.txt index 819039e311..87e0933103 100644 --- a/doc/group-names.txt +++ b/doc/group-names.txt @@ -83,6 +83,7 @@ nfs4_acl NFSv4 access control lists nonsamefs overlayfs layers on different filesystems online_repair online repair functionality tests other dumping ground, do not add more tests to this group +parent Parent pointer tests pattern specific IO pattern tests perms access control and permission checking pipe pipe functionality diff --git a/tests/xfs/851 b/tests/xfs/851 new file mode 100755 index 0000000000..27870ec05a --- /dev/null +++ b/tests/xfs/851 @@ -0,0 +1,101 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test 851 +# +# simple parent pointer test +# + +. ./common/preamble +_begin_fstest auto quick parent + +# get standard environment, filters and checks +. ./common/parent + +# Modify as appropriate +_supported_fs xfs +_require_scratch +_require_xfs_sysfs debug/larp +_require_xfs_parent +_require_xfs_io_command "parent" + +# real QA test starts here + +# Create a directory tree using a protofile and +# make sure all inodes created have parent pointers + +protofile=$tmp.proto + +cat >$protofile <>$seqres.full 2>&1 \ + || _fail "mkfs failed" +_check_scratch_fs + +_scratch_mount >>$seqres.full 2>&1 \ + || _fail "mount failed" + +testfolder1="testfolder1" +testfolder2="testfolder2" +file1="file1" +file2="file2" +file3="file3" +file1_ln="file1_link" + +echo "" +# Create parent pointer test +_verify_parent "$testfolder1" "$file1" "$testfolder1/$file1" + +echo "" +# Move parent pointer test +mv $SCRATCH_MNT/$testfolder1/$file1 $SCRATCH_MNT/$testfolder2/$file1 +_verify_parent "$testfolder2" "$file1" "$testfolder2/$file1" + +echo "" +# Hard link parent pointer test +ln $SCRATCH_MNT/$testfolder2/$file1 $SCRATCH_MNT/$testfolder1/$file1_ln +_verify_parent "$testfolder1" "$file1_ln" "$testfolder1/$file1_ln" +_verify_parent "$testfolder1" "$file1_ln" "$testfolder2/$file1" +_verify_parent "$testfolder2" "$file1" "$testfolder1/$file1_ln" +_verify_parent "$testfolder2" "$file1" "$testfolder2/$file1" + +echo "" +# Remove hard link parent pointer test +ino="$(stat -c '%i' $SCRATCH_MNT/$testfolder2/$file1)" +rm $SCRATCH_MNT/$testfolder2/$file1 +_verify_parent "$testfolder1" "$file1_ln" "$testfolder1/$file1_ln" +_verify_no_parent "$file1" "$ino" "$testfolder1/$file1_ln" + +echo "" +# Rename parent pointer test +ino="$(stat -c '%i' $SCRATCH_MNT/$testfolder1/$file1_ln)" +mv $SCRATCH_MNT/$testfolder1/$file1_ln $SCRATCH_MNT/$testfolder1/$file2 +_verify_parent "$testfolder1" "$file2" "$testfolder1/$file2" +_verify_no_parent "$file1_ln" "$ino" "$testfolder1/$file2" + +echo "" +# Over write parent pointer test +touch $SCRATCH_MNT/$testfolder2/$file3 +_verify_parent "$testfolder2" "$file3" "$testfolder2/$file3" +ino="$(stat -c '%i' $SCRATCH_MNT/$testfolder2/$file3)" +mv -f $SCRATCH_MNT/$testfolder2/$file3 $SCRATCH_MNT/$testfolder1/$file2 +_verify_parent "$testfolder1" "$file2" "$testfolder1/$file2" + +# success, all done +status=0 +exit diff --git a/tests/xfs/851.out b/tests/xfs/851.out new file mode 100644 index 0000000000..c375ba5f00 --- /dev/null +++ b/tests/xfs/851.out @@ -0,0 +1,59 @@ +QA output created by 851 + +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1 + +*** testfolder2 OK +*** testfolder2/file1 OK +*** testfolder2/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder2/file1 + +*** testfolder1 OK +*** testfolder1/file1_link OK +*** testfolder1/file1_link OK +*** Verified parent pointer: name:file1_link, namelen:10 +*** Parent pointer OK for child testfolder1/file1_link +*** testfolder1 OK +*** testfolder2/file1 OK +*** testfolder1/file1_link OK +*** Verified parent pointer: name:file1_link, namelen:10 +*** Parent pointer OK for child testfolder2/file1 +*** testfolder2 OK +*** testfolder1/file1_link OK +*** testfolder2/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link +*** testfolder2 OK +*** testfolder2/file1 OK +*** testfolder2/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder2/file1 + +*** testfolder1 OK +*** testfolder1/file1_link OK +*** testfolder1/file1_link OK +*** Verified parent pointer: name:file1_link, namelen:10 +*** Parent pointer OK for child testfolder1/file1_link +*** testfolder1/file1_link OK + +*** testfolder1 OK +*** testfolder1/file2 OK +*** testfolder1/file2 OK +*** Verified parent pointer: name:file2, namelen:5 +*** Parent pointer OK for child testfolder1/file2 +*** testfolder1/file2 OK + +*** testfolder2 OK +*** testfolder2/file3 OK +*** testfolder2/file3 OK +*** Verified parent pointer: name:file3, namelen:5 +*** Parent pointer OK for child testfolder2/file3 +*** testfolder1 OK +*** testfolder1/file2 OK +*** testfolder1/file2 OK +*** Verified parent pointer: name:file2, namelen:5 +*** Parent pointer OK for child testfolder1/file2 From patchwork Thu Mar 16 19:35:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4603C7618A for ; Thu, 16 Mar 2023 19:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjCPTfa (ORCPT ); Thu, 16 Mar 2023 15:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbjCPTf3 (ORCPT ); Thu, 16 Mar 2023 15:35:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A17125F537; Thu, 16 Mar 2023 12:35:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F88462100; Thu, 16 Mar 2023 19:35:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59343C433EF; Thu, 16 Mar 2023 19:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995316; bh=XkiwkjioI8Z9mjvJAdu7H5xoqp7IRN29tHkZxOE58vI=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=URTvTDFdzkBbkzjE64Jj3WjhWEVln3cQ5vVC7DOP1OghmZZ/h8j7gpv8fXmeDbSeu t3B0EZgLElCl7D3KooGDx4RA+gpH2Fd9ftp+bVqXIqvgcE3O/ZDJ03JDaRxy0tcRhx eKbx1WrCE56EqKjLNZ98qZ13HanRMqt4/qkaZGK+5JFVP7DGK28wfCVeXFUS229SKe TR4bx/17wYOSd+N8Fo/eA2MLNkNqntvGBhu31605kv8VrR5G67ctMobEJASykto4dn MYBW+Fn33J2uDvZVsym6lC3xvMii/DpVOwMzo/TSL2Ae3AXjyzbMgxSLOhhMfER+I+ R9ZGqOLUwcYQw== Date: Thu, 16 Mar 2023 12:35:15 -0700 Subject: [PATCH 09/14] xfs: add multi link parent pointer test From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: Allison Henderson , Catherine Hoang , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417774.17926.2383499304356126175.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Allison Henderson Add a test to verify parent pointers while multiple links to a file are created and removed. Signed-off-by: Allison Henderson Signed-off-by: Catherine Hoang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- tests/xfs/852 | 69 ++++ tests/xfs/852.out | 1002 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1071 insertions(+) create mode 100755 tests/xfs/852 create mode 100644 tests/xfs/852.out diff --git a/tests/xfs/852 b/tests/xfs/852 new file mode 100755 index 0000000000..4d1be0e945 --- /dev/null +++ b/tests/xfs/852 @@ -0,0 +1,69 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test 852 +# +# multi link parent pointer test +# +. ./common/preamble +_begin_fstest auto quick parent + +# get standard environment, filters and checks +. ./common/parent + +# Modify as appropriate +_supported_fs xfs +_require_scratch +_require_xfs_sysfs debug/larp +_require_xfs_parent +_require_xfs_io_command "parent" + +# real QA test starts here + +# Create a directory tree using a protofile and +# make sure all inodes created have parent pointers + +protofile=$tmp.proto + +cat >$protofile <>$seqresres.full 2>&1 \ + || _fail "mkfs failed" +_check_scratch_fs + +_scratch_mount >>$seqres.full 2>&1 \ + || _fail "mount failed" + +testfolder1="testfolder1" +file1="file1" +file1_ln="file1_link" + +echo "" +# Multi link parent pointer test +NLINKS=100 +for (( j=0; j<$NLINKS; j++ )); do + ln $SCRATCH_MNT/$testfolder1/$file1 $SCRATCH_MNT/$testfolder1/$file1_ln.$j + _verify_parent "$testfolder1" "$file1_ln.$j" "$testfolder1/$file1" + _verify_parent "$testfolder1" "$file1" "$testfolder1/$file1_ln.$j" +done +# Multi unlink parent pointer test +for (( j=$NLINKS-1; j<=0; j-- )); do + ino="$(stat -c '%i' $SCRATCH_MNT/$testfolder1/$file1_ln.$j)" + rm $SCRATCH_MNT/$testfolder1/$file1_ln.$j + _verify_no_parent "$file1_ln.$j" "$ino" "$testfolder1/$file1" +done + +# success, all done +status=0 +exit diff --git a/tests/xfs/852.out b/tests/xfs/852.out new file mode 100644 index 0000000000..9cc4b354ad --- /dev/null +++ b/tests/xfs/852.out @@ -0,0 +1,1002 @@ +QA output created by 852 + +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.0 OK +*** Verified parent pointer: name:file1_link.0, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.0 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.0 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.1 OK +*** Verified parent pointer: name:file1_link.1, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.1 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.1 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.2 OK +*** Verified parent pointer: name:file1_link.2, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.2 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.2 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.3 OK +*** Verified parent pointer: name:file1_link.3, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.3 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.3 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.4 OK +*** Verified parent pointer: name:file1_link.4, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.4 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.4 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.5 OK +*** Verified parent pointer: name:file1_link.5, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.5 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.5 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.6 OK +*** Verified parent pointer: name:file1_link.6, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.6 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.6 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.7 OK +*** Verified parent pointer: name:file1_link.7, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.7 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.7 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.8 OK +*** Verified parent pointer: name:file1_link.8, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.8 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.8 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.9 OK +*** Verified parent pointer: name:file1_link.9, namelen:12 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.9 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.9 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.10 OK +*** Verified parent pointer: name:file1_link.10, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.10 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.10 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.11 OK +*** Verified parent pointer: name:file1_link.11, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.11 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.11 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.12 OK +*** Verified parent pointer: name:file1_link.12, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.12 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.12 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.13 OK +*** Verified parent pointer: name:file1_link.13, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.13 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.13 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.14 OK +*** Verified parent pointer: name:file1_link.14, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.14 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.14 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.15 OK +*** Verified parent pointer: name:file1_link.15, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.15 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.15 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.16 OK +*** Verified parent pointer: name:file1_link.16, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.16 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.16 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.17 OK +*** Verified parent pointer: name:file1_link.17, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.17 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.17 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.18 OK +*** Verified parent pointer: name:file1_link.18, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.18 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.18 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.19 OK +*** Verified parent pointer: name:file1_link.19, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.19 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.19 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.20 OK +*** Verified parent pointer: name:file1_link.20, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.20 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.20 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.21 OK +*** Verified parent pointer: name:file1_link.21, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.21 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.21 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.22 OK +*** Verified parent pointer: name:file1_link.22, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.22 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.22 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.23 OK +*** Verified parent pointer: name:file1_link.23, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.23 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.23 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.24 OK +*** Verified parent pointer: name:file1_link.24, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.24 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.24 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.25 OK +*** Verified parent pointer: name:file1_link.25, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.25 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.25 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.26 OK +*** Verified parent pointer: name:file1_link.26, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.26 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.26 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.27 OK +*** Verified parent pointer: name:file1_link.27, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.27 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.27 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.28 OK +*** Verified parent pointer: name:file1_link.28, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.28 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.28 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.29 OK +*** Verified parent pointer: name:file1_link.29, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.29 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.29 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.30 OK +*** Verified parent pointer: name:file1_link.30, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.30 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.30 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.31 OK +*** Verified parent pointer: name:file1_link.31, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.31 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.31 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.32 OK +*** Verified parent pointer: name:file1_link.32, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.32 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.32 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.33 OK +*** Verified parent pointer: name:file1_link.33, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.33 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.33 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.34 OK +*** Verified parent pointer: name:file1_link.34, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.34 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.34 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.35 OK +*** Verified parent pointer: name:file1_link.35, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.35 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.35 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.36 OK +*** Verified parent pointer: name:file1_link.36, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.36 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.36 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.37 OK +*** Verified parent pointer: name:file1_link.37, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.37 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.37 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.38 OK +*** Verified parent pointer: name:file1_link.38, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.38 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.38 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.39 OK +*** Verified parent pointer: name:file1_link.39, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.39 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.39 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.40 OK +*** Verified parent pointer: name:file1_link.40, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.40 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.40 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.41 OK +*** Verified parent pointer: name:file1_link.41, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.41 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.41 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.42 OK +*** Verified parent pointer: name:file1_link.42, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.42 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.42 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.43 OK +*** Verified parent pointer: name:file1_link.43, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.43 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.43 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.44 OK +*** Verified parent pointer: name:file1_link.44, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.44 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.44 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.45 OK +*** Verified parent pointer: name:file1_link.45, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.45 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.45 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.46 OK +*** Verified parent pointer: name:file1_link.46, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.46 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.46 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.47 OK +*** Verified parent pointer: name:file1_link.47, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.47 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.47 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.48 OK +*** Verified parent pointer: name:file1_link.48, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.48 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.48 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.49 OK +*** Verified parent pointer: name:file1_link.49, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.49 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.49 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.50 OK +*** Verified parent pointer: name:file1_link.50, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.50 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.50 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.51 OK +*** Verified parent pointer: name:file1_link.51, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.51 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.51 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.52 OK +*** Verified parent pointer: name:file1_link.52, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.52 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.52 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.53 OK +*** Verified parent pointer: name:file1_link.53, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.53 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.53 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.54 OK +*** Verified parent pointer: name:file1_link.54, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.54 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.54 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.55 OK +*** Verified parent pointer: name:file1_link.55, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.55 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.55 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.56 OK +*** Verified parent pointer: name:file1_link.56, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.56 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.56 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.57 OK +*** Verified parent pointer: name:file1_link.57, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.57 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.57 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.58 OK +*** Verified parent pointer: name:file1_link.58, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.58 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.58 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.59 OK +*** Verified parent pointer: name:file1_link.59, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.59 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.59 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.60 OK +*** Verified parent pointer: name:file1_link.60, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.60 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.60 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.61 OK +*** Verified parent pointer: name:file1_link.61, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.61 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.61 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.62 OK +*** Verified parent pointer: name:file1_link.62, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.62 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.62 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.63 OK +*** Verified parent pointer: name:file1_link.63, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.63 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.63 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.64 OK +*** Verified parent pointer: name:file1_link.64, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.64 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.64 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.65 OK +*** Verified parent pointer: name:file1_link.65, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.65 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.65 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.66 OK +*** Verified parent pointer: name:file1_link.66, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.66 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.66 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.67 OK +*** Verified parent pointer: name:file1_link.67, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.67 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.67 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.68 OK +*** Verified parent pointer: name:file1_link.68, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.68 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.68 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.69 OK +*** Verified parent pointer: name:file1_link.69, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.69 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.69 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.70 OK +*** Verified parent pointer: name:file1_link.70, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.70 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.70 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.71 OK +*** Verified parent pointer: name:file1_link.71, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.71 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.71 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.72 OK +*** Verified parent pointer: name:file1_link.72, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.72 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.72 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.73 OK +*** Verified parent pointer: name:file1_link.73, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.73 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.73 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.74 OK +*** Verified parent pointer: name:file1_link.74, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.74 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.74 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.75 OK +*** Verified parent pointer: name:file1_link.75, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.75 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.75 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.76 OK +*** Verified parent pointer: name:file1_link.76, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.76 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.76 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.77 OK +*** Verified parent pointer: name:file1_link.77, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.77 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.77 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.78 OK +*** Verified parent pointer: name:file1_link.78, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.78 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.78 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.79 OK +*** Verified parent pointer: name:file1_link.79, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.79 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.79 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.80 OK +*** Verified parent pointer: name:file1_link.80, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.80 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.80 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.81 OK +*** Verified parent pointer: name:file1_link.81, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.81 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.81 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.82 OK +*** Verified parent pointer: name:file1_link.82, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.82 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.82 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.83 OK +*** Verified parent pointer: name:file1_link.83, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.83 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.83 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.84 OK +*** Verified parent pointer: name:file1_link.84, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.84 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.84 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.85 OK +*** Verified parent pointer: name:file1_link.85, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.85 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.85 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.86 OK +*** Verified parent pointer: name:file1_link.86, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.86 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.86 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.87 OK +*** Verified parent pointer: name:file1_link.87, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.87 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.87 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.88 OK +*** Verified parent pointer: name:file1_link.88, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.88 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.88 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.89 OK +*** Verified parent pointer: name:file1_link.89, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.89 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.89 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.90 OK +*** Verified parent pointer: name:file1_link.90, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.90 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.90 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.91 OK +*** Verified parent pointer: name:file1_link.91, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.91 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.91 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.92 OK +*** Verified parent pointer: name:file1_link.92, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.92 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.92 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.93 OK +*** Verified parent pointer: name:file1_link.93, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.93 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.93 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.94 OK +*** Verified parent pointer: name:file1_link.94, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.94 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.94 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.95 OK +*** Verified parent pointer: name:file1_link.95, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.95 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.95 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.96 OK +*** Verified parent pointer: name:file1_link.96, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.96 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.96 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.97 OK +*** Verified parent pointer: name:file1_link.97, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.97 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.97 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.98 OK +*** Verified parent pointer: name:file1_link.98, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.98 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.98 +*** testfolder1 OK +*** testfolder1/file1 OK +*** testfolder1/file1_link.99 OK +*** Verified parent pointer: name:file1_link.99, namelen:13 +*** Parent pointer OK for child testfolder1/file1 +*** testfolder1 OK +*** testfolder1/file1_link.99 OK +*** testfolder1/file1 OK +*** Verified parent pointer: name:file1, namelen:5 +*** Parent pointer OK for child testfolder1/file1_link.99 From patchwork Thu Mar 16 19:35:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178284 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 083B6C6FD1F for ; Thu, 16 Mar 2023 19:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbjCPTfh (ORCPT ); Thu, 16 Mar 2023 15:35:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbjCPTfg (ORCPT ); Thu, 16 Mar 2023 15:35:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E316F265AC; Thu, 16 Mar 2023 12:35:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6E7CAB8233B; Thu, 16 Mar 2023 19:35:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01562C433EF; Thu, 16 Mar 2023 19:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995332; bh=sUnxusCjM7KbBV1sOapwU/pO0WMHXTiwdOMaQy9glDE=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=o+ccnGjxvfWMLjClUEzM9956N721ZCtQ7Kdb+q6xl7tLW/n2dsDL5iYQJpWM9xeVo YhDfBCqwvlgnXL4zwkuqo72slNthom9Cqa4A08unyKfFuV/0p6HMafXM7RnDmzRR2o qYvJvRemvYL33nsjcrYd8Ke19rvaszE4jClaiOwZ59oxLRySEKO2IR+rDltus4xsfY dUe10apeHsltXc+cbTmqIek8KRugfns0+7ocOjI/D5jdpOkNuBXXLYJpn6a8vu0Xeo XYfS0MdxNtLskWWc9J80TZcIibPZwIM/IoBDdlFNcRD5GnpN9pqD/mkZoUFJnkqqrS OGBVMxYXgwuLg== Date: Thu, 16 Mar 2023 12:35:31 -0700 Subject: [PATCH 10/14] xfs: add parent pointer inject test From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: Allison Henderson , Catherine Hoang , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417787.17926.2362113251411757974.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Allison Henderson Add a test to verify parent pointers after an error injection and log replay. Signed-off-by: Allison Henderson Signed-off-by: Catherine Hoang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- tests/xfs/853 | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/853.out | 14 +++++++++ 2 files changed, 99 insertions(+) create mode 100755 tests/xfs/853 create mode 100644 tests/xfs/853.out diff --git a/tests/xfs/853 b/tests/xfs/853 new file mode 100755 index 0000000000..f17f4b7e9e --- /dev/null +++ b/tests/xfs/853 @@ -0,0 +1,85 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test 853 +# +# parent pointer inject test +# +. ./common/preamble +_begin_fstest auto quick parent + +# get standard environment, filters and checks +. ./common/filter +. ./common/inject +. ./common/parent + +# Modify as appropriate +_supported_fs xfs +_require_scratch +_require_xfs_sysfs debug/larp +_require_xfs_io_error_injection "larp" +_require_xfs_parent +_require_xfs_io_command "parent" + +# real QA test starts here + +# Create a directory tree using a protofile and +# make sure all inodes created have parent pointers + +protofile=$tmp.proto + +cat >$protofile <>$seqres.full 2>&1 \ + || _fail "mkfs failed" +_check_scratch_fs + +_scratch_mount >>$seqres.full 2>&1 \ + || _fail "mount failed" + +testfolder1="testfolder1" +testfolder2="testfolder2" +file4="file4" +file5="file5" + +echo "" + +# Create files +touch $SCRATCH_MNT/$testfolder1/$file4 +_verify_parent "$testfolder1" "$file4" "$testfolder1/$file4" + +# Inject error +_scratch_inject_error "larp" + +# Move files +mv $SCRATCH_MNT/$testfolder1/$file4 $SCRATCH_MNT/$testfolder2/$file5 2>&1 \ + | _filter_scratch + +# FS should be shut down, touch will fail +touch $SCRATCH_MNT/$testfolder2/$file5 2>&1 | _filter_scratch + +# Remount to replay log +_scratch_remount_dump_log >> $seqres.full + +# FS should be online, touch should succeed +touch $SCRATCH_MNT/$testfolder2/$file5 + +# Check files again +_verify_parent "$testfolder2" "$file5" "$testfolder2/$file5" + +# success, all done +status=0 +exit diff --git a/tests/xfs/853.out b/tests/xfs/853.out new file mode 100644 index 0000000000..56247c1434 --- /dev/null +++ b/tests/xfs/853.out @@ -0,0 +1,14 @@ +QA output created by 853 + +*** testfolder1 OK +*** testfolder1/file4 OK +*** testfolder1/file4 OK +*** Verified parent pointer: name:file4, namelen:5 +*** Parent pointer OK for child testfolder1/file4 +mv: cannot stat 'SCRATCH_MNT/testfolder1/file4': Input/output error +touch: cannot touch 'SCRATCH_MNT/testfolder2/file5': Input/output error +*** testfolder2 OK +*** testfolder2/file5 OK +*** testfolder2/file5 OK +*** Verified parent pointer: name:file5, namelen:5 +*** Parent pointer OK for child testfolder2/file5 From patchwork Thu Mar 16 19:35:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178285 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B87A7C7618A for ; Thu, 16 Mar 2023 19:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbjCPTfx (ORCPT ); Thu, 16 Mar 2023 15:35:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbjCPTfw (ORCPT ); Thu, 16 Mar 2023 15:35:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FA4237569; Thu, 16 Mar 2023 12:35:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CE0E0B82290; Thu, 16 Mar 2023 19:35:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93CEBC433EF; Thu, 16 Mar 2023 19:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995347; bh=+oG739zRtC1Ww7JydqKwueXkqT2Ctph6E9tcHgrZz9s=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=k9G9cCb2NWS1Pk87DDAHrrZ8g+OV0QWJIFUppiks3xkG/aMwVPQDqeeIkDrt9PUku +6fYHTJI8hvbvAehnJpZ8CS2Bi3r/rDs3ke8DIodHxhJTsYgyJmeRal3rc3oV+NIMR F0xht2RpRJBoNdINpzBPjSkvLJIuj2RY7qXxfQEtus3mV2lcmf1uYXjriITRTxLq/M TA43BuZ5UEH8G7FpA4rmHpSf+gH400apulQOOrOL64j5CRifMWl8K/kmXkLl9sYhxk Bb8YB4RxTnE1PvnUof3P26ILkk6Y9F3DedfHbjqWLqLUjNK8WmFRcc6JVkPUsURIim j4WYF9j12fO6Q== Date: Thu, 16 Mar 2023 12:35:47 -0700 Subject: [PATCH 11/14] common/parent: add license and copyright From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417800.17926.13328960872448972377.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Add the necessary licensing and copyright tags to the new file. Signed-off-by: Darrick J. Wong --- common/parent | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/parent b/common/parent index a0ba7d927a..2d52404c39 100644 --- a/common/parent +++ b/common/parent @@ -1,3 +1,6 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022-2023, Oracle and/or its affiliates. All Rights Reserved. # # Parent pointer common functions # From patchwork Thu Mar 16 19:36:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178286 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 274C9C7618A for ; Thu, 16 Mar 2023 19:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229794AbjCPTgH (ORCPT ); Thu, 16 Mar 2023 15:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbjCPTgH (ORCPT ); Thu, 16 Mar 2023 15:36:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEB0537569; Thu, 16 Mar 2023 12:36:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 79562B82290; Thu, 16 Mar 2023 19:36:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CBA3C433EF; Thu, 16 Mar 2023 19:36:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995363; bh=t15N+t2ceXCz/MHzlbqwcMkzvlNu7VE7tzxYy9MKrs4=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=mLt8+b8W10ZIXO8TlmUwUbfQj7NLW4kzM6b/Zs5vTrF0M2rXtgXt7zTHNzSmJZXF3 astZMLkeZ0B0HNhZ/fgeqWKXgo8CrpSb1qUNsiqYUY7/0V8+ZpEhuZPUAoTrie8wmK TnJqqfJYnX6vDF7YjrjG3xBF7vIo1T8dqabj3cnyf1W4OW7Weq5HK2oWvfaOadjXr3 Tg42NlOtJzwQ8brqISYcKyS5y8fBH2VDuVCw2QCclPS8+dRghF4sHONyutkNSe0ylr MdXRWCKrwZCX1NCE/98FoFoALImXoFaFEar65uGyM4VGEKL5DGxO2TOR5PDS/yAygi ag4rKp3NDXWew== Date: Thu, 16 Mar 2023 12:36:02 -0700 Subject: [PATCH 12/14] common/parent: don't _fail on missing parent pointer components From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417813.17926.14215192792910288359.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Use echo instead of _fail here so that we run as much of the test as possible. There's no need to stop the test immediately even if the pptr code isn't working. Signed-off-by: Darrick J. Wong --- common/parent | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/parent b/common/parent index 2d52404c39..8d007bd9ad 100644 --- a/common/parent +++ b/common/parent @@ -105,21 +105,21 @@ _verify_parent() # Verify parent exists if [ ! -d $SCRATCH_MNT/$parent_path ]; then - _fail "$SCRATCH_MNT/$parent_path not found" + echo "$SCRATCH_MNT/$parent_path not found" else echo "*** $parent_path OK" fi # Verify child exists if [ ! -f $SCRATCH_MNT/$child_path ]; then - _fail "$SCRATCH_MNT/$child_path not found" + echo "$SCRATCH_MNT/$child_path not found" else echo "*** $child_path OK" fi # Verify the parent pointer name exists as a child of the parent if [ ! -f $SCRATCH_MNT/$parent_ppath ]; then - _fail "$SCRATCH_MNT/$parent_ppath not found" + echo "$SCRATCH_MNT/$parent_ppath not found" else echo "*** $parent_ppath OK" fi @@ -132,7 +132,7 @@ _verify_parent() parents=($($XFS_IO_PROG -x -c \ "parent -f -i $pino -n $parent_pointer_name" $SCRATCH_MNT/$child_path)) if [[ $? != 0 ]]; then - _fail "No parent pointers found for $child_path" + echo "No parent pointers found for $child_path" fi # Parse parent pointer output. @@ -141,7 +141,7 @@ _verify_parent() # If we didnt find one, bail out if [ $? -ne 0 ]; then - _fail "No parent pointer record found for $parent_path"\ + echo "No parent pointer record found for $parent_path"\ "in $child_path" fi @@ -150,7 +150,7 @@ _verify_parent() pppino="$(stat -c '%i' $SCRATCH_MNT/$parent_ppath)" if [ $cino -ne $pppino ] then - _fail "Bad parent pointer name value for $child_path."\ + echo "Bad parent pointer name value for $child_path."\ "$SCRATCH_MNT/$parent_ppath belongs to inode $PPPINO,"\ "but should be $cino" fi @@ -174,7 +174,7 @@ _verify_no_parent() # Verify child exists if [ ! -f $SCRATCH_MNT/$child_path ]; then - _fail "$SCRATCH_MNT/$child_path not found" + echo "$SCRATCH_MNT/$child_path not found" else echo "*** $child_path OK" fi @@ -195,7 +195,7 @@ _verify_no_parent() return 0 fi - _fail "Parent pointer entry found where none should:"\ + echo "Parent pointer entry found where none should:"\ "inode:$PPINO, gen:$PPGEN," "name:$PPNAME, namelen:$PPNAME_LEN" } From patchwork Thu Mar 16 19:36:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13831C6FD1F for ; Thu, 16 Mar 2023 19:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbjCPTgX (ORCPT ); Thu, 16 Mar 2023 15:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbjCPTgW (ORCPT ); Thu, 16 Mar 2023 15:36:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E8284B810; Thu, 16 Mar 2023 12:36:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1CA4EB82302; Thu, 16 Mar 2023 19:36:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC55FC4339E; Thu, 16 Mar 2023 19:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995378; bh=bePbecE8B6uKqE7NYueUnM2J3etaK/LYKPJmICnAbP8=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=jBocLySXoCzDC3lec6m/NbABmanOxsDHBzGq4ES3Xw2ziSaeqXPObYAbqB9FayKyf LFGbF0v5gEPV5HjaBeEjbx5d/ry8FVc14vTg6fyqwvv+6rPPEqaRoKAHWWu10ZFfT1 VvKP6pa+KkLbAQlf2CBE1TuMXJPPLn74q84c8xWM8v+gSavu9dklxY9iRcvynCjODe gkNvtDPRtrtU3lzyg3wYwiPkdsVSr6YQfO8IG5fctNq3lDAKUWPiqzN168SadUqFDv yimSVY+J3+UAcG3DDOrbsngt7oIFHXFqDY0NdFcXcaHxcLamdr0NmV3eWHiNCiTHFX afEh6uPILpPSw== Date: Thu, 16 Mar 2023 12:36:18 -0700 Subject: [PATCH 13/14] common/parent: check xfs_io parent command paths From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417826.17926.2967499296381728014.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Make sure that the paths returned by the xfs_io parent command actually point to the same file. Signed-off-by: Darrick J. Wong --- common/parent | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/parent b/common/parent index 8d007bd9ad..f849e4b27c 100644 --- a/common/parent +++ b/common/parent @@ -155,6 +155,14 @@ _verify_parent() "but should be $cino" fi + # Make sure path printing works by checking that the paths returned + # all point to the same inode. + local tgt="$SCRATCH_MNT/$child_path" + $XFS_IO_PROG -x -c 'parent -p' "$tgt" | while read pptr_path; do + test "$tgt" -ef "$pptr_path" || \ + echo "$tgt parent pointer $pptr_path should be the same file" + done + echo "*** Verified parent pointer:"\ "name:$PPNAME, namelen:$PPNAME_LEN" echo "*** Parent pointer OK for child $child_path" From patchwork Thu Mar 16 19:36:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13178288 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC0F3C7618A for ; Thu, 16 Mar 2023 19:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230136AbjCPTgh (ORCPT ); Thu, 16 Mar 2023 15:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbjCPTgh (ORCPT ); Thu, 16 Mar 2023 15:36:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D11FDBDD35; Thu, 16 Mar 2023 12:36:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1246E620F9; Thu, 16 Mar 2023 19:36:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C95FC4339C; Thu, 16 Mar 2023 19:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678995394; bh=UIZczfgKMoAbondSMQ3yRYrjcrJZ+bWoTggKD3FCZdc=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=H/ty7yw9kSlBJyXPu+BeUfgBd/vCBAOVWhwcA29ahR5Az3bOXwhC2wmIsYx2gtK1e WFWtTIv0mO9nYqLcV+6clZLM9KrI9n6yX9kQdCVaZS/N6jcUde9MB7UiFQJG7ylvIK OLIqg/Mv4Jjnl2iU9oNHHLLQfecO0a2MXTnSrGQbfTfktYobPd5fzJw+wEiTUeH5OU Y8lOya3mmw/nb4W9OmNnyIrI9PCvKKWZv97FYGd7LWQdwkiyF3ZZVvlLdXlBj4ZN24 Fnmx936F14jqkHXOtF6qqNnEZUnH0MOywUw+jmPhY6qt3C9TTbL+7AzowFiwDAvtBn NhWWdYQ65IUwg== Date: Thu, 16 Mar 2023 12:36:34 -0700 Subject: [PATCH 14/14] xfs/851: test xfs_io parent -p too From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167899417839.17926.13744291683244196909.stgit@frogsfrogsfrogs> In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> References: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Test the -p argument to the xfs_io parent command too. Signed-off-by: Darrick J. Wong --- tests/xfs/851 | 15 +++++++++++++++ tests/xfs/851.out | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/tests/xfs/851 b/tests/xfs/851 index 27870ec05a..8233c1563c 100755 --- a/tests/xfs/851 +++ b/tests/xfs/851 @@ -12,6 +12,7 @@ _begin_fstest auto quick parent # get standard environment, filters and checks . ./common/parent +. ./common/filter # Modify as appropriate _supported_fs xfs @@ -96,6 +97,20 @@ ino="$(stat -c '%i' $SCRATCH_MNT/$testfolder2/$file3)" mv -f $SCRATCH_MNT/$testfolder2/$file3 $SCRATCH_MNT/$testfolder1/$file2 _verify_parent "$testfolder1" "$file2" "$testfolder1/$file2" +# Make sure that parent -p filtering works +mkdir -p $SCRATCH_MNT/dira/ $SCRATCH_MNT/dirb/ +dira_inum=$(stat -c '%i' $SCRATCH_MNT/dira) +dirb_inum=$(stat -c '%i' $SCRATCH_MNT/dirb) +touch $SCRATCH_MNT/gorn +ln $SCRATCH_MNT/gorn $SCRATCH_MNT/dira/file1 +ln $SCRATCH_MNT/gorn $SCRATCH_MNT/dirb/file1 +echo look for both +$XFS_IO_PROG -c 'parent -p' $SCRATCH_MNT/gorn | _filter_scratch +echo look for dira +$XFS_IO_PROG -c 'parent -p -n dira' -c "parent -p -i $dira_inum" $SCRATCH_MNT/gorn | _filter_scratch +echo look for dirb +$XFS_IO_PROG -c 'parent -p -n dirb' -c "parent -p -i $dirb_inum" $SCRATCH_MNT/gorn | _filter_scratch + # success, all done status=0 exit diff --git a/tests/xfs/851.out b/tests/xfs/851.out index c375ba5f00..f44d3e5d4f 100644 --- a/tests/xfs/851.out +++ b/tests/xfs/851.out @@ -57,3 +57,13 @@ QA output created by 851 *** testfolder1/file2 OK *** Verified parent pointer: name:file2, namelen:5 *** Parent pointer OK for child testfolder1/file2 +look for both +SCRATCH_MNT/gorn +SCRATCH_MNT/dira/file1 +SCRATCH_MNT/dirb/file1 +look for dira +SCRATCH_MNT/dira/file1 +SCRATCH_MNT/dira/file1 +look for dirb +SCRATCH_MNT/dirb/file1 +SCRATCH_MNT/dirb/file1