From: Darrick J. Wong <djwong@xxxxxxxxxx> 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@xxxxxxxxxx> --- 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"