From: "Darrick J. Wong" <djwong@kernel.org>
To: zlang@redhat.com, djwong@kernel.org
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 13/14] common/parent: check xfs_io parent command paths
Date: Thu, 16 Mar 2023 12:36:18 -0700 [thread overview]
Message-ID: <167899417826.17926.2967499296381728014.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <167899417650.17926.7405859750613330339.stgit@frogsfrogsfrogs>
From: Darrick J. Wong <djwong@kernel.org>
Make sure that the paths returned by the xfs_io parent command actually
point to the same file.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
common/parent | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/common/parent b/common/parent
index 8d007bd9ad..f849e4b27c 100644
--- a/common/parent
+++ b/common/parent
@@ -155,6 +155,14 @@ _verify_parent()
"but should be $cino"
fi
+ # Make sure path printing works by checking that the paths returned
+ # all point to the same inode.
+ local tgt="$SCRATCH_MNT/$child_path"
+ $XFS_IO_PROG -x -c 'parent -p' "$tgt" | while read pptr_path; do
+ test "$tgt" -ef "$pptr_path" || \
+ echo "$tgt parent pointer $pptr_path should be the same file"
+ done
+
echo "*** Verified parent pointer:"\
"name:$PPNAME, namelen:$PPNAME_LEN"
echo "*** Parent pointer OK for child $child_path"
next prev parent reply other threads:[~2023-03-16 19:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 18:54 [RFC DELUGE v10r1d2] xfs: Parent Pointers Darrick J. Wong
2023-03-16 19:19 ` [PATCHSET v10r1d2 00/14] fstests: adjust tests for xfs parent pointers Darrick J. Wong
2023-03-16 19:33 ` [PATCH 01/14] xfs/122: update for " Darrick J. Wong
2023-03-16 19:33 ` [PATCH 02/14] populate: create hardlinks " Darrick J. Wong
2023-03-16 19:33 ` [PATCH 03/14] xfs/021: adapt golden output files " Darrick J. Wong
2023-03-16 19:33 ` [PATCH 04/14] generic/050: adapt " Darrick J. Wong
2023-03-16 19:34 ` [PATCH 05/14] xfs/018: disable parent pointers for this test Darrick J. Wong
2023-03-16 19:34 ` [PATCH 06/14] xfs/306: fix formatting failures with parent pointers Darrick J. Wong
2023-03-16 19:34 ` [PATCH 07/14] common: add helpers for parent pointer tests Darrick J. Wong
2023-03-16 19:35 ` [PATCH 08/14] xfs: add parent pointer test Darrick J. Wong
2023-03-16 19:35 ` [PATCH 09/14] xfs: add multi link " Darrick J. Wong
2023-03-16 19:35 ` [PATCH 10/14] xfs: add parent pointer inject test Darrick J. Wong
2023-03-16 19:35 ` [PATCH 11/14] common/parent: add license and copyright Darrick J. Wong
2023-03-16 19:36 ` [PATCH 12/14] common/parent: don't _fail on missing parent pointer components Darrick J. Wong
2023-03-16 19:36 ` Darrick J. Wong [this message]
2023-03-16 19:36 ` [PATCH 14/14] xfs/851: test xfs_io parent -p too Darrick J. Wong
2023-03-16 19:19 ` [PATCHSET v10r1d2 0/1] xfs: bug fixes for parent pointers Darrick J. Wong
2023-03-16 19:36 ` [PATCH 1/1] xfs/122: fix parent pointer ioctl structure sizes Darrick J. Wong
2023-03-16 19:19 ` [PATCHSET v10r1d2 0/1] fstests: encode parent pointer name in xattr key Darrick J. Wong
2023-03-16 19:37 ` [PATCH 1/1] xfs/{021,122}: adjust parent pointer encoding format Darrick J. Wong
2023-03-17 19:06 ` [RFC DELUGE v10r1d2] xfs: Parent Pointers Allison Henderson
2023-03-17 23:45 ` Darrick J. Wong
2023-03-21 21:14 ` Allison Henderson
2023-03-25 17:02 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2023-02-16 20:32 [PATCHSET 00/14] fstests: adjust tests for xfs parent pointers Darrick J. Wong
2023-02-16 21:16 ` [PATCH 13/14] common/parent: check xfs_io parent command paths Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=167899417826.17926.2967499296381728014.stgit@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).