From patchwork Thu Jun 20 20:57:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706366 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18C857350E; Thu, 20 Jun 2024 20:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917032; cv=none; b=QvKaq0G1AzTuaD6ynJIWOGDTojPPYVlNrJQBo2gKxhO4i9Ss/RyFHEfk6w5TxKekW8D68tIX2x4fUcwM8gU7UMoulTp4RvhKhnO2ca73ZKCr2rvvadrDfBPI0mA2RLAsyNBq4n4Ck4KAYkIphWzipXTufRASY32N0ceszu9Twto= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917032; c=relaxed/simple; bh=lOMmhtYZTRB/eXbWRslEHla7sAp7Q33JviZdJV6SPMU=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p7ri3v/itxn5/riVP3ckvx+WW6lZBH+ZU6bYYIeHIl5jUaZNgM95z6jfktRvxCVkhEZcG9RI4htFfwjYxMMV4w/ynnRvT6CIL+bYhxeVl2F7fykrDkJaR5KIFekfCuBmUSkx2MNVT1oOBasV078maG090rRw7ifB2Ef3dCidC2c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BZyZOdyq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BZyZOdyq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE4C6C2BD10; Thu, 20 Jun 2024 20:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917032; bh=lOMmhtYZTRB/eXbWRslEHla7sAp7Q33JviZdJV6SPMU=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=BZyZOdyqp8vc5NcwQnVkGLw/4gO17+2f00O71Bp4c39l2Bb38qDMbCDjhOTqzZn0n 31gcy/Q6xBWzaAVtzQylcjLBYKVnVw8Kv7BoRe6ugGbN+DynHQSdJ8yj38a4OhWIYp RTw+WlBw1wsXlTEK56yY5f5gTNR0VxHYluzzLkalrVz0n65cUgJdhVPvvm68KeCgLu QsJ0dyu52U0oTgrAdT9VOXCKGxh0JdjJPeN3+LCDYLYiGJ6MlAJ1lWIx/rgs7rvQlJ v5mQi3WUO2zYK+3CG9mAe3j7GAd6S6Y1QyQuoyCFtW4v52WTkhBoaTGRY1VV9iHfBa uUURm+kqSLG3Q== Date: Thu, 20 Jun 2024 13:57:11 -0700 Subject: [PATCH 01/11] generic: test recovery of extended attribute updates From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669655.3035255.11665950126252228494.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Fork generic/475 to test recovery of extended attribute modifications and log recovery. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/generic/1834 | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/1834.out | 2 + 2 files changed, 95 insertions(+) create mode 100755 tests/generic/1834 create mode 100644 tests/generic/1834.out diff --git a/tests/generic/1834 b/tests/generic/1834 new file mode 100755 index 0000000000..7910a40545 --- /dev/null +++ b/tests/generic/1834 @@ -0,0 +1,93 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022-2024 Oracle, Inc. All Rights Reserved. +# +# FS QA Test No. 1834 +# +# Test log recovery with repeated (simulated) disk failures. We kick +# off fsstress on the scratch fs to exercise extended attribute operations, +# then switch out the underlying device with dm-error to see what happens when +# the disk goes down. Having taken down the fs in this manner, remount it and +# repeat. +# +. ./common/preamble +_begin_fstest shutdown auto log metadata eio recoveryloop attr + +# Override the default cleanup function. +_cleanup() +{ + cd / + rm -f $tmp.* + $KILLALL_PROG -9 fsstress > /dev/null 2>&1 + _dmerror_unmount + _dmerror_cleanup +} + +# Import common functions. +. ./common/dmerror + +# Modify as appropriate. +_supported_fs generic + +_require_scratch +_require_dm_target error +_require_command "$KILLALL_PROG" "killall" + +echo "Silence is golden." + +_scratch_mkfs >> $seqres.full 2>&1 +_require_metadata_journaling $SCRATCH_DEV +_dmerror_init +_dmerror_mount + +args=('-z' '-S' 'c') + +# Do some directory tree modifications, but the bulk of this is geared towards +# exercising the xattr code, especially attr_set which can do up to 10k values. +for verb in unlink rmdir; do + args+=('-f' "${verb}=50") +done +for verb in creat mkdir; do + args+=('-f' "${verb}=2") +done +for verb in getfattr listfattr; do + args+=('-f' "${verb}=3") +done +for verb in attr_remove removefattr; do + args+=('-f' "${verb}=4") +done +args+=('-f' "setfattr=20") +args+=('-f' "attr_set=60") # sets larger xattrs + +while _soak_loop_running $((50 * TIME_FACTOR)); do + ($FSSTRESS_PROG "${args[@]}" $FSSTRESS_AVOID -d $SCRATCH_MNT -n 999999 -p $((LOAD_FACTOR * 4)) >> $seqres.full &) \ + > /dev/null 2>&1 + + # purposely include 0 second sleeps to test shutdown immediately after + # recovery + sleep $((RANDOM % 3)) + + # This test aims to simulate sudden disk failure, which means that we + # do not want to quiesce the filesystem or otherwise give it a chance + # to flush its logs. Therefore we want to call dmsetup with the + # --nolockfs parameter; to make this happen we must call the load + # error table helper *without* 'lockfs'. + _dmerror_load_error_table + + ps -e | grep fsstress > /dev/null 2>&1 + while [ $? -eq 0 ]; do + $KILLALL_PROG -9 fsstress > /dev/null 2>&1 + wait > /dev/null 2>&1 + ps -e | grep fsstress > /dev/null 2>&1 + done + + # Mount again to replay log after loading working table, so we have a + # consistent XFS after test. + _dmerror_unmount || _fail "unmount failed" + _dmerror_load_working_table + _dmerror_mount || _fail "mount failed" +done + +# success, all done +status=0 +exit diff --git a/tests/generic/1834.out b/tests/generic/1834.out new file mode 100644 index 0000000000..5efe2033b5 --- /dev/null +++ b/tests/generic/1834.out @@ -0,0 +1,2 @@ +QA output created by 1834 +Silence is golden. From patchwork Thu Jun 20 20:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706367 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 075925101A; Thu, 20 Jun 2024 20:57:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917048; cv=none; b=WLby0XOruytktWof/xHL362U+JrsMvT5wSMrw0xcrZ4+voRsWq3snJsM1jZkr1ARp4H/+tcE3q40TlpqTWMzCtM3E9eLJzkGL+aNiC3t/4dIPoP3cAwxFb+B56GNTLAVSrQuKrAUU+5f9bhQ6033BP2GDoUydu7WRQLXwfMMmUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917048; c=relaxed/simple; bh=Uir+bDK0KDidrTaKErbe7nydLaFH+vzal8goirXvNtU=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UMZva93ugmDjEymTKUg14+pR60DwJkmkLBw0PSbB+J47s4BxnCLqAAgdCcLxhFNESau73M5udjEz7VqsU295N5mIra7roUyUPuMJ/MJJ46YmkiO4yj2KmTknnC+jghGYKS8rbfsH5zt+MqbroPpxrMyDbIrKT4ACDozl5Y0TQwc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XEjEEFUF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XEjEEFUF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 815C5C2BD10; Thu, 20 Jun 2024 20:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917047; bh=Uir+bDK0KDidrTaKErbe7nydLaFH+vzal8goirXvNtU=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=XEjEEFUFaCTymGHoBRV2jexsUfu5rC1IvVsWEJfgVii+m4omORM87UfMwCY8u2+HI tdUHofBMGHbGxVgmeuqM3X7b6ewARmxzAFh5UGyFElv2L6Z8rR8a2ZibfYGKPd5R3o LeV+wRb0JxfWfFA5n+9hvYFbzymB1SiWB6udyz8lIbUb3uwRS2QdkXNdD/Ik99gcKr au4ZP5t2+ayVfQ9p2Xr4nYteJ7xLWsCWd0gkyQEBwxWYD9qDfrLMq65BarxUQjf4T0 4YT0ZFAJBw0/iYIo8BESARl7ClibNl4JDMYNqoq1eoVdLveu2OLFXKN9rB/4zK1cFB rUbL8BN8Qwp+g== Date: Thu, 20 Jun 2024 13:57:27 -0700 Subject: [PATCH 02/11] xfs/206: filter out the parent= status from mkfs From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669671.3035255.18167512263690234854.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Filter out the parent pointer bits from the mkfs output so that we don't cause a regression in this test. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/206 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/xfs/206 b/tests/xfs/206 index f973980eb2..d81fe19857 100755 --- a/tests/xfs/206 +++ b/tests/xfs/206 @@ -65,6 +65,7 @@ mkfs_filter() -e "s/, lazy-count=[0-9]//" \ -e "/.*crc=/d" \ -e "/exchange=/d" \ + -e 's/, parent=[01]//' \ -e "/^Default configuration/d" } From patchwork Thu Jun 20 20:57:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706368 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5784574267; Thu, 20 Jun 2024 20:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917063; cv=none; b=O//1A34RB+dy0Z8q+Saom+8KtsD7w1E5LOPgt+insQB56d8hJoGf+nQTm+H9SQVeP3wEbwW/3Zrp5IIGQGE8Sdcg+Zn+VV9ECzqR4ssFc9KYs6ULbjbDU0Scv2H1tW3AO4a2N1vEkpReglZneRUPSqioEVvppZkro8ZsfWZybTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917063; c=relaxed/simple; bh=j+SfqE42SlE5sWpHa837QH0rLm7g1fAqjIYdSjPwFWc=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JC34xYhaEPd8zcnE9YWxgD4PSVsL+9tlB4Q1cU6vcpzwDROIVvBEOzS+/7IXwCWdyXhu2jSPe0SXrXlgQNuc/nryyYjgNyW4Ye8coodg3IYnj+8znUqYq6ONj8C03+3GbNtHJzvBllsVCCfhWZI4cYakpvKblOU1cHZz7dN0s04= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ozUvZ/Il; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ozUvZ/Il" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F202C4AF09; Thu, 20 Jun 2024 20:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917063; bh=j+SfqE42SlE5sWpHa837QH0rLm7g1fAqjIYdSjPwFWc=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=ozUvZ/IlbKUBIQZOL4X+InSdJPL9poB/SBrk3Km5n5QNflyrtVXmDweitqE/+PywY z1ld7cj0JBCn6qZfaqkFr12TtdRP8yI97WNqOEciRIBEZA0sxKuQyB99P8Fqj+1YtT Oyhg1cWWS5EYTHsWWkKiMBUshYVYmQGE18cJchvr+o8ts7hXQOvZwbw4U2s9EN5aPH xyDZYMDi3FLeVpJ7yUAfBISlGiS+BSoQouVUmucEkACNJRmAsJraB11WrY18h7clno OynUmfwdxeVYFPvlK8/UVoa2i3PBOc+le72yf9qCiYSbft3BwIRHypAuaZa5VWPUUI HH1kOmp3BGfUg== Date: Thu, 20 Jun 2024 13:57:42 -0700 Subject: [PATCH 03/11] xfs/122: update for parent pointers From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669686.3035255.7620855515754222234.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Update test for parent pointers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/122.out | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/xfs/122.out b/tests/xfs/122.out index 86c806d4b5..7be14ed993 100644 --- a/tests/xfs/122.out +++ b/tests/xfs/122.out @@ -100,6 +100,9 @@ sizeof(struct xfs_fsop_ag_resblks) = 64 sizeof(struct xfs_fsop_geom) = 256 sizeof(struct xfs_fsop_geom_v1) = 112 sizeof(struct xfs_fsop_geom_v4) = 112 +sizeof(struct xfs_getparents) = 40 +sizeof(struct xfs_getparents_by_handle) = 64 +sizeof(struct xfs_getparents_rec) = 32 sizeof(struct xfs_icreate_log) = 28 sizeof(struct xfs_inode_log_format) = 56 sizeof(struct xfs_inode_log_format_32) = 52 @@ -109,6 +112,7 @@ 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_rec) = 12 sizeof(struct xfs_phys_extent) = 16 sizeof(struct xfs_refcount_key) = 4 sizeof(struct xfs_refcount_rec) = 12 From patchwork Thu Jun 20 20:57:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706369 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AC9F6BB58; Thu, 20 Jun 2024 20:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917079; cv=none; b=Vd8Amm9TITRxula23zBeKzBbwsg39JvUjD+fo5N6X+sKpVx2kULJ+MKr20xhTMFGQ5pO3SVcnsdZiXOEOHxwOMxmmNlcP6RwbLj5s5qyDLhzMJqRAY/mtSLQdDfS4kI5Jlmcxx0Q7i0kSlMXIapdE+imlZZ5G0QmujN0vo5lI1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917079; c=relaxed/simple; bh=cBn6zD2gwi6O3iHZGfgj6C7EYqbk/x9FJpyavpGY0N8=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fzZqobCO7T6ydoM/jBSkcC+G7NsZf1ZFrju/J+e2fYinJTLRgz2t0IsgN56Egp9lqlp5s9oM9B3jk9FA1e7on0SgyLWRMehGsx9IlG7ZGJbADw85JpMQwhFgzCXGDcqPUZvrUwmTUHV1+TuB4Qb0tDHqJr3jKWq/Dh6JJesYAcI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LuKZkJV2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LuKZkJV2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6723C2BD10; Thu, 20 Jun 2024 20:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917078; bh=cBn6zD2gwi6O3iHZGfgj6C7EYqbk/x9FJpyavpGY0N8=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=LuKZkJV2pBwWGNBJLm5nBgx8tKvmr3l1CPpOR1qVz5qGVXgNGWNbl6PeFJBWV/2Ci bkEAxnpktsZD3Ke43Hh9M12L8/HydyV/nwaavlCmVPiaR7qJErmBs9RZ0mpAOzt8oa FPEoUs4NK4jksFi9vwn2QFexApDhmJe7g0ytNjDYuxiUSX3/0nVXQl632ChaDjqf4O nKRXEDNDXS6mT1gvMNuykuCJu1cqPNTsKya9Mskx1QyA7L2DeRanbctxNlI4UcVFBy GtMFXn6z3c9yJtZZ22/QzP66C5n7PeMegAJAEE0BkRXY7o8zFowlaAYEIUvFvXBmLL GQDSYjwMAYCcQ== Date: Thu, 20 Jun 2024 13:57:58 -0700 Subject: [PATCH 04/11] populate: create hardlinks for parent pointers From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669701.3035255.7311693728768644513.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Create some hardlinked files so that we can exercise parent pointers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/populate | 42 ++++++++++++++++++++++++++++++++++++++++++ src/popdir.pl | 11 +++++++++++ 2 files changed, 53 insertions(+) diff --git a/common/populate b/common/populate index 15f8055c2c..9fda19df06 100644 --- a/common/populate +++ b/common/populate @@ -464,6 +464,48 @@ _scratch_xfs_populate() { cp --reflink=always "${SCRATCH_MNT}/REFCOUNTBT" "${SCRATCH_MNT}/REFCOUNTBT2" fi + # Parent pointers + is_pptr="$(_xfs_has_feature "$SCRATCH_MNT" parent -v)" + 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 e89095aafe..0104957a3c 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); @@ -35,6 +36,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... @@ -56,12 +58,21 @@ if ($file_pct < 0) { $file_pct = 100; } +if ($hardlink) { + $file_pct = 100; + $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 everything after the first file + $verbose && print "ln $link_fname $fname\n"; + link $link_fname, $fname; } elsif (($i % 100) < $file_pct) { # create a file $verbose && print "touch $fname\n"; From patchwork Thu Jun 20 20:58:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706370 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BBD374E25; Thu, 20 Jun 2024 20:58:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917094; cv=none; b=oVob7UiINyXggF/p82KT8nNiLM8X2OS+fdZN06gaYLFqcPcEyVGVAvyi8Ajw2ryplwcAmSrvqQMOq3HnLayc1b7DVRt5L46vRGjeCXgBdtiUha8an5Wg5HEN1nE09DkbkSnsSGCegi7fRxnk3tQm7KSfhGGih0+7d0aCvvYrj6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917094; c=relaxed/simple; bh=Za9AEA4uAeuyk09l4ZP59WjqUqJL0iO/BSD6VL2TI/8=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JORgmoy2y2SpDkQvZGq/bxO+KHBjZhsZSgrs8kKqxegeB0b/HUNaj2TjL+WmI6VlpRIF7mwlsWuA7UAYjt2PVdtdUM1EG6eoDiWXZi29iWfVcgHIko0EPRohhzBzI9TSrMnnmw5wtZ4ZLcYBLtRs7egzYcvMRBozpM71Yd8D6Bo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BcgnrWak; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BcgnrWak" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67D7AC2BD10; Thu, 20 Jun 2024 20:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917094; bh=Za9AEA4uAeuyk09l4ZP59WjqUqJL0iO/BSD6VL2TI/8=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=BcgnrWakFsSZEne19ea6TKcpesgnitIa6NLiEepTCNVDIQD3TYQ/0nZAms6yBvTHP VN7rkzxplMU2tzgvSE3JVgBMdZwmxXxvczs1HUpske/yEEvYYOHXWYwcF5rhIdlCnD tqHbw3beNzdNZtFQwgBWaqn6H9/ereOwdWh5LusKKg6y+Ne9UnAA/yLjzEiP5P3U1B 7BywYj3ChfMo79H5YtpgVI6XRPdMv3EwaGeh9HlbUSZ8Nk44A0oNE7f09jTFXy5rfe JN9FK25i7lghMZmu4dGA77ENFGIL1M+TV3XH2ho3gY7zPkc82ur+GJUmE9iVPV9t/I 2n2Ot6n9SaEnQ== Date: Thu, 20 Jun 2024 13:58:13 -0700 Subject: [PATCH 05/11] xfs/021: adapt golden output files for parent pointers From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669717.3035255.10688612555103531295.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Parent pointers change the xattr structure dramatically, so fix this test to handle them. For the most part we can get away with filtering out the parent pointer fields (which xfs_db decodes for us), but the namelen/valuelen/attr_filter fields still show through. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- 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 9e69af1527..ba26fda6e6 100644 --- a/common/rc +++ b/common/rc @@ -3472,6 +3472,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; @@ -3507,6 +3509,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..34f120c713 --- /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 = 49 +a.sfattr.hdr.count = 3 +a.sfattr.list[0].namelen = 10 +a.sfattr.list[0].valuelen = 12 +a.sfattr.list[0].root = 0 +a.sfattr.list[0].name = "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 = 80 +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 = 8 +nvlist[2].namelen = 7 +nvlist[2].name = "a2-----" +nvlist[2].value = "value_2\d" +nvlist[3].valuelen = 12 +nvlist[3].namelen = 10 +nvlist[3].name = "testfile.2" +*** done +*** unmount From patchwork Thu Jun 20 20:58:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706371 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B8576BB58; Thu, 20 Jun 2024 20:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917111; cv=none; b=lOW3X7Od0eBFKSQCPSpgk6d1vaqHemM+5rM3EH5LXcYR+xXpGMsvhXakEUZFJDjr2cc7vLeiFvcnbOF684uCEh7M4Vxd0zd3+bo/tZpHhnOtX+Z5c81CvO4VuZZDiinWw3n+T+oqORJShlOCqPTDCLI9HwK4xWc/AjBaPQEjqek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917111; c=relaxed/simple; bh=LvMjZvXlMf4yFgltuVMIZShvUZGVUFeDJWOYYx0xlwg=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=H2Pmi7KJ5oZ3jXJJQoaqrgtT10lvR0cjWc7La+imPtc3MWJajvY4W7cUv2IPu0INuBPR0IHyW4CUOfvsvbcXYPcjJj86dEm8Z3j48la/OLXU1wsgkLWQxy1hONkwJxPMWFugwxnlTRHX2GPIATLtwxUQNu6at4l9qhHZjkZp0Ow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kZt+uUYB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kZt+uUYB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 208D7C32781; Thu, 20 Jun 2024 20:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917110; bh=LvMjZvXlMf4yFgltuVMIZShvUZGVUFeDJWOYYx0xlwg=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=kZt+uUYB40ZzFMVBrcfkV7gL5P6pIsVpAoDMiqQVt+DFZqN4CmTMVYfE1kecBEvjK SldQ49QAsrvRO4f9L1R7YyLLGRJpHnr+WdHYxMPiwCpYQ+giXWoG24Wpjp5cLcACR+ nWKEW0flUJ9ZIYybEzf9Yf7TcbkUiTW8QHqRh4SQoyH4Bw1nyoOTr4RgzUprXKkz51 9u2tLxaa7qHys/JIKXv/u89x2YWr6LzZ5Cn+f4o4JgAj3nYe02oYax4uSILBbWEmsN zUnsM4vxEpW2Tj2qFLzNB3xlZE6g4R/TSmCY/91kRt6khf8Zu+2vIYzIzd29hbxUCL ebTz4xSjDduBQ== Date: Thu, 20 Jun 2024 13:58:29 -0700 Subject: [PATCH 06/11] xfs/{018,191,288}: disable parent pointers for these tests From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669731.3035255.3411599744154340279.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong These tests depend 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 Reviewed-by: Christoph Hellwig --- common/xfs | 16 ++++++++++++++++ tests/xfs/018 | 4 ++++ tests/xfs/191 | 3 +++ tests/xfs/288 | 4 ++++ 4 files changed, 27 insertions(+) diff --git a/common/xfs b/common/xfs index 0b0863f1dc..b392237575 100644 --- a/common/xfs +++ b/common/xfs @@ -1847,3 +1847,19 @@ _require_xfs_nocrc() _notrun "v4 file systems not supported" _scratch_unmount } + +# Adjust MKFS_OPTIONS as necessary to avoid having parent pointers formatted +# onto the filesystem +_xfs_force_no_pptrs() +{ + # Nothing to do if parent pointers aren't supported by mkfs + $MKFS_XFS_PROG 2>&1 | grep -q parent=0 || return + + if echo "$MKFS_OPTIONS" | grep -q 'parent='; then + MKFS_OPTIONS="$(echo "$MKFS_OPTIONS" | \ + sed -e 's/parent=[01]/parent=0/g')" + return + fi + + MKFS_OPTIONS="$MKFS_OPTIONS -n parent=0" +} diff --git a/tests/xfs/018 b/tests/xfs/018 index 73040edc92..7d1b861d1c 100755 --- a/tests/xfs/018 +++ b/tests/xfs/018 @@ -111,6 +111,10 @@ attr32l="X$attr32k" attr64k="$attr32k$attr32k" echo "*** mkfs" + +# Parent pointers change the xattr formats sufficiently to break this test. +# Disable parent pointers if mkfs supports it. +_xfs_force_no_pptrs _scratch_mkfs >/dev/null blk_sz=$(_scratch_xfs_get_sb_field blocksize) diff --git a/tests/xfs/191 b/tests/xfs/191 index 7a02f1be21..e2150bf797 100755 --- a/tests/xfs/191 +++ b/tests/xfs/191 @@ -33,6 +33,9 @@ _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" +# Parent pointers change the xattr formats sufficiently to break this test. +# Disable parent pointers if mkfs supports it. +_xfs_force_no_pptrs _scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs cat $tmp.mkfs >> $seqres.full source $tmp.mkfs diff --git a/tests/xfs/288 b/tests/xfs/288 index aa664a266e..60fb9360f4 100755 --- a/tests/xfs/288 +++ b/tests/xfs/288 @@ -19,6 +19,10 @@ _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. +_xfs_force_no_pptrs + # get block size ($dbsize) from the mkfs output _scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs From patchwork Thu Jun 20 20:58:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706372 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0610874267; Thu, 20 Jun 2024 20:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917126; cv=none; b=PnavNfEvwxb/5FmddiE1UP6LfNulJAg8DintPmEw5PZXKHmezEsk7cFEOnGDDmFKIRRS+KmGMWDENG1lM8C3rVnun44pqGqjxmqySrhskubz0gTHEg3zIbKAW9kZv70S3X6eDc2miUHkEjI/77RJInr/inqHioZak1uYQPGWtGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917126; c=relaxed/simple; bh=EI5+XgB4583IhijoQlbEVIbwxUKPKGNVDzW70ppEqsE=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jCJSO5OgGQrTarsYQ4YIMPkAYL9t0rnSxLSG6QxOMVPhxUJ7/Gklx2Mv8t1HPQfUjA0lOr+pNgNNwsIZEyYEqtFtlrHtbU33tkGObg7fuV6FyzAK6QP81Dc7QZbDDO2ypcZWcgmnSA1lx04bdA41wT0PxfTPBFKSpKWcan9LyNc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ASixN841; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ASixN841" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3929C2BD10; Thu, 20 Jun 2024 20:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917125; bh=EI5+XgB4583IhijoQlbEVIbwxUKPKGNVDzW70ppEqsE=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=ASixN841IQ4lg4xEnHHx2TLVQIYOpjK8VEj3x++n1tnjl533Z8lzw4YocHkMh1ZLV 7ru/3M7XG0dbx8LofBxIB31cRba3d0PTNx43E/EgmCvQCa+TceX/SToN5BbAHQEt0+ muWODz9ev4nwpRB7h8ETHllWoOykOauiSBYr2fm8t4ZGmBx8bjwsJBdRu/M3KTeG6q mkf0TGmY18NWAe8QxOfYXR0MZHbjU9VRTl/ZfQtVY4mNLjbVnXIBuwoaVNRnPWfjtn rl+hlkg0d8NoaDtzO+7HnIJ/PE3T8Sed9awppZ8CynbVz+Zsx/9g+0INlXDeQijN2I aab9xaWq3Um9A== Date: Thu, 20 Jun 2024 13:58:45 -0700 Subject: [PATCH 07/11] xfs/306: fix formatting failures with parent pointers From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669746.3035255.11485056050489942000.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Christoph Hellwig --- 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 Jun 20 20:59:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706373 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16A3A74267; Thu, 20 Jun 2024 20:59:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917142; cv=none; b=H1YC2251fQJuDyvSb9G/oHhQeGYhpPS55SwXH2/8XuO3lsudhEju7FnyBUAb+1KgAJln5yhQnawjM9/bQ/QAPQdup6oa9DxJUonG0IUV5scB/FofThvDc3lo/F/SVLVJmXjkhj40VcZP8cpb2E2q/rNeojjACkyqEElMP+15Q1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917142; c=relaxed/simple; bh=cCGKIvpusp+L8n26M6HutqBkmgdcbilOUuEoP1GJfOU=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=goQ5afj+JVZaNuLOfXwUxppPSupMGs8RZzmKIvsvIZTQGPK9sFnnN9KrCDpGJunhqgT15nYzZm+BoNed8LOSJIKdIcf/TmFuEh09952I1fnmJAzpV7HqB7+jyJ6hNERuMTxsGbNb1d/DP6SUcdv5jwmH0dKpx60KmMjYnWqzo/c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hQODsHpz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hQODsHpz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85BD4C2BD10; Thu, 20 Jun 2024 20:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917141; bh=cCGKIvpusp+L8n26M6HutqBkmgdcbilOUuEoP1GJfOU=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=hQODsHpz3uDEGtpqYv9QlY6ocnRAI2Vanvl030mL6SZlEUi9eFB6N1+GhPEZdaM2b xvdwdmjJJnBZ1lw/6JkU41DwC4JdM+QAnc9HZlbzDdo4QKCkFYkscjnYxmp7QLP45W VGrcwrJ645T0AnSHXT96Eyq4/xAByya2sAcUfTKGhqfWHwyKbyFpaYQSI4bQFXp4h2 nlfgppnWWNOsG+uxhNvvBkLMZTXNSEloMswyPL6jkBBfb6m1r7SsYHR/Qa5eXBySz8 YdZLM6m60BZ33RM+9d9FWCm0soglzj7eneF+5PRinJ+f2tl2LTHkjJ0JJ2n9bkRsDF P0cZKYxthQTXw== Date: Thu, 20 Jun 2024 13:59:01 -0700 Subject: [PATCH 08/11] common: add helpers for parent pointer tests From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Allison Henderson , Catherine Hoang , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669761.3035255.13957512603260230023.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 [djwong: add license and copyright, dont _fail tests immediately, make sure the pptr-generated paths match the dir-generated paths] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/parent | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/rc | 3 + common/xfs | 12 +++ 3 files changed, 224 insertions(+) create mode 100644 common/parent diff --git a/common/parent b/common/parent new file mode 100644 index 0000000000..ccdf2bb4bd --- /dev/null +++ b/common/parent @@ -0,0 +1,209 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022-2024 Oracle and/or its affiliates. All Rights Reserved. +# +# 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 +# +_xfs_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 +} + +# +# _xfs_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" +# +_xfs_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 + echo "$SCRATCH_MNT/$parent_path not found" + else + echo "*** $parent_path OK" + fi + + # Verify child exists + if [ ! -f $SCRATCH_MNT/$child_path ]; then + 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 + echo "$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 -s -i $pino -n $parent_pointer_name" $SCRATCH_MNT/$child_path)) + if [[ $? != 0 ]]; then + echo "No parent pointers found for $child_path" + fi + + # Parse parent pointer output. + # This sets PPINO PPGEN PPNAME PPNAME_LEN + _xfs_parse_parent_pointer $parents $pino $parent_pointer_name + + # If we didnt find one, bail out + if [ $? -ne 0 ]; then + echo "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 + echo "Bad parent pointer name value for $child_path."\ + "$SCRATCH_MNT/$parent_ppath belongs to inode $PPPINO,"\ + "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" +} + +# +# _xfs_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 +# +_xfs_verify_no_parent() +{ + local parent_pname=$1 + local pino=$2 + local child_path=$3 + + # Verify child exists + if [ ! -f $SCRATCH_MNT/$child_path ]; then + echo "$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 -s -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 + _xfs_parse_parent_pointer $parents $pino $parent_pname + + # If we didnt find one, return sucess + if [ $? -ne 0 ]; then + return 0 + fi + + echo "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 ba26fda6e6..0e0d49b87a 100644 --- a/common/rc +++ b/common/rc @@ -2742,6 +2742,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 b392237575..7706b56260 100644 --- a/common/xfs +++ b/common/xfs @@ -1863,3 +1863,15 @@ _xfs_force_no_pptrs() MKFS_OPTIONS="$MKFS_OPTIONS -n parent=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 Jun 20 20:59:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706374 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EF11757E3; Thu, 20 Jun 2024 20:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917157; cv=none; b=pZgElcrsEzBKswyFuXToe4B41uyGdwzOC3XY3I8Fs0XLXBDCBjJyj7RPuowhEhPCekxJmrfQESgo873V4iukcSZJcxIxTlFjIY9NndpTR0JmeWRxC9hqkBZwCihNd3qSGim9/2D/PWYUFOrQ1Mps8KVwaM3Mjw228ESLO9GZrlE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917157; c=relaxed/simple; bh=yvKDvIopj58Q5hC05A9T5j5TNZDhWJ6AqKVwdsv4Hf0=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OwJHctbjlMt5Je0Hr5Evi8jva9MYP6b9DXvgaYyFiw6/p+jsscYzb1/wVFypJ/AXuL6cmn8miEy0F7sj1QMzjeHcqU/sOIRCaxgYm36Kp+NyIYTEGcDEPylxzwGe2AspSVhZlSEciNxD8+dY4EQe/FeGqyzrPRw8UZwcUrXShUo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KNCxYfvU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KNCxYfvU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 334ACC2BD10; Thu, 20 Jun 2024 20:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917157; bh=yvKDvIopj58Q5hC05A9T5j5TNZDhWJ6AqKVwdsv4Hf0=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=KNCxYfvU14bB03C4LiZIBSfrMNRc4i2aid6yeUAhYNZbs0wMMDynOezYbux9xmG+K v680Tblsp/xCfF2XJEhhBdNK4q/t2saelE8drYKRvAtAYPWgVGj0/ugsRDOupVHjtN P1acYgw/Xv8LKowFWOEbELGjNKNxHF6UoEP9/FkeIYlMzKDcExqqcNMBze4jAqZ0GS QA8a+QotUFpuJyzZt0LxSf6hNMgjEL7Wiqw3fu9W4twme5VkF9DETjnMOPpBGyro6V 1yr/V64N93f7eiRtp5odwxJ/OYtOyAdfhjt9Cf3+ekGcwujNezFuBnzLIA1DkroUAt BziSc3QxHLK/Q== Date: Thu, 20 Jun 2024 13:59:16 -0700 Subject: [PATCH 09/11] xfs: add parent pointer test From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Allison Henderson , Catherine Hoang , Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669776.3035255.4714645877031003126.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 [djwong: test the xfs_io parent -p argument too] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- doc/group-names.txt | 1 tests/xfs/1851 | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1851.out | 69 ++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+) create mode 100755 tests/xfs/1851 create mode 100644 tests/xfs/1851.out diff --git a/doc/group-names.txt b/doc/group-names.txt index 2c4c312700..6cf717969d 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/1851 b/tests/xfs/1851 new file mode 100755 index 0000000000..99c1a28a8c --- /dev/null +++ b/tests/xfs/1851 @@ -0,0 +1,116 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022-2024 Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 1851 +# +# simple parent pointer test +# + +. ./common/preamble +_begin_fstest auto quick parent + +# get standard environment, filters and checks +. ./common/parent +. ./common/filter + +# 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 +_xfs_verify_parent "$testfolder1" "$file1" "$testfolder1/$file1" + +echo "" +# Move parent pointer test +mv $SCRATCH_MNT/$testfolder1/$file1 $SCRATCH_MNT/$testfolder2/$file1 +_xfs_verify_parent "$testfolder2" "$file1" "$testfolder2/$file1" + +echo "" +# Hard link parent pointer test +ln $SCRATCH_MNT/$testfolder2/$file1 $SCRATCH_MNT/$testfolder1/$file1_ln +_xfs_verify_parent "$testfolder1" "$file1_ln" "$testfolder1/$file1_ln" +_xfs_verify_parent "$testfolder1" "$file1_ln" "$testfolder2/$file1" +_xfs_verify_parent "$testfolder2" "$file1" "$testfolder1/$file1_ln" +_xfs_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 +_xfs_verify_parent "$testfolder1" "$file1_ln" "$testfolder1/$file1_ln" +_xfs_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 +_xfs_verify_parent "$testfolder1" "$file2" "$testfolder1/$file2" +_xfs_verify_no_parent "$file1_ln" "$ino" "$testfolder1/$file2" + +echo "" +# Over write parent pointer test +touch $SCRATCH_MNT/$testfolder2/$file3 +_xfs_verify_parent "$testfolder2" "$file3" "$testfolder2/$file3" +ino="$(stat -c '%i' $SCRATCH_MNT/$testfolder2/$file3)" +mv -f $SCRATCH_MNT/$testfolder2/$file3 $SCRATCH_MNT/$testfolder1/$file2 +_xfs_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/1851.out b/tests/xfs/1851.out new file mode 100644 index 0000000000..99a9d42892 --- /dev/null +++ b/tests/xfs/1851.out @@ -0,0 +1,69 @@ +QA output created by 1851 + +*** 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 +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 From patchwork Thu Jun 20 20:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706375 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67B63B65D; Thu, 20 Jun 2024 20:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917173; cv=none; b=hS7656HnGoln4jCz6revT3icMENw2Wf9UsUZdEAhsHE50tPqvu3krca4NGuLjcI7OrKNebJyv98qeKh8cGw17wMojm+5bCnwy5cA0SPq4C4k4vIfB8t66i+1Jm1S5AppzFTkRyyLczNXZwQg1uuwuD6z2enWwnPIdg9luNi29iU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917173; c=relaxed/simple; bh=UbIhIA1pk0qlpf3KAIUgZkFEW7601nAd80gyj4IU06c=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bclP8wMTRtUSlUP4KxpswlOSTX9kyDfADdqijElZNggw4ArMcvcC40ZbbqOm7Xz/YOyVh372N3kPnXeHd3I45ngowGw02wcoF1ixi3m5Se9pLYJzz+uPhcz2u8KLKqrEbPspKGYBkmIOXK3d28V6aBSum6qF7MDW3MQIGtf7d7M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ekhxr2ae; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ekhxr2ae" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD7FCC2BD10; Thu, 20 Jun 2024 20:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917172; bh=UbIhIA1pk0qlpf3KAIUgZkFEW7601nAd80gyj4IU06c=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=Ekhxr2aeUgpBpRfK0nbtbYySkSldt/9QUmx4p960Jc6BE3ZZB8DRmP8OrOctUMBfn vsuEUgp2LU018CDlndOShBRt0Ddh7sQHziOGWjohqNG+Sajd1XAAITxKvF7MSte3Bd 236ecO4joAOCkXQl5IGQufbTlrjbpT5RLL7Rl2VDugsFJQtrSXO6ocfN3ZsYBv7nuZ L7RjfROosELiA8c5gfjg+97geBh4S5BPXh62sIotqSP82tCUWf80QFOexejgd0r5vQ 7b9n4bHZjqyxs6aeZ7RwAmhyaHdiFW8Cf3o+Djh9HwHeC+Usu28w2mjFXpUG/t/S6x phuV3lpIMgvTg== Date: Thu, 20 Jun 2024 13:59:32 -0700 Subject: [PATCH 10/11] xfs: add multi link parent pointer test From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Allison Henderson , Catherine Hoang , Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669791.3035255.9136860739953743102.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Christoph Hellwig --- tests/xfs/1852 | 69 ++++ tests/xfs/1852.out | 1002 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1071 insertions(+) create mode 100755 tests/xfs/1852 create mode 100644 tests/xfs/1852.out diff --git a/tests/xfs/1852 b/tests/xfs/1852 new file mode 100755 index 0000000000..f0559604a3 --- /dev/null +++ b/tests/xfs/1852 @@ -0,0 +1,69 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022-2024 Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 1852 +# +# 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 + _xfs_verify_parent "$testfolder1" "$file1_ln.$j" "$testfolder1/$file1" + _xfs_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 + _xfs_verify_no_parent "$file1_ln.$j" "$ino" "$testfolder1/$file1" +done + +# success, all done +status=0 +exit diff --git a/tests/xfs/1852.out b/tests/xfs/1852.out new file mode 100644 index 0000000000..a13664d481 --- /dev/null +++ b/tests/xfs/1852.out @@ -0,0 +1,1002 @@ +QA output created by 1852 + +*** 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 Jun 20 20:59:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13706376 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B236274E25; Thu, 20 Jun 2024 20:59:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917188; cv=none; b=FZnRcTnlakhu9FvsM4tXg5Mu92M0gSEAKapBraOL7YdqJy1pLgTlV7vSyfsdOX9HwFMvvRQrEI99+q7LU3wNDDqFA0zciiOWP1ei81AOu8PsZHUzUR5XHRakRtx6AThBKgmP/KqQawyGzDDdLPISWcXsLIub7gI0vsalUpmjXMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718917188; c=relaxed/simple; bh=enXH2pEXSDvEjzvXRDx3hnHjkAm+w4OwdqNsZua0PSw=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rT++MjTHN8shsdN8PuLPnKX+hwrPPEYo8sBSyd6US3byuE1V/DTwrPr0ySWlG09sNr9dyU1G4masV1OBzCUTn5P635jr9h7Mg4rPd97Z77ZGA41ZJrc0p09PRWw/HonNmO0iaTcJjZqB/Gs48FXSefAyBkWGlRRMOqF2SZ6+hHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hwIhBJAH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hwIhBJAH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 853A0C2BD10; Thu, 20 Jun 2024 20:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718917188; bh=enXH2pEXSDvEjzvXRDx3hnHjkAm+w4OwdqNsZua0PSw=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=hwIhBJAHyBDx/BoAHE/jhl04vuGmZFAHl0LZdwtZ0ymsqzOyyvg8l3ed1ENvJJ+gL /GtNjYupfpJqhBfoZyU6FSFbd/ATQgZ+1+12Xbe7QtKyEgj3YnxPu/KuhDRbLD2rHl XZHG7WnTFbtmY9X1K0H6yzNjiKa0XGZwM9jcLJqbDBdzXbD0WSP7zLmUG4iR6IJUZc Xe8fbZbiVnlfqZPDMbWZm/m2iJscAtLvpQoeeimpk5sRWXti4rHG61LOap4Qk4Me9A JDP6KF1hlMw0sSRDV9s0NppxF42FNFFfiX/7nIDHbDSydR2RgnbqtN3eHqo3+BfJph 2DWPPRkktos2A== Date: Thu, 20 Jun 2024 13:59:48 -0700 Subject: [PATCH 11/11] xfs: add parent pointer inject test From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: Allison Henderson , Catherine Hoang , Christoph Hellwig , fstests@vger.kernel.org, allison.henderson@oracle.com, catherine.hoang@oracle.com, linux-xfs@vger.kernel.org Message-ID: <171891669807.3035255.7966365981580716720.stgit@frogsfrogsfrogs> In-Reply-To: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> References: <171891669626.3035255.15795876594098866722.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Christoph Hellwig --- tests/xfs/1853 | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1853.out | 14 +++++++++ 2 files changed, 99 insertions(+) create mode 100755 tests/xfs/1853 create mode 100644 tests/xfs/1853.out diff --git a/tests/xfs/1853 b/tests/xfs/1853 new file mode 100755 index 0000000000..7fdb46a580 --- /dev/null +++ b/tests/xfs/1853 @@ -0,0 +1,85 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022-2024 Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 1853 +# +# 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 +_xfs_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 +_xfs_verify_parent "$testfolder2" "$file5" "$testfolder2/$file5" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1853.out b/tests/xfs/1853.out new file mode 100644 index 0000000000..736f6dec00 --- /dev/null +++ b/tests/xfs/1853.out @@ -0,0 +1,14 @@ +QA output created by 1853 + +*** 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