* [PATCH] xfstests 235: do smaller test IO
@ 2012-03-26 19:30 Eric Sandeen
2012-03-26 22:09 ` Dave Chinner
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2012-03-26 19:30 UTC (permalink / raw)
To: xfs-oss; +Cc: Eryu Guan
Test 235 fails on ext2/ext3 with 1024 fs block size because a
16k write uses an extra metadata block. If we do a smaller write
this won't happen.
Reported by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/235 b/235
index 7150fca..0c2ae8f 100755
--- a/235
+++ b/235
@@ -70,7 +70,7 @@ mount -o remount,ro $SCRATCH_DEV 2>&1 | tee -a $seq.full | _filter_scratch
touch $SCRATCH_MNT/failed 2>&1 | tee -a $seq.full | _filter_scratch
mount -o remount,rw $SCRATCH_DEV 2>&1 | tee -a $seq.full | _filter_scratch
-$XFS_IO_PROG -F -c 'pwrite 0 16k' -c 'fsync' \
+$XFS_IO_PROG -F -c 'pwrite 0 8k' -c 'fsync' \
$SCRATCH_MNT/testfile >>$seq.full 2>&1
repquota -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch
diff --git a/235.out b/235.out
index 345e29d..a095694 100644
--- a/235.out
+++ b/235.out
@@ -21,7 +21,7 @@ Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
-fsgqa -- 16 0 0 1 0 0
+fsgqa -- 8 0 0 1 0 0
*** Report for group quotas on device SCRATCH_DEV
@@ -29,6 +29,6 @@ Block grace time: 7days; Inode grace time: 7days
Block limits File limits
Group used soft hard grace used soft hard grace
----------------------------------------------------------------------
-fsgqa -- 16 0 0 1 0 0
+fsgqa -- 8 0 0 1 0 0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xfstests 235: do smaller test IO
2012-03-26 19:30 [PATCH] xfstests 235: do smaller test IO Eric Sandeen
@ 2012-03-26 22:09 ` Dave Chinner
2012-03-26 22:21 ` Eric Sandeen
0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2012-03-26 22:09 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eryu Guan, xfs-oss
On Mon, Mar 26, 2012 at 02:30:33PM -0500, Eric Sandeen wrote:
> Test 235 fails on ext2/ext3 with 1024 fs block size because a
> 16k write uses an extra metadata block. If we do a smaller write
> this won't happen.
.....
>
> -$XFS_IO_PROG -F -c 'pwrite 0 16k' -c 'fsync' \
> +$XFS_IO_PROG -F -c 'pwrite 0 8k' -c 'fsync' \
So now it fails only on 512 byte block size filesystems?
Perhaps rather than an exact match, a "within_tolerance" match could
be done on the relevant fields?
i.e something like:
blksused=`{requota cmd} | awk '/fsgqa/ { print $3 }'`
_within_tolerance "blocks used" $blksused 16 1
If you wanted to get really fancy, the tolerance could be set
depending on filesystem type and block size, but I don't think that
is really necessary....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfstests 235: do smaller test IO
2012-03-26 22:09 ` Dave Chinner
@ 2012-03-26 22:21 ` Eric Sandeen
2012-03-27 1:18 ` Dave Chinner
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2012-03-26 22:21 UTC (permalink / raw)
To: Dave Chinner; +Cc: Eryu Guan, xfs-oss
On 3/26/12 5:09 PM, Dave Chinner wrote:
> On Mon, Mar 26, 2012 at 02:30:33PM -0500, Eric Sandeen wrote:
>> Test 235 fails on ext2/ext3 with 1024 fs block size because a
>> 16k write uses an extra metadata block. If we do a smaller write
>> this won't happen.
> .....
>>
>> -$XFS_IO_PROG -F -c 'pwrite 0 16k' -c 'fsync' \
>> +$XFS_IO_PROG -F -c 'pwrite 0 8k' -c 'fsync' \
>
> So now it fails only on 512 byte block size filesystems?
ext[23] don't do 512 byte block filesystems, so no. ;)
> Perhaps rather than an exact match, a "within_tolerance" match could
> be done on the relevant fields?
>
> i.e something like:
>
> blksused=`{requota cmd} | awk '/fsgqa/ { print $3 }'`
> _within_tolerance "blocks used" $blksused 16 1
>
> If you wanted to get really fancy, the tolerance could be set
> depending on filesystem type and block size, but I don't think that
> is really necessary....
But I don't want to get really fancy, I spend enough time in xfstests
already. ;)
TBH even the _within_tolerance will take more munging around to get right,
it doesn't seem worth it, but if it's required for a review, ok...
-Eric
> Cheers,
>
> Dave.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfstests 235: do smaller test IO
2012-03-26 22:21 ` Eric Sandeen
@ 2012-03-27 1:18 ` Dave Chinner
0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2012-03-27 1:18 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eryu Guan, xfs-oss
On Mon, Mar 26, 2012 at 05:21:12PM -0500, Eric Sandeen wrote:
> On 3/26/12 5:09 PM, Dave Chinner wrote:
> > On Mon, Mar 26, 2012 at 02:30:33PM -0500, Eric Sandeen wrote:
> >> Test 235 fails on ext2/ext3 with 1024 fs block size because a
> >> 16k write uses an extra metadata block. If we do a smaller write
> >> this won't happen.
> > .....
> >>
> >> -$XFS_IO_PROG -F -c 'pwrite 0 16k' -c 'fsync' \
> >> +$XFS_IO_PROG -F -c 'pwrite 0 8k' -c 'fsync' \
> >
> > So now it fails only on 512 byte block size filesystems?
>
> ext[23] don't do 512 byte block filesystems, so no. ;)
Oh, I forgot about that. Well, just ignore me.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-27 1:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 19:30 [PATCH] xfstests 235: do smaller test IO Eric Sandeen
2012-03-26 22:09 ` Dave Chinner
2012-03-26 22:21 ` Eric Sandeen
2012-03-27 1:18 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox