mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
qa tests for parentptr stuff
on irix Merge of master-melb:xfs-cmds:22663a by kenmcd. test if after various vnodeops, dirstress and fsstress that the filesystem is still consistent in regards to parentptr EAs
This commit is contained in:
@@ -0,0 +1,459 @@
|
||||
#! /bin/sh
|
||||
# FS QA Test No. 114
|
||||
#
|
||||
# Test some parent ptr stuff
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2 of the GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Further, this software is distributed without any warranty that it is
|
||||
# free of the rightful claim of any third person regarding infringement
|
||||
# or the like. Any license provided herein, whether implied or
|
||||
# otherwise, applies only to this software file. Patent licenses, if
|
||||
# any, provided herein do not apply to combinations of this program with
|
||||
# other software, or any other product whatsoever.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write the Free Software Foundation, Inc., 59
|
||||
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
#
|
||||
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
|
||||
# Mountain View, CA 94043, or:
|
||||
#
|
||||
# http://www.sgi.com
|
||||
#
|
||||
# For further information regarding this notice, see:
|
||||
#
|
||||
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=tes@crackle.melbourne.sgi.com
|
||||
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
}
|
||||
|
||||
# Example output:
|
||||
#
|
||||
# ~/attr -Fl a/b/c/d/foo
|
||||
# Attribute "0000000000180080 0000000000000001" has a 3 byte value for a/b/c/d/foo
|
||||
#
|
||||
# ~/attr -Fg "0000000000180080 0000000000000001" a/b/c/d/foo
|
||||
# Attribute "0000000000180080 0000000000000001" had a 3 byte value for a/b/c/d/foo:
|
||||
# foo
|
||||
#
|
||||
# ~/attr -Pg "0000000000180080 0000000000000001" a/b/c/d/foo
|
||||
# Attribute "0000000000180080 0000000000000001" had a 12 byte value for a/b/c/d/foo:
|
||||
# /a/b/c/d/foo
|
||||
#
|
||||
|
||||
|
||||
_print_names()
|
||||
{
|
||||
typeset path
|
||||
path=$1
|
||||
|
||||
echo ""
|
||||
echo "Print out hardlink names for given path, $path"
|
||||
echo ""
|
||||
|
||||
# get out the ea name
|
||||
attr -Fl $path | tee $tmp.attr1
|
||||
cat $tmp.attr1 |\
|
||||
sed -e 's/"//g' |\
|
||||
nawk >$tmp.attr2 '/^Attribute/ { print $2, $3; next }'
|
||||
|
||||
while read ino cnt; do
|
||||
eaname="$ino $cnt"
|
||||
|
||||
# use the ea name to get the filename value
|
||||
attr -Fg "$eaname" $path
|
||||
|
||||
# use the ea name to get the pathname value
|
||||
attr -Pg "$eaname" $path
|
||||
done < $tmp.attr2
|
||||
}
|
||||
|
||||
_test_create()
|
||||
{
|
||||
echo ""
|
||||
echo "Testing create"
|
||||
echo ""
|
||||
|
||||
# Test out some creations
|
||||
cd $SCRATCH_MNT
|
||||
touch file1
|
||||
|
||||
mkdir dir2
|
||||
touch dir2/file2
|
||||
|
||||
mkdir dir2/dir3
|
||||
touch dir2/dir3/file3
|
||||
|
||||
mkdir dir2/dir3/dir4
|
||||
|
||||
p=dir2/dir3/dir4/file4
|
||||
touch $p
|
||||
|
||||
_print_names $p >>$here/$seq.full
|
||||
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/$p
|
||||
}
|
||||
|
||||
_get_ea_fields()
|
||||
{
|
||||
# get out the ea name components for all the hardlinks
|
||||
attr -Fl $1 |\
|
||||
tee -a $here/$seq.full |\
|
||||
sed -e 's/"//g' |\
|
||||
nawk '/^Attribute/ { print $2, $3; next }'
|
||||
}
|
||||
|
||||
_parent_path()
|
||||
{
|
||||
# given: abc/def/ghi/jkl
|
||||
# want: abc/def/ghi
|
||||
child=$1
|
||||
parent=`echo $child | sed -e 's#/[^/]*$##'`
|
||||
|
||||
# issue of path starting with '/' or not
|
||||
# relatives paths wouldn't and we need to handle this
|
||||
if [ $child = $parent ]; then
|
||||
echo ""
|
||||
else
|
||||
echo $parent
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Go thru each component of the hierarchy and compare
|
||||
# inode# from "stat -i" with the ino from the parent EA name
|
||||
#
|
||||
# So I need to be given a path and go thru compenent by component.
|
||||
# e.g. a/b/c/d/e
|
||||
# Need to look at: a a/b a/b/c a/b/c/d
|
||||
#
|
||||
# Also need to do this for all the hardlinks
|
||||
#
|
||||
_check_parentinos_path()
|
||||
{
|
||||
mntpt=$1
|
||||
path=$2
|
||||
parent="$path"
|
||||
|
||||
# representing all the hard links for a particular path
|
||||
|
||||
_get_ea_fields $path |\
|
||||
while read parent_ino cnt; do
|
||||
|
||||
while [ "$parent" != "$mntpt" ]; do
|
||||
# compare paths
|
||||
eaname="$parent_ino $cnt"
|
||||
eavalue=`attr -qPg "$eaname" $parent`
|
||||
parentrel=`echo $parent | sed -e "s#^$mntpt##"`
|
||||
if [ "$eavalue" = "$parentrel" ]; then
|
||||
echo "EA path $eavalue matches on path"
|
||||
else
|
||||
$verbose && echo "EA path mismatch on $parentrel: $eavalue"
|
||||
break # maybe wrong hardlink
|
||||
fi
|
||||
|
||||
# compare parent_ino from ea-name with parent-ino from
|
||||
# actual parent dir using stat
|
||||
|
||||
parent=`_parent_path $parent`
|
||||
parent_ino_dec=`printf "%d" 0x$parent_ino` # decimal version (not hex)
|
||||
stat_ino=`stat -iq $parent`
|
||||
|
||||
if [ "$parent_ino_dec" = "$stat_ino" ]; then
|
||||
echo "parent ino $parent_ino_dec matches"
|
||||
else
|
||||
echo "parent ino mismatch on $parent: EA=$parent_ino_dec stat=$stat_ino"
|
||||
fi
|
||||
|
||||
|
||||
# go onto next subdir up the path
|
||||
line=`_get_ea_fields $parent`
|
||||
parent_ino=`echo $line | cut -f1 -d' '` # 1st field
|
||||
cnt=`echo $line | cut -f2 -d' '` # 2nd field
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
_test_symlink()
|
||||
{
|
||||
echo ""
|
||||
echo "Testing symlink"
|
||||
echo ""
|
||||
|
||||
d=sym1/sym2/sym3
|
||||
f=$d/sym4_f
|
||||
|
||||
mkdir -p $d
|
||||
ln -s $f symlink1
|
||||
ln symlink1 hlink1
|
||||
ln symlink1 hlink2
|
||||
ln symlink1 hlink3
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/symlink1
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/hlink1
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/hlink2
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/hlink3
|
||||
}
|
||||
|
||||
#
|
||||
# create hardlinks from the same dir
|
||||
# and some from different dirs
|
||||
#
|
||||
# test out removing hardlinks too
|
||||
#
|
||||
_test_hardlink()
|
||||
{
|
||||
echo ""
|
||||
echo "Testing hardlink"
|
||||
echo ""
|
||||
|
||||
d=dir2/dir3/dir4
|
||||
d2=dir2/dir5/dir6
|
||||
mkdir -p $d
|
||||
mkdir -p $d2
|
||||
p=$d/file4
|
||||
touch $p
|
||||
|
||||
# create hardlinks
|
||||
paths="$d/l1 $d/l2 $d/l3 $d2/l4 $d2/l5 $d2/l6"
|
||||
for x in $paths; do
|
||||
ln $p $x
|
||||
done
|
||||
|
||||
_print_names $p >>$here/$seq.full
|
||||
|
||||
echo ""
|
||||
echo "print out names and check after created hardlinks"
|
||||
echo ""
|
||||
for x in $paths; do
|
||||
_print_names $x | tee -a $here/$seq.full
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/$x
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "now try removing half of the hardlinks"
|
||||
echo ""
|
||||
paths="$d/l1 $d/l2 $d/l3 $d2/l4 $d2/l5 $d2/l6"
|
||||
i=0
|
||||
for x in $paths; do
|
||||
i=`expr $i + 1`
|
||||
j=`expr $i % 2`
|
||||
if [ $j -eq 0 ]; then
|
||||
echo "rm'ing $x"
|
||||
rm $x
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "print out names and check after removed hardlinks"
|
||||
echo ""
|
||||
for x in $paths; do
|
||||
if [ -e $x ]; then
|
||||
echo "looking at $x"
|
||||
_print_names $x | tee -a $here/$seq.full
|
||||
_check_parentinos_path $SCRATCH_MNT $SCRATCH_MNT/$x
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
# in dir, file1 to file2 where file2 does not exist
|
||||
# in dir, file1 to file2 where file2 does exist
|
||||
# dir/file1 to dir2/file2 where file2 does not exist
|
||||
# dir/file1 to dir2/file2 where file2 does exist
|
||||
# dir to dir2 where dir2 does not exist
|
||||
# dir to dir/dir3 - not allowed
|
||||
#
|
||||
#
|
||||
_test_rename()
|
||||
{
|
||||
echo ""
|
||||
echo "Testing rename"
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo "1. in dir, file1 to file2 where file2 does not exist"
|
||||
echo ""
|
||||
d1=$SCRATCH_MNT/ren1/ren2/ren3/ren4
|
||||
mkdir -p $d1
|
||||
p1=$d1/f1
|
||||
p2=$d1/f2
|
||||
touch $p1
|
||||
mv $p1 $p2
|
||||
_check_parentinos_path $SCRATCH_MNT $p2
|
||||
|
||||
echo ""
|
||||
echo "2. in dir, file1 to file2 where file2 does exist"
|
||||
echo ""
|
||||
touch $p1
|
||||
mv $p1 $p2
|
||||
_check_parentinos_path $SCRATCH_MNT $p2
|
||||
|
||||
echo ""
|
||||
echo "3. dir/file1 to dir2/file2 where file2 does not exist"
|
||||
echo ""
|
||||
d2=$SCRATCH_MNT/ren1/ren2/ren3/ren5
|
||||
mkdir -p $d2
|
||||
p3=$d2/f3
|
||||
touch $p1
|
||||
mv $p1 $p3
|
||||
_check_parentinos_path $SCRATCH_MNT $p3
|
||||
|
||||
echo ""
|
||||
echo "4. dir/file1 to dir2/file2 where file2 does exist"
|
||||
echo ""
|
||||
d2=$SCRATCH_MNT/ren1/ren2/ren3/ren5
|
||||
p3=$d2/f3
|
||||
touch $p1
|
||||
mv $p1 $p3
|
||||
_check_parentinos_path $SCRATCH_MNT $p3
|
||||
|
||||
echo ""
|
||||
echo "5. dir to dir2 where dir2 does not exist"
|
||||
echo ""
|
||||
d3=$SCRATCH_MNT/ren1/ren2/ren3/ren6
|
||||
mv $d1 $d3
|
||||
_check_parentinos_path $SCRATCH_MNT $d3
|
||||
}
|
||||
|
||||
_filter_num()
|
||||
{
|
||||
tee -a $seq.full |\
|
||||
sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
|
||||
-e 's/[0-9][0-9]* paths/P paths/g' \
|
||||
-e 's/seed = [0-9][0-9]*/seed = S/'
|
||||
}
|
||||
|
||||
|
||||
_test_fsstress()
|
||||
{
|
||||
echo ""
|
||||
echo "Testing fsstress"
|
||||
echo ""
|
||||
|
||||
out=$SCRATCH_MNT/fsstress.$$
|
||||
count=1000
|
||||
args="-z \
|
||||
-f rmdir=10 -f link=10 -f creat=10 \
|
||||
-f mkdir=10 -f rename=30 -f unlink=10 \
|
||||
-f symlink=10 \
|
||||
-n $count -d $out -p 3"
|
||||
|
||||
echo "ltp/fsstress $args" | sed -e "s#$out#outdir#"
|
||||
if ! $here/ltp/fsstress $args | _filter_num
|
||||
then
|
||||
echo " fsstress $args returned $?"
|
||||
cat $tmp.out | tee -a $here/$seq.full
|
||||
status=1
|
||||
fi
|
||||
|
||||
xfs_repair_ipaths -n $SCRATCH_MNT | _filter_num
|
||||
xfs_check_ipaths $SCRATCH_MNT | _filter_num
|
||||
}
|
||||
|
||||
|
||||
_test_dirstress()
|
||||
{
|
||||
echo ""
|
||||
echo "Testing dirstress"
|
||||
echo ""
|
||||
|
||||
out=$SCRATCH_MNT/dirstress.$$
|
||||
count=1000
|
||||
|
||||
if ! mkdir $out
|
||||
then
|
||||
echo "!! couldn't mkdir $out"
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
|
||||
args="-d $out -f $count -k -p 3 -n 1"
|
||||
echo "src/dirstress $args" | sed -e "s#$out#outdir#"
|
||||
if ! $here/src/dirstress $args >$tmp.out 2>&1 | _filter_num
|
||||
then
|
||||
echo " dirstress failed"
|
||||
echo "*** dirstress $args" | tee -a $here/$seq.full
|
||||
cat $tmp.out >>$here/$seq.full
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
|
||||
args="-d $out -f $count -k -p 3 -n 5"
|
||||
echo "src/dirstress $args" | sed -e "s#$out#outdir#"
|
||||
if ! $here/src/dirstress $args >$tmp.out 2>&1 | _filter_num
|
||||
then
|
||||
echo " dirstress failed"
|
||||
echo "*** dirstress $args" | tee -a $here/$seq.full
|
||||
cat $tmp.out >>$here/$seq.full
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
|
||||
xfs_repair_ipaths -n $SCRATCH_MNT | _filter_num
|
||||
xfs_check_ipaths $SCRATCH_MNT | _filter_num
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX
|
||||
|
||||
_require_scratch
|
||||
|
||||
rm -f $here/$seq.full
|
||||
|
||||
echo "mkfs"
|
||||
export MKFS_OPTIONS="$MKFS_OPTIONS -i paths=1"
|
||||
_scratch_mkfs_xfs >>$here/$seq.full 2>&1 \
|
||||
|| _fail "mkfs scratch failed"
|
||||
|
||||
echo "mount"
|
||||
_scratch_mount >>$here/$seq.full 2>&1 \
|
||||
|| _fail "mount failed: $MOUNT_OPTIONS"
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
verbose=false
|
||||
|
||||
# initial testing with scripting and modified attr(1)
|
||||
# in order to test parent EAs
|
||||
_test_create
|
||||
_test_hardlink
|
||||
_test_rename
|
||||
_test_symlink
|
||||
|
||||
# stress testing with verification by parent checking programs
|
||||
_test_fsstress
|
||||
_test_dirstress
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,492 @@
|
||||
QA output created by 114
|
||||
mkfs
|
||||
mount
|
||||
|
||||
Testing create
|
||||
|
||||
EA path /dir2/dir3/dir4/file4 matches on path
|
||||
parent ino 1048704 matches
|
||||
EA path /dir2/dir3/dir4 matches on path
|
||||
parent ino 524416 matches
|
||||
EA path /dir2/dir3 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Testing hardlink
|
||||
|
||||
|
||||
print out names and check after created hardlinks
|
||||
|
||||
|
||||
Print out hardlink names for given path, dir2/dir3/dir4/l1
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000204b80 0000000000000007" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000204b80 0000000000000005" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l2
|
||||
Attribute "0000000000100080 0000000000000003" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir3/dir4/l1:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l6
|
||||
Attribute "0000000000204b80 0000000000000007" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l4
|
||||
Attribute "0000000000204b80 0000000000000005" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir5/dir6/l4
|
||||
EA path /dir2/dir3/dir4/l1 matches on path
|
||||
parent ino 1048704 matches
|
||||
EA path /dir2/dir3/dir4 matches on path
|
||||
parent ino 524416 matches
|
||||
EA path /dir2/dir3 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Print out hardlink names for given path, dir2/dir3/dir4/l2
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000003" has a 2 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000204b80 0000000000000007" has a 2 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000204b80 0000000000000005" has a 2 byte value for dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir3/dir4/l2:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" had a 2 byte value for dir2/dir3/dir4/l2:
|
||||
l2
|
||||
Attribute "0000000000100080 0000000000000003" had a 18 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir3/dir4/l2:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir3/dir4/l2:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir3/dir4/l2:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" had a 2 byte value for dir2/dir3/dir4/l2:
|
||||
l6
|
||||
Attribute "0000000000204b80 0000000000000007" had a 18 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" had a 2 byte value for dir2/dir3/dir4/l2:
|
||||
l4
|
||||
Attribute "0000000000204b80 0000000000000005" had a 18 byte value for dir2/dir3/dir4/l2:
|
||||
/dir2/dir5/dir6/l4
|
||||
EA path /dir2/dir3/dir4/l2 matches on path
|
||||
parent ino 1048704 matches
|
||||
EA path /dir2/dir3/dir4 matches on path
|
||||
parent ino 524416 matches
|
||||
EA path /dir2/dir3 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Print out hardlink names for given path, dir2/dir3/dir4/l3
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000003" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000007" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000005" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l2
|
||||
Attribute "0000000000100080 0000000000000003" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir3/dir4/l3:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l6
|
||||
Attribute "0000000000204b80 0000000000000007" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l4
|
||||
Attribute "0000000000204b80 0000000000000005" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir5/dir6/l4
|
||||
EA path /dir2/dir3/dir4/l3 matches on path
|
||||
parent ino 1048704 matches
|
||||
EA path /dir2/dir3/dir4 matches on path
|
||||
parent ino 524416 matches
|
||||
EA path /dir2/dir3 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Print out hardlink names for given path, dir2/dir5/dir6/l4
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000100080 0000000000000003" has a 2 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000204b80 0000000000000007" has a 2 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000204b80 0000000000000005" has a 2 byte value for dir2/dir5/dir6/l4
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir5/dir6/l4:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" had a 2 byte value for dir2/dir5/dir6/l4:
|
||||
l2
|
||||
Attribute "0000000000100080 0000000000000003" had a 18 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir5/dir6/l4:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir5/dir6/l4:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir5/dir6/l4:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" had a 2 byte value for dir2/dir5/dir6/l4:
|
||||
l6
|
||||
Attribute "0000000000204b80 0000000000000007" had a 18 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" had a 2 byte value for dir2/dir5/dir6/l4:
|
||||
l4
|
||||
Attribute "0000000000204b80 0000000000000005" had a 18 byte value for dir2/dir5/dir6/l4:
|
||||
/dir2/dir5/dir6/l4
|
||||
EA path /dir2/dir5/dir6/l4 matches on path
|
||||
parent ino 2116480 matches
|
||||
EA path /dir2/dir5/dir6 matches on path
|
||||
parent ino 1572992 matches
|
||||
EA path /dir2/dir5 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Print out hardlink names for given path, dir2/dir5/dir6/l5
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000003" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000005" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l2
|
||||
Attribute "0000000000100080 0000000000000003" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir5/dir6/l5:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l6
|
||||
Attribute "0000000000204b80 0000000000000007" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l4
|
||||
Attribute "0000000000204b80 0000000000000005" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir5/dir6/l4
|
||||
EA path /dir2/dir5/dir6/l5 matches on path
|
||||
parent ino 2116480 matches
|
||||
EA path /dir2/dir5/dir6 matches on path
|
||||
parent ino 1572992 matches
|
||||
EA path /dir2/dir5 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Print out hardlink names for given path, dir2/dir5/dir6/l6
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000100080 0000000000000003" has a 2 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000007" has a 2 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" has a 2 byte value for dir2/dir5/dir6/l6
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir5/dir6/l6:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000003" had a 2 byte value for dir2/dir5/dir6/l6:
|
||||
l2
|
||||
Attribute "0000000000100080 0000000000000003" had a 18 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir3/dir4/l2
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir5/dir6/l6:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir5/dir6/l6:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir5/dir6/l6:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000007" had a 2 byte value for dir2/dir5/dir6/l6:
|
||||
l6
|
||||
Attribute "0000000000204b80 0000000000000007" had a 18 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir5/dir6/l6
|
||||
Attribute "0000000000204b80 0000000000000005" had a 2 byte value for dir2/dir5/dir6/l6:
|
||||
l4
|
||||
Attribute "0000000000204b80 0000000000000005" had a 18 byte value for dir2/dir5/dir6/l6:
|
||||
/dir2/dir5/dir6/l4
|
||||
EA path /dir2/dir5/dir6/l6 matches on path
|
||||
parent ino 2116480 matches
|
||||
EA path /dir2/dir5/dir6 matches on path
|
||||
parent ino 1572992 matches
|
||||
EA path /dir2/dir5 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
now try removing half of the hardlinks
|
||||
|
||||
rm'ing dir2/dir3/dir4/l2
|
||||
rm'ing dir2/dir5/dir6/l4
|
||||
rm'ing dir2/dir5/dir6/l6
|
||||
|
||||
print out names and check after removed hardlinks
|
||||
|
||||
looking at dir2/dir3/dir4/l1
|
||||
|
||||
Print out hardlink names for given path, dir2/dir3/dir4/l1
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir3/dir4/l1:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir3/dir4/l1:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir3/dir4/l1:
|
||||
/dir2/dir5/dir6/l5
|
||||
EA path /dir2/dir3/dir4/l1 matches on path
|
||||
parent ino 1048704 matches
|
||||
EA path /dir2/dir3/dir4 matches on path
|
||||
parent ino 524416 matches
|
||||
EA path /dir2/dir3 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
looking at dir2/dir3/dir4/l3
|
||||
|
||||
Print out hardlink names for given path, dir2/dir3/dir4/l3
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir3/dir4/l3
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir3/dir4/l3:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir3/dir4/l3:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir3/dir4/l3:
|
||||
/dir2/dir5/dir6/l5
|
||||
EA path /dir2/dir3/dir4/l3 matches on path
|
||||
parent ino 1048704 matches
|
||||
EA path /dir2/dir3/dir4 matches on path
|
||||
parent ino 524416 matches
|
||||
EA path /dir2/dir3 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
looking at dir2/dir5/dir6/l5
|
||||
|
||||
Print out hardlink names for given path, dir2/dir5/dir6/l5
|
||||
|
||||
Attribute "0000000000100080 0000000000000002" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000001" has a 5 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000004" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000204b80 0000000000000006" has a 2 byte value for dir2/dir5/dir6/l5
|
||||
Attribute "0000000000100080 0000000000000002" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l1
|
||||
Attribute "0000000000100080 0000000000000002" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/l1
|
||||
Attribute "0000000000100080 0000000000000001" had a 5 byte value for dir2/dir5/dir6/l5:
|
||||
file4
|
||||
Attribute "0000000000100080 0000000000000001" had a 21 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/file4
|
||||
Attribute "0000000000100080 0000000000000004" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l3
|
||||
Attribute "0000000000100080 0000000000000004" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir3/dir4/l3
|
||||
Attribute "0000000000204b80 0000000000000006" had a 2 byte value for dir2/dir5/dir6/l5:
|
||||
l5
|
||||
Attribute "0000000000204b80 0000000000000006" had a 18 byte value for dir2/dir5/dir6/l5:
|
||||
/dir2/dir5/dir6/l5
|
||||
EA path /dir2/dir5/dir6/l5 matches on path
|
||||
parent ino 2116480 matches
|
||||
EA path /dir2/dir5/dir6 matches on path
|
||||
parent ino 1572992 matches
|
||||
EA path /dir2/dir5 matches on path
|
||||
parent ino 132 matches
|
||||
EA path /dir2 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Testing rename
|
||||
|
||||
|
||||
1. in dir, file1 to file2 where file2 does not exist
|
||||
|
||||
EA path /ren1/ren2/ren3/ren4/f2 matches on path
|
||||
parent ino 134 matches
|
||||
EA path /ren1/ren2/ren3/ren4 matches on path
|
||||
parent ino 3670144 matches
|
||||
EA path /ren1/ren2/ren3 matches on path
|
||||
parent ino 3145856 matches
|
||||
EA path /ren1/ren2 matches on path
|
||||
parent ino 2621568 matches
|
||||
EA path /ren1 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
2. in dir, file1 to file2 where file2 does exist
|
||||
|
||||
EA path /ren1/ren2/ren3/ren4/f2 matches on path
|
||||
parent ino 134 matches
|
||||
EA path /ren1/ren2/ren3/ren4 matches on path
|
||||
parent ino 3670144 matches
|
||||
EA path /ren1/ren2/ren3 matches on path
|
||||
parent ino 3145856 matches
|
||||
EA path /ren1/ren2 matches on path
|
||||
parent ino 2621568 matches
|
||||
EA path /ren1 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
3. dir/file1 to dir2/file2 where file2 does not exist
|
||||
|
||||
EA path /ren1/ren2/ren3/ren5/f3 matches on path
|
||||
parent ino 524418 matches
|
||||
EA path /ren1/ren2/ren3/ren5 matches on path
|
||||
parent ino 3670144 matches
|
||||
EA path /ren1/ren2/ren3 matches on path
|
||||
parent ino 3145856 matches
|
||||
EA path /ren1/ren2 matches on path
|
||||
parent ino 2621568 matches
|
||||
EA path /ren1 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
4. dir/file1 to dir2/file2 where file2 does exist
|
||||
|
||||
EA path /ren1/ren2/ren3/ren5/f3 matches on path
|
||||
parent ino 524418 matches
|
||||
EA path /ren1/ren2/ren3/ren5 matches on path
|
||||
parent ino 3670144 matches
|
||||
EA path /ren1/ren2/ren3 matches on path
|
||||
parent ino 3145856 matches
|
||||
EA path /ren1/ren2 matches on path
|
||||
parent ino 2621568 matches
|
||||
EA path /ren1 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
5. dir to dir2 where dir2 does not exist
|
||||
|
||||
EA path /ren1/ren2/ren3/ren6 matches on path
|
||||
parent ino 3670144 matches
|
||||
EA path /ren1/ren2/ren3 matches on path
|
||||
parent ino 3145856 matches
|
||||
EA path /ren1/ren2 matches on path
|
||||
parent ino 2621568 matches
|
||||
EA path /ren1 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Testing symlink
|
||||
|
||||
EA path /symlink1 matches on path
|
||||
parent ino 128 matches
|
||||
EA path /hlink1 matches on path
|
||||
parent ino 128 matches
|
||||
EA path /hlink2 matches on path
|
||||
parent ino 128 matches
|
||||
EA path /hlink3 matches on path
|
||||
parent ino 128 matches
|
||||
|
||||
Testing fsstress
|
||||
|
||||
ltp/fsstress -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f unlink=10 -f symlink=10 -n 1000 -d outdir -p 3
|
||||
seed = S
|
||||
succeeded checking P paths
|
||||
succeeded checking I inodes
|
||||
|
||||
Testing dirstress
|
||||
|
||||
src/dirstress -d outdir -f 1000 -k -p 3 -n 1
|
||||
src/dirstress -d outdir -f 1000 -k -p 3 -n 5
|
||||
succeeded checking P paths
|
||||
succeeded checking I inodes
|
||||
@@ -0,0 +1,271 @@
|
||||
#! /bin/sh
|
||||
# FS QA Test No. 114
|
||||
#
|
||||
# Test out xfs_repair_ipaths
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2 of the GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it would be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Further, this software is distributed without any warranty that it is
|
||||
# free of the rightful claim of any third person regarding infringement
|
||||
# or the like. Any license provided herein, whether implied or
|
||||
# otherwise, applies only to this software file. Patent licenses, if
|
||||
# any, provided herein do not apply to combinations of this program with
|
||||
# other software, or any other product whatsoever.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write the Free Software Foundation, Inc., 59
|
||||
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
#
|
||||
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
|
||||
# Mountain View, CA 94043, or:
|
||||
#
|
||||
# http://www.sgi.com
|
||||
#
|
||||
# For further information regarding this notice, see:
|
||||
#
|
||||
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=tes@crackle.melbourne.sgi.com
|
||||
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
}
|
||||
|
||||
# Example output:
|
||||
#
|
||||
# ~/attr -Fl a/b/c/d/foo
|
||||
# Attribute "0000000000180080 0000000000000001" has a 3 byte value for a/b/c/d/foo
|
||||
#
|
||||
# ~/attr -Fg "0000000000180080 0000000000000001" a/b/c/d/foo
|
||||
# Attribute "0000000000180080 0000000000000001" had a 3 byte value for a/b/c/d/foo:
|
||||
# foo
|
||||
#
|
||||
# ~/attr -Pg "0000000000180080 0000000000000001" a/b/c/d/foo
|
||||
# Attribute "0000000000180080 0000000000000001" had a 12 byte value for a/b/c/d/foo:
|
||||
# /a/b/c/d/foo
|
||||
#
|
||||
|
||||
#
|
||||
# filter out inode numbers to ordinal numbers
|
||||
# (assumes they come in order)
|
||||
#
|
||||
_filter_inodes()
|
||||
{
|
||||
find $SCRATCH_MNT -exec stat -iq {} \; >$tmp.inodes
|
||||
|
||||
sed -e 's/[()]//g' \
|
||||
-e 's/Attribute "[0-9][0-9]*/Attribute "INODE/' \
|
||||
| nawk -v inodefile=$tmp.inodes '
|
||||
BEGIN {
|
||||
i=0
|
||||
while (getline < inodefile > 0) {
|
||||
i++
|
||||
inodemap[$1] = i
|
||||
}
|
||||
}
|
||||
/inode:/ {
|
||||
for (i = 1; i <= NF; i++) {
|
||||
nextone = i+1
|
||||
if ($i == "inode:") {
|
||||
$nextone = inodemap[$nextone]
|
||||
}
|
||||
printf "%s ", $i
|
||||
}
|
||||
printf "\n"
|
||||
next
|
||||
}
|
||||
{ print }
|
||||
'
|
||||
}
|
||||
|
||||
_filter()
|
||||
{
|
||||
sed -e 's/inode: \([0-9][0-9]*\)/inode: N/g' \
|
||||
-e 's/Attribute "[0-9][0-9]*/Attribute "INODE/'
|
||||
}
|
||||
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX
|
||||
|
||||
_require_scratch
|
||||
|
||||
rm -f $here/$seq.full
|
||||
|
||||
echo "mkfs"
|
||||
export MKFS_OPTIONS="$MKFS_OPTIONS -i paths=1"
|
||||
_scratch_mkfs_xfs >>$here/$seq.full 2>&1 \
|
||||
|| _fail "mkfs scratch failed"
|
||||
|
||||
echo "mount"
|
||||
_scratch_mount >>$here/$seq.full 2>&1 \
|
||||
|| _fail "mount failed: $MOUNT_OPTIONS"
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
verbose=false
|
||||
|
||||
echo ""
|
||||
echo "--- create some files and directories to work on ---"
|
||||
echo ""
|
||||
cd $SCRATCH_MNT
|
||||
d=dir2/dir3/dir4
|
||||
mkdir -p $d
|
||||
touch file1
|
||||
touch dir2/file2
|
||||
touch dir2/dir3/file3
|
||||
touch $d/file4
|
||||
touch $d/file5
|
||||
touch $d/file6
|
||||
touch $d/file7
|
||||
touch $d/file8
|
||||
touch $d/file9
|
||||
|
||||
|
||||
_do_test()
|
||||
{
|
||||
echo ""
|
||||
echo "--- check all is ok before we start ---"
|
||||
echo ""
|
||||
xfs_check_ipaths $SCRATCH_MNT
|
||||
xfs_repair_ipaths -n $SCRATCH_MNT
|
||||
|
||||
echo ""
|
||||
echo "--- now break some stuff ---"
|
||||
echo ""
|
||||
cnt=1
|
||||
|
||||
echo ""
|
||||
echo "1. remove the EA"
|
||||
echo ""
|
||||
attr -Fl dir2/file2
|
||||
stat_ino=`stat -iq dir2`
|
||||
attrname=`printf "%.16x %.16x" $stat_ino $cnt`
|
||||
#echo "attrname = $attrname"
|
||||
attr -Fr "$attrname" dir2/file2
|
||||
attr -Fl dir2/file2
|
||||
|
||||
echo ""
|
||||
echo "2. change the EA name"
|
||||
echo ""
|
||||
attr -Fl dir2/dir3/file3
|
||||
stat_ino=100
|
||||
attrname=`printf "%.16x %.16x" $stat_ino $cnt`
|
||||
attrvalue=file3
|
||||
attr -Fs "$attrname" -V $attrvalue dir2/dir3/file3
|
||||
attr -Fl dir2/dir3/file3
|
||||
|
||||
echo ""
|
||||
echo "3. change the EA value"
|
||||
echo ""
|
||||
attr -Fl $d/file4
|
||||
stat_ino=`stat -iq $d`
|
||||
attrname=`printf "%.16x %.16x" $stat_ino $cnt`
|
||||
attrvalue=woopdydoo
|
||||
attr -Fs "$attrname" -V "$attrvalue" $d/file4
|
||||
attr -Fl $d/file4
|
||||
attr -Fg "$attrname" $d/file4
|
||||
|
||||
echo ""
|
||||
echo "4. add an extra EA - diff name, same value"
|
||||
echo ""
|
||||
attr -Fl $d/file5
|
||||
stat_ino=100
|
||||
attrname=`printf "%.16x %.16x" $stat_ino $cnt`
|
||||
attrvalue=file5
|
||||
attr -Fs "$attrname" -V $attrvalue $d/file5
|
||||
attr -Fl $d/file5
|
||||
attr -Fg "$attrname" $d/file5
|
||||
|
||||
echo ""
|
||||
echo "5. add an extra EA - diff name, diff value"
|
||||
echo ""
|
||||
attr -Fl $d/file6
|
||||
stat_ino=100
|
||||
attrname=`printf "%.16x %.16x" $stat_ino $cnt`
|
||||
attrvalue=file600
|
||||
attr -Fs "$attrname" -V $attrvalue $d/file6
|
||||
attr -Fl $d/file6
|
||||
attr -Fg "$attrname" $d/file6
|
||||
|
||||
echo ""
|
||||
echo "6. give bad fmt'ed EA name and get rid of existing name"
|
||||
echo ""
|
||||
attrname=woof
|
||||
attrvalue=file7
|
||||
attr -Fs "$attrname" -V $attrvalue $d/file7
|
||||
# remove old attrname
|
||||
cnt=1
|
||||
stat_ino=`stat -iq $d`
|
||||
attrname=`printf "%.16x %.16x" $stat_ino $cnt`
|
||||
attr -Fr "$attrname" $d/file7
|
||||
|
||||
echo ""
|
||||
echo "--- now check it ---"
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo "xfs_check_ipaths"
|
||||
echo ""
|
||||
xfs_check_ipaths $SCRATCH_MNT
|
||||
|
||||
echo ""
|
||||
echo "xfs_repair_ipaths"
|
||||
echo ""
|
||||
xfs_repair_ipaths -n $SCRATCH_MNT
|
||||
|
||||
echo ""
|
||||
echo "--- now repair it ---"
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo "xfs_repair_ipaths"
|
||||
echo ""
|
||||
xfs_repair_ipaths $SCRATCH_MNT
|
||||
|
||||
echo ""
|
||||
echo "--- now check it again ---"
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "xfs_check_ipaths"
|
||||
echo ""
|
||||
xfs_check_ipaths $SCRATCH_MNT
|
||||
|
||||
echo ""
|
||||
echo "xfs_repair_ipaths"
|
||||
echo ""
|
||||
xfs_repair_ipaths -n $SCRATCH_MNT
|
||||
}
|
||||
|
||||
_do_test 2>&1 | tee $seq.full | _filter_inodes
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,118 @@
|
||||
QA output created by 115
|
||||
mkfs
|
||||
mount
|
||||
|
||||
--- create some files and directories to work on ---
|
||||
|
||||
|
||||
--- check all is ok before we start ---
|
||||
|
||||
succeeded checking 13 inodes
|
||||
succeeded checking 13 paths
|
||||
|
||||
--- now break some stuff ---
|
||||
|
||||
|
||||
1. remove the EA
|
||||
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/file2
|
||||
|
||||
2. change the EA name
|
||||
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/file3
|
||||
Attribute "INODE 0000000000000001" set to a 5 byte value for dir2/dir3/file3:
|
||||
file3
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/file3
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/file3
|
||||
|
||||
3. change the EA value
|
||||
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/dir4/file4
|
||||
Attribute "INODE 0000000000000001" set to a 9 byte value for dir2/dir3/dir4/file4:
|
||||
woopdydoo
|
||||
Attribute "INODE 0000000000000001" has a 9 byte value for dir2/dir3/dir4/file4
|
||||
Attribute "INODE 0000000000000001" had a 9 byte value for dir2/dir3/dir4/file4:
|
||||
woopdydoo
|
||||
|
||||
4. add an extra EA - diff name, same value
|
||||
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/dir4/file5
|
||||
Attribute "INODE 0000000000000001" set to a 5 byte value for dir2/dir3/dir4/file5:
|
||||
file5
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/dir4/file5
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/dir4/file5
|
||||
Attribute "INODE 0000000000000001" had a 5 byte value for dir2/dir3/dir4/file5:
|
||||
file5
|
||||
|
||||
5. add an extra EA - diff name, diff value
|
||||
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/dir4/file6
|
||||
Attribute "INODE 0000000000000001" set to a 7 byte value for dir2/dir3/dir4/file6:
|
||||
file600
|
||||
Attribute "INODE 0000000000000001" has a 5 byte value for dir2/dir3/dir4/file6
|
||||
Attribute "INODE 0000000000000001" has a 7 byte value for dir2/dir3/dir4/file6
|
||||
Attribute "INODE 0000000000000001" had a 7 byte value for dir2/dir3/dir4/file6:
|
||||
file600
|
||||
|
||||
6. give bad fmt'ed EA name and get rid of existing name
|
||||
|
||||
Attribute "woof" set to a 5 byte value for dir2/dir3/dir4/file7:
|
||||
file7
|
||||
|
||||
--- now check it ---
|
||||
|
||||
|
||||
xfs_check_ipaths
|
||||
|
||||
inode-path for inode: 12 is missing
|
||||
inode-path for inode: 11 is incorrect - bad parent inode#
|
||||
inode-path for inode: 5 is incorrect - path non-existent
|
||||
inode-path for inode: 6 is incorrect - bad parent inode#
|
||||
inode-path for inode: 7 is incorrect - bad parent inode#
|
||||
inode-path for inode: 8 is corrupted
|
||||
num errors: 6
|
||||
|
||||
xfs_repair_ipaths
|
||||
|
||||
path "/mnt/scratch/dir2/dir3/dir4/file4" inode: 5 doesn't have an associated inode-path
|
||||
path "/mnt/scratch/dir2/dir3/dir4/file7" inode: 8 has corrupted inode-path
|
||||
path "/mnt/scratch/dir2/dir3/dir4/file7" inode: 8 doesn't have an associated inode-path
|
||||
path "/mnt/scratch/dir2/file2" inode: 12 doesn't have an associated inode-path
|
||||
extra inode-path for inode: 5
|
||||
extra inode-path for inode: 6
|
||||
extra inode-path for inode: 7
|
||||
extra inode-path for inode: 11
|
||||
|
||||
--- now repair it ---
|
||||
|
||||
|
||||
xfs_repair_ipaths
|
||||
|
||||
path "/mnt/scratch/dir2/dir3/dir4/file4" inode: 5 doesn't have an associated inode-path
|
||||
path "/mnt/scratch/dir2/dir3/dir4/file7" inode: 8 has corrupted inode-path
|
||||
path "/mnt/scratch/dir2/dir3/dir4/file7" inode: 8 doesn't have an associated inode-path
|
||||
path "/mnt/scratch/dir2/file2" inode: 12 doesn't have an associated inode-path
|
||||
extra inode-path for inode: 5
|
||||
extra inode-path for inode: 6
|
||||
extra inode-path for inode: 7
|
||||
extra inode-path for inode: 11
|
||||
repairing inode-path on "/mnt/scratch/dir2/dir3/dir4/file4"
|
||||
repairing by removing bad inode-path on "/mnt/scratch/dir2/dir3/dir4/file7"
|
||||
repairing inode-path on "/mnt/scratch/dir2/dir3/dir4/file7"
|
||||
repairing inode-path on "/mnt/scratch/dir2/file2"
|
||||
repairing: removing extra inode-path for inode: 5
|
||||
repairing: removing extra inode-path for inode: 6
|
||||
repairing: removing extra inode-path for inode: 7
|
||||
repairing: removing extra inode-path for inode: 11
|
||||
|
||||
--- now check it again ---
|
||||
|
||||
|
||||
|
||||
xfs_check_ipaths
|
||||
|
||||
succeeded checking 13 inodes
|
||||
|
||||
xfs_repair_ipaths
|
||||
|
||||
succeeded checking 13 paths
|
||||
Reference in New Issue
Block a user