xfs
[Top] [All Lists]

Re: [PATCH 18/23] xfs: test the automatic cowextsize extent garbage coll

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 18/23] xfs: test the automatic cowextsize extent garbage collector
From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Date: Tue, 9 Feb 2016 17:06:31 -0800
Cc: fstests@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160209081547.GN19486@dastard>
References: <20160209011145.23099.95354.stgit@xxxxxxxxxxxxxxxx> <20160209011342.23099.23019.stgit@xxxxxxxxxxxxxxxx> <20160209081547.GN19486@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 09, 2016 at 07:15:47PM +1100, Dave Chinner wrote:
> On Mon, Feb 08, 2016 at 05:13:42PM -0800, Darrick J. Wong wrote:
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > +
> > +_cleanup()
> > +{
> > +    cd /
> > +    echo $old_cow_lifetime > 
> > /proc/sys/fs/xfs/speculative_cow_prealloc_lifetime
> > +    #rm -rf "$tmp".* "$testdir"
> 
> uncomment.
> 
> > +echo "CoW and leave leftovers"
> > +echo $old_cow_lifetime > /proc/sys/fs/xfs/speculative_cow_prealloc_lifetime
> > +seq 2 2 $((nr - 1)) | while read f; do
> > +   "$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz * f)) 1" "$testdir/file2" 
> > >> "$seqres.full"
> > +   "$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz * f)) 1" 
> > "$testdir/file2.chk" >> "$seqres.full"
> > +done
> 
> Ok, I just realised what was bugging me about these loops: "f" is
> not a typical loop iterator for a count. Normally we'd use "i" for
> these....
> 
> > +echo "old extents: $old_extents" >> "$seqres.full"
> > +echo "new extents: $new_extents" >> "$seqres.full"
> > +echo "maximum extents: $internal_blks" >> "$seqres.full"
> > +test $new_extents -lt $((internal_blks / 7)) || _fail "file2 badly 
> > fragmented"
> 
> I wouldn't use _fail like this, echo is sufficient to cause the test
> to fail.

Ok, fixed.

--D

> > +echo "Check for damage"
> > +umount "$SCRATCH_MNT"
> > +
> > +# success, all done
> > +status=0
> > +exit
> 
> As would getting rid of the unmount and just setting status
> appropriately...
> 
> /repeat
> 
> -Dave.
> -- 
> Dave Chinner
> david@xxxxxxxxxxxxx
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>