From: Timothy Shimmin <tes@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: "bnaujok@sgi.com via BugWorks" <bnaujok@sgi.com>,
xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>,
asg-qa <asgqa@sgi.com>
Subject: Re: REVIEW XFSQA test out xfs_attr_shortform_bytesfit attr2/attr1 fix
Date: Mon, 14 Apr 2008 14:23:39 +1000 [thread overview]
Message-ID: <4802DC4B.1020209@sgi.com> (raw)
In-Reply-To: <4802D5FE.80005@sgi.com>
Updated 186 output...
--Tim
===========================================================================
Index: xfstests/186
===========================================================================
--- a/xfstests/186 2006-06-17 00:58:24.000000000 +1000
+++ b/xfstests/186 2008-04-14 15:48:26.776187850 +1000
@@ -0,0 +1,166 @@
+#! /bin/sh
+# FS QA Test No. 186
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
+#-----------------------------------------------------------------------
+#
+# Test out:
+# pv#979606: xfs bug in going from attr2 back to attr1
+#
+# Test bug in going from attr2 back to attr1 where xfs
+# (due to xfs_attr_shortform_bytesfit)
+# would reset the di_forkoff to the m_offset instead of
+# leaving the di_forkoff alone as was intended.
+#
+# We create enough dirents to push us past m_attroffset,
+# and create an EA so we have a fork offset
+# and then turn on attr1 and add one more EA which
+# will write over the shortform dirents.
+#
+#
+# creator
+owner=tes@emu.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.*
+}
+
+_create_dirents()
+{
+ start_num=$1
+ end_num=$2
+ cd $fork_dir
+ for i in `seq $start_num $end_num`; do
+ touch file.$i
+ done
+}
+
+_create_eas()
+{
+ start_num=$1
+ end_num=$2
+ for i in `seq $start_num $end_num`; do
+ setfattr -n user.$i -v 0xbabe $fork_dir
+ done
+}
+
+_rmv_eas()
+{
+ start_num=$1
+ end_num=$2
+ for i in `seq $start_num $end_num`; do
+ setfattr -x user.$i $fork_dir
+ done
+}
+
+_filter_inode()
+{
+ tee -a $seq.full | egrep '^u.sfdir2|^a.sfattr|core.forkoff' |\
+ egrep -v 'inumber|parent'
+}
+
+_filter_version()
+{
+ tee -a $seq.full | tr ',' '\n' | grep ATTR
+}
+
+_print_inode()
+{
+ echo ""
+ echo "================================="
+ $XFS_DB_PROG -c "version" $SCRATCH_DEV 2>&1 | _filter_version
+ $XFS_DB_PROG -c "inode $inum" -c p $SCRATCH_DEV 2>&1 | _filter_inode
+ echo "================================="
+}
+
+_do_eas()
+{
+ echo ""
+ _scratch_mount
+ if [ $1 = "-r" ]; then
+ echo "*** remove EAs start $2 end $3 ***"
+ _rmv_eas $2 $3
+ else
+ echo "*** create EAs start $2 end $3 ***"
+ _create_eas $2 $3
+ fi
+ echo ""
+ cd /; $UMOUNT_PROG $SCRATCH_MNT
+ _print_inode
+}
+
+_do_dirents()
+{
+ num=`expr $2 - $1 + 1`
+ echo ""
+ echo "*** create $num dirents ***"
+ echo ""
+ _scratch_mount
+ _create_dirents $1 $2
+ cd /; $UMOUNT_PROG $SCRATCH_MNT
+ _print_inode
+}
+
+_changeto_attr1()
+{
+ echo ""
+ echo "Try setting attr1 by db"
+ echo ""
+ $XFS_DB_PROG -x -c "version attr1" $SCRATCH_DEV | _filter_version
+}
+
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+rm -f $seq.full
+
+_scratch_mkfs -i attr=2,size=512 >/dev/null 2>&1
+
+# set inum to root dir ino
+# we'll add in dirents and EAs into the root directory
+eval `$XFS_DB_PROG -r -c 'sb 0' -c 'p rootino' $SCRATCH_DEV | $SED_PROG 's/ //g'`
+inum=$rootino
+fork_dir=$SCRATCH_MNT
+_print_inode
+
+# add enough dirents to be inline but more
+# than will fit for m_attroffset for 512b inodes
+# for attr2 this is not a problem
+_do_dirents 1 25
+
+# add 1 ea so we get our forkoff happening
+_do_eas -c 1 1
+
+# now change back to attr1 where forkoff is constant now
+_changeto_attr1
+
+# now add another EA
+# for a bug in xfs_add_shortform_bytesfit
+# where it reset the forkoff to m_attroffset>>3 instead of
+# leaving as di_forkoff
+# If it resets to m_attroffset which is in the middle of
+# the dirents then they will get corrupted
+_do_eas -c 2 2
+
+# success, all done
+status=0
+exit
===========================================================================
Index: xfstests/186.out
===========================================================================
--- a/xfstests/186.out 2006-06-17 00:58:24.000000000 +1000
+++ b/xfstests/186.out 2008-04-14 14:59:24.204188050 +1000
@@ -0,0 +1,290 @@
+QA output created by 186
+
+=================================
+ATTR2
+core.forkoff = 0
+u.sfdir2.hdr.count = 0
+u.sfdir2.hdr.i8count = 0
+=================================
+
+*** create 25 dirents ***
+
+
+=================================
+ATTR2
+core.forkoff = 0
+u.sfdir2.hdr.count = 25
+u.sfdir2.hdr.i8count = 0
+u.sfdir2.list[0].namelen = 6
+u.sfdir2.list[0].offset = 0x30
+u.sfdir2.list[0].name = "file.1"
+u.sfdir2.list[1].namelen = 6
+u.sfdir2.list[1].offset = 0x48
+u.sfdir2.list[1].name = "file.2"
+u.sfdir2.list[2].namelen = 6
+u.sfdir2.list[2].offset = 0x60
+u.sfdir2.list[2].name = "file.3"
+u.sfdir2.list[3].namelen = 6
+u.sfdir2.list[3].offset = 0x78
+u.sfdir2.list[3].name = "file.4"
+u.sfdir2.list[4].namelen = 6
+u.sfdir2.list[4].offset = 0x90
+u.sfdir2.list[4].name = "file.5"
+u.sfdir2.list[5].namelen = 6
+u.sfdir2.list[5].offset = 0xa8
+u.sfdir2.list[5].name = "file.6"
+u.sfdir2.list[6].namelen = 6
+u.sfdir2.list[6].offset = 0xc0
+u.sfdir2.list[6].name = "file.7"
+u.sfdir2.list[7].namelen = 6
+u.sfdir2.list[7].offset = 0xd8
+u.sfdir2.list[7].name = "file.8"
+u.sfdir2.list[8].namelen = 6
+u.sfdir2.list[8].offset = 0xf0
+u.sfdir2.list[8].name = "file.9"
+u.sfdir2.list[9].namelen = 7
+u.sfdir2.list[9].offset = 0x108
+u.sfdir2.list[9].name = "file.10"
+u.sfdir2.list[10].namelen = 7
+u.sfdir2.list[10].offset = 0x120
+u.sfdir2.list[10].name = "file.11"
+u.sfdir2.list[11].namelen = 7
+u.sfdir2.list[11].offset = 0x138
+u.sfdir2.list[11].name = "file.12"
+u.sfdir2.list[12].namelen = 7
+u.sfdir2.list[12].offset = 0x150
+u.sfdir2.list[12].name = "file.13"
+u.sfdir2.list[13].namelen = 7
+u.sfdir2.list[13].offset = 0x168
+u.sfdir2.list[13].name = "file.14"
+u.sfdir2.list[14].namelen = 7
+u.sfdir2.list[14].offset = 0x180
+u.sfdir2.list[14].name = "file.15"
+u.sfdir2.list[15].namelen = 7
+u.sfdir2.list[15].offset = 0x198
+u.sfdir2.list[15].name = "file.16"
+u.sfdir2.list[16].namelen = 7
+u.sfdir2.list[16].offset = 0x1b0
+u.sfdir2.list[16].name = "file.17"
+u.sfdir2.list[17].namelen = 7
+u.sfdir2.list[17].offset = 0x1c8
+u.sfdir2.list[17].name = "file.18"
+u.sfdir2.list[18].namelen = 7
+u.sfdir2.list[18].offset = 0x1e0
+u.sfdir2.list[18].name = "file.19"
+u.sfdir2.list[19].namelen = 7
+u.sfdir2.list[19].offset = 0x1f8
+u.sfdir2.list[19].name = "file.20"
+u.sfdir2.list[20].namelen = 7
+u.sfdir2.list[20].offset = 0x210
+u.sfdir2.list[20].name = "file.21"
+u.sfdir2.list[21].namelen = 7
+u.sfdir2.list[21].offset = 0x228
+u.sfdir2.list[21].name = "file.22"
+u.sfdir2.list[22].namelen = 7
+u.sfdir2.list[22].offset = 0x240
+u.sfdir2.list[22].name = "file.23"
+u.sfdir2.list[23].namelen = 7
+u.sfdir2.list[23].offset = 0x258
+u.sfdir2.list[23].name = "file.24"
+u.sfdir2.list[24].namelen = 7
+u.sfdir2.list[24].offset = 0x270
+u.sfdir2.list[24].name = "file.25"
+=================================
+
+*** create EAs start 1 end 1 ***
+
+
+=================================
+ATTR
+ATTR2
+core.forkoff = 47
+u.sfdir2.hdr.count = 25
+u.sfdir2.hdr.i8count = 0
+u.sfdir2.list[0].namelen = 6
+u.sfdir2.list[0].offset = 0x30
+u.sfdir2.list[0].name = "file.1"
+u.sfdir2.list[1].namelen = 6
+u.sfdir2.list[1].offset = 0x48
+u.sfdir2.list[1].name = "file.2"
+u.sfdir2.list[2].namelen = 6
+u.sfdir2.list[2].offset = 0x60
+u.sfdir2.list[2].name = "file.3"
+u.sfdir2.list[3].namelen = 6
+u.sfdir2.list[3].offset = 0x78
+u.sfdir2.list[3].name = "file.4"
+u.sfdir2.list[4].namelen = 6
+u.sfdir2.list[4].offset = 0x90
+u.sfdir2.list[4].name = "file.5"
+u.sfdir2.list[5].namelen = 6
+u.sfdir2.list[5].offset = 0xa8
+u.sfdir2.list[5].name = "file.6"
+u.sfdir2.list[6].namelen = 6
+u.sfdir2.list[6].offset = 0xc0
+u.sfdir2.list[6].name = "file.7"
+u.sfdir2.list[7].namelen = 6
+u.sfdir2.list[7].offset = 0xd8
+u.sfdir2.list[7].name = "file.8"
+u.sfdir2.list[8].namelen = 6
+u.sfdir2.list[8].offset = 0xf0
+u.sfdir2.list[8].name = "file.9"
+u.sfdir2.list[9].namelen = 7
+u.sfdir2.list[9].offset = 0x108
+u.sfdir2.list[9].name = "file.10"
+u.sfdir2.list[10].namelen = 7
+u.sfdir2.list[10].offset = 0x120
+u.sfdir2.list[10].name = "file.11"
+u.sfdir2.list[11].namelen = 7
+u.sfdir2.list[11].offset = 0x138
+u.sfdir2.list[11].name = "file.12"
+u.sfdir2.list[12].namelen = 7
+u.sfdir2.list[12].offset = 0x150
+u.sfdir2.list[12].name = "file.13"
+u.sfdir2.list[13].namelen = 7
+u.sfdir2.list[13].offset = 0x168
+u.sfdir2.list[13].name = "file.14"
+u.sfdir2.list[14].namelen = 7
+u.sfdir2.list[14].offset = 0x180
+u.sfdir2.list[14].name = "file.15"
+u.sfdir2.list[15].namelen = 7
+u.sfdir2.list[15].offset = 0x198
+u.sfdir2.list[15].name = "file.16"
+u.sfdir2.list[16].namelen = 7
+u.sfdir2.list[16].offset = 0x1b0
+u.sfdir2.list[16].name = "file.17"
+u.sfdir2.list[17].namelen = 7
+u.sfdir2.list[17].offset = 0x1c8
+u.sfdir2.list[17].name = "file.18"
+u.sfdir2.list[18].namelen = 7
+u.sfdir2.list[18].offset = 0x1e0
+u.sfdir2.list[18].name = "file.19"
+u.sfdir2.list[19].namelen = 7
+u.sfdir2.list[19].offset = 0x1f8
+u.sfdir2.list[19].name = "file.20"
+u.sfdir2.list[20].namelen = 7
+u.sfdir2.list[20].offset = 0x210
+u.sfdir2.list[20].name = "file.21"
+u.sfdir2.list[21].namelen = 7
+u.sfdir2.list[21].offset = 0x228
+u.sfdir2.list[21].name = "file.22"
+u.sfdir2.list[22].namelen = 7
+u.sfdir2.list[22].offset = 0x240
+u.sfdir2.list[22].name = "file.23"
+u.sfdir2.list[23].namelen = 7
+u.sfdir2.list[23].offset = 0x258
+u.sfdir2.list[23].name = "file.24"
+u.sfdir2.list[24].namelen = 7
+u.sfdir2.list[24].offset = 0x270
+u.sfdir2.list[24].name = "file.25"
+a.sfattr.hdr.totsize = 10
+a.sfattr.hdr.count = 1
+a.sfattr.list[0].namelen = 1
+a.sfattr.list[0].valuelen = 2
+a.sfattr.list[0].root = 0
+a.sfattr.list[0].secure = 0
+a.sfattr.list[0].name = "1"
+a.sfattr.list[0].value = "\272\276"
+=================================
+
+Try setting attr1 by db
+
+ATTR
+
+*** create EAs start 2 end 2 ***
+
+
+=================================
+ATTR
+core.forkoff = 47
+u.sfdir2.hdr.count = 25
+u.sfdir2.hdr.i8count = 0
+u.sfdir2.list[0].namelen = 6
+u.sfdir2.list[0].offset = 0x30
+u.sfdir2.list[0].name = "file.1"
+u.sfdir2.list[1].namelen = 6
+u.sfdir2.list[1].offset = 0x48
+u.sfdir2.list[1].name = "file.2"
+u.sfdir2.list[2].namelen = 6
+u.sfdir2.list[2].offset = 0x60
+u.sfdir2.list[2].name = "file.3"
+u.sfdir2.list[3].namelen = 6
+u.sfdir2.list[3].offset = 0x78
+u.sfdir2.list[3].name = "file.4"
+u.sfdir2.list[4].namelen = 6
+u.sfdir2.list[4].offset = 0x90
+u.sfdir2.list[4].name = "file.5"
+u.sfdir2.list[5].namelen = 6
+u.sfdir2.list[5].offset = 0xa8
+u.sfdir2.list[5].name = "file.6"
+u.sfdir2.list[6].namelen = 6
+u.sfdir2.list[6].offset = 0xc0
+u.sfdir2.list[6].name = "file.7"
+u.sfdir2.list[7].namelen = 6
+u.sfdir2.list[7].offset = 0xd8
+u.sfdir2.list[7].name = "file.8"
+u.sfdir2.list[8].namelen = 6
+u.sfdir2.list[8].offset = 0xf0
+u.sfdir2.list[8].name = "file.9"
+u.sfdir2.list[9].namelen = 7
+u.sfdir2.list[9].offset = 0x108
+u.sfdir2.list[9].name = "file.10"
+u.sfdir2.list[10].namelen = 7
+u.sfdir2.list[10].offset = 0x120
+u.sfdir2.list[10].name = "file.11"
+u.sfdir2.list[11].namelen = 7
+u.sfdir2.list[11].offset = 0x138
+u.sfdir2.list[11].name = "file.12"
+u.sfdir2.list[12].namelen = 7
+u.sfdir2.list[12].offset = 0x150
+u.sfdir2.list[12].name = "file.13"
+u.sfdir2.list[13].namelen = 7
+u.sfdir2.list[13].offset = 0x168
+u.sfdir2.list[13].name = "file.14"
+u.sfdir2.list[14].namelen = 7
+u.sfdir2.list[14].offset = 0x180
+u.sfdir2.list[14].name = "file.15"
+u.sfdir2.list[15].namelen = 7
+u.sfdir2.list[15].offset = 0x198
+u.sfdir2.list[15].name = "file.16"
+u.sfdir2.list[16].namelen = 7
+u.sfdir2.list[16].offset = 0x1b0
+u.sfdir2.list[16].name = "file.17"
+u.sfdir2.list[17].namelen = 7
+u.sfdir2.list[17].offset = 0x1c8
+u.sfdir2.list[17].name = "file.18"
+u.sfdir2.list[18].namelen = 7
+u.sfdir2.list[18].offset = 0x1e0
+u.sfdir2.list[18].name = "file.19"
+u.sfdir2.list[19].namelen = 7
+u.sfdir2.list[19].offset = 0x1f8
+u.sfdir2.list[19].name = "file.20"
+u.sfdir2.list[20].namelen = 7
+u.sfdir2.list[20].offset = 0x210
+u.sfdir2.list[20].name = "file.21"
+u.sfdir2.list[21].namelen = 7
+u.sfdir2.list[21].offset = 0x228
+u.sfdir2.list[21].name = "file.22"
+u.sfdir2.list[22].namelen = 7
+u.sfdir2.list[22].offset = 0x240
+u.sfdir2.list[22].name = "file.23"
+u.sfdir2.list[23].namelen = 7
+u.sfdir2.list[23].offset = 0x258
+u.sfdir2.list[23].name = "file.24"
+u.sfdir2.list[24].namelen = 7
+u.sfdir2.list[24].offset = 0x270
+u.sfdir2.list[24].name = "file.25"
+a.sfattr.hdr.totsize = 16
+a.sfattr.hdr.count = 2
+a.sfattr.list[0].namelen = 1
+a.sfattr.list[0].valuelen = 2
+a.sfattr.list[0].root = 0
+a.sfattr.list[0].secure = 0
+a.sfattr.list[0].name = "1"
+a.sfattr.list[0].value = "\272\276"
+a.sfattr.list[1].namelen = 1
+a.sfattr.list[1].valuelen = 2
+a.sfattr.list[1].root = 0
+a.sfattr.list[1].secure = 0
+a.sfattr.list[1].name = "2"
+a.sfattr.list[1].value = "\272\276"
+=================================
===========================================================================
Index: xfstests/group
===========================================================================
--- a/xfstests/group 2008-04-14 14:10:46.000000000 +1000
+++ b/xfstests/group 2008-04-09 19:28:53.924187450 +1000
@@ -273,3 +273,4 @@ filestreams dgc@sgi.com
183 rw other auto
184 metadata auto
185 dmapi auto
+186 attr auto
prev parent reply other threads:[~2008-04-14 4:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 8:10 REVIEW XFSQA test out xfs_attr_shortform_bytesfit attr2/attr1 fix Timothy Shimmin
2008-04-10 5:36 ` David Chinner
2008-04-14 1:35 ` Timothy Shimmin
2008-04-14 1:46 ` Barry Naujok
2008-04-14 3:22 ` David Chinner
2008-04-14 3:56 ` Timothy Shimmin
2008-04-14 4:23 ` Timothy Shimmin [this message]
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=4802DC4B.1020209@sgi.com \
--to=tes@sgi.com \
--cc=asgqa@sgi.com \
--cc=bnaujok@sgi.com \
--cc=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.