xfs
[Top] [All Lists]

Re: [PATCH] xfstests: add test 203, xfs_io bmap reallocation

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: add test 203, xfs_io bmap reallocation
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 20 Mar 2009 22:46:53 -0500
Cc: xfs@xxxxxxxxxxx, Tomasz Majkowski <moosh009@xxxxxxxxx>
In-reply-to: <20090320072857.GB26571@xxxxxxxxxxxxx>
References: <20090320072857.GB26571@xxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
Christoph Hellwig wrote:
> Test that we can get all extent/hole information for files with more
> than 16 extents and 15 holes which require a reallocation based on
> XFS_IOC_FSGETXATTR.
> 
> Based on a testcase from Tomasz Majkowski <moosh009@xxxxxxxxx>.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks fine to me (do we need a GPL header on the c file?  license on all
of xfsqa is hard to sort out, I guess...)

-Eric

> Index: xfstests-dev/203
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ xfstests-dev/203  2009-03-20 07:28:06.000000000 +0000
> @@ -0,0 +1,71 @@
> +#! /bin/sh
> +# FS QA Test No. 203
> +#
> +# Test out reallocation of the extent array in xfs_io.
> +# Based on a testcase from Tomasz Majkowski <moosh009@xxxxxxxxx>.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2009 Christoph Hellwig.
> +#-----------------------------------------------------------------------
> +#
> +# creator
> +owner=hch@xxxxxx
> +
> +seq=`basename $0`
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1     # failure is the default!
> +
> +_write_holes()
> +{
> +     file=$1
> +     holes=$2
> +     let writes=$holes+1
> +
> +     offset=0
> +     for i in `seq 0 $writes`; do
> +             xfs_io -f $file -c "pwrite -q $offset 1"
> +             let offset=$offset+0x100000
> +     done
> +}
> +
> +#       0: [0..7]: 104..111
> +#       1: [8..2047]: hole
> +_filter_bmap()
> +{
> +     awk '$3 ~ /hole/ { print $1, $2, $3; next }
> +             {print $1, $2; next}'
> +}
> +
> +_cleanup()
> +{
> +     rm -f $TEST_DIR/hole_file*
> +     rm -f $TEST_DIR/r??
> +}
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +# get standard environment, filters and checks
> +. ./common.rc
> +. ./common.filter
> +
> +# real QA test starts here
> +_supported_fs xfs
> +_supported_os Linux
> +
> +
> +for i in 10 14 15 16 17 28 29 30 31; do
> +        rm -f $TEST_DIR/hole_file
> +     _write_holes $TEST_DIR/hole_file${i} ${i}
> +done
> +
> +for i in 10 14 15 16 17 28 29 30 31; do
> +        xfs_bmap $TEST_DIR/hole_file${i} | _filter_bmap
> +     echo
> +done
> +
> +# success, all done
> +echo "*** done"
> +rm -f $seq.full
> +status=0
> Index: xfstests-dev/203.out
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ xfstests-dev/203.out      2009-03-20 07:09:51.000000000 +0000
> @@ -0,0 +1,427 @@
> +QA output created by 203
> +/mnt/test/hole_file10: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +
> +/mnt/test/hole_file14: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +
> +/mnt/test/hole_file15: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +
> +/mnt/test/hole_file16: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +33: [32776..34815]: hole
> +34: [34816..34823]:
> +
> +/mnt/test/hole_file17: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +33: [32776..34815]: hole
> +34: [34816..34823]:
> +35: [34824..36863]: hole
> +36: [36864..36871]:
> +
> +/mnt/test/hole_file28: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +33: [32776..34815]: hole
> +34: [34816..34823]:
> +35: [34824..36863]: hole
> +36: [36864..36871]:
> +37: [36872..38911]: hole
> +38: [38912..38919]:
> +39: [38920..40959]: hole
> +40: [40960..40967]:
> +41: [40968..43007]: hole
> +42: [43008..43015]:
> +43: [43016..45055]: hole
> +44: [45056..45063]:
> +45: [45064..47103]: hole
> +46: [47104..47111]:
> +47: [47112..49151]: hole
> +48: [49152..49159]:
> +49: [49160..51199]: hole
> +50: [51200..51207]:
> +51: [51208..53247]: hole
> +52: [53248..53255]:
> +53: [53256..55295]: hole
> +54: [55296..55303]:
> +55: [55304..57343]: hole
> +56: [57344..57351]:
> +57: [57352..59391]: hole
> +58: [59392..59399]:
> +
> +/mnt/test/hole_file29: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +33: [32776..34815]: hole
> +34: [34816..34823]:
> +35: [34824..36863]: hole
> +36: [36864..36871]:
> +37: [36872..38911]: hole
> +38: [38912..38919]:
> +39: [38920..40959]: hole
> +40: [40960..40967]:
> +41: [40968..43007]: hole
> +42: [43008..43015]:
> +43: [43016..45055]: hole
> +44: [45056..45063]:
> +45: [45064..47103]: hole
> +46: [47104..47111]:
> +47: [47112..49151]: hole
> +48: [49152..49159]:
> +49: [49160..51199]: hole
> +50: [51200..51207]:
> +51: [51208..53247]: hole
> +52: [53248..53255]:
> +53: [53256..55295]: hole
> +54: [55296..55303]:
> +55: [55304..57343]: hole
> +56: [57344..57351]:
> +57: [57352..59391]: hole
> +58: [59392..59399]:
> +59: [59400..61439]: hole
> +60: [61440..61447]:
> +
> +/mnt/test/hole_file30: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +33: [32776..34815]: hole
> +34: [34816..34823]:
> +35: [34824..36863]: hole
> +36: [36864..36871]:
> +37: [36872..38911]: hole
> +38: [38912..38919]:
> +39: [38920..40959]: hole
> +40: [40960..40967]:
> +41: [40968..43007]: hole
> +42: [43008..43015]:
> +43: [43016..45055]: hole
> +44: [45056..45063]:
> +45: [45064..47103]: hole
> +46: [47104..47111]:
> +47: [47112..49151]: hole
> +48: [49152..49159]:
> +49: [49160..51199]: hole
> +50: [51200..51207]:
> +51: [51208..53247]: hole
> +52: [53248..53255]:
> +53: [53256..55295]: hole
> +54: [55296..55303]:
> +55: [55304..57343]: hole
> +56: [57344..57351]:
> +57: [57352..59391]: hole
> +58: [59392..59399]:
> +59: [59400..61439]: hole
> +60: [61440..61447]:
> +61: [61448..63487]: hole
> +62: [63488..63495]:
> +
> +/mnt/test/hole_file31: 
> +0: [0..7]:
> +1: [8..2047]: hole
> +2: [2048..2055]:
> +3: [2056..4095]: hole
> +4: [4096..4103]:
> +5: [4104..6143]: hole
> +6: [6144..6151]:
> +7: [6152..8191]: hole
> +8: [8192..8199]:
> +9: [8200..10239]: hole
> +10: [10240..10247]:
> +11: [10248..12287]: hole
> +12: [12288..12295]:
> +13: [12296..14335]: hole
> +14: [14336..14343]:
> +15: [14344..16383]: hole
> +16: [16384..16391]:
> +17: [16392..18431]: hole
> +18: [18432..18439]:
> +19: [18440..20479]: hole
> +20: [20480..20487]:
> +21: [20488..22527]: hole
> +22: [22528..22535]:
> +23: [22536..24575]: hole
> +24: [24576..24583]:
> +25: [24584..26623]: hole
> +26: [26624..26631]:
> +27: [26632..28671]: hole
> +28: [28672..28679]:
> +29: [28680..30719]: hole
> +30: [30720..30727]:
> +31: [30728..32767]: hole
> +32: [32768..32775]:
> +33: [32776..34815]: hole
> +34: [34816..34823]:
> +35: [34824..36863]: hole
> +36: [36864..36871]:
> +37: [36872..38911]: hole
> +38: [38912..38919]:
> +39: [38920..40959]: hole
> +40: [40960..40967]:
> +41: [40968..43007]: hole
> +42: [43008..43015]:
> +43: [43016..45055]: hole
> +44: [45056..45063]:
> +45: [45064..47103]: hole
> +46: [47104..47111]:
> +47: [47112..49151]: hole
> +48: [49152..49159]:
> +49: [49160..51199]: hole
> +50: [51200..51207]:
> +51: [51208..53247]: hole
> +52: [53248..53255]:
> +53: [53256..55295]: hole
> +54: [55296..55303]:
> +55: [55304..57343]: hole
> +56: [57344..57351]:
> +57: [57352..59391]: hole
> +58: [59392..59399]:
> +59: [59400..61439]: hole
> +60: [61440..61447]:
> +61: [61448..63487]: hole
> +62: [63488..63495]:
> +63: [63496..65535]: hole
> +64: [65536..65543]:
> +
> +*** done
> Index: xfstests-dev/group
> ===================================================================
> --- xfstests-dev.orig/group   2009-03-20 06:56:23.000000000 +0000
> +++ xfstests-dev/group        2009-03-20 06:57:06.000000000 +0000
> @@ -307,3 +307,4 @@
>  200 mount auto quick
>  201 metadata auto quick
>  202 repair auto quick
> +203 ioctl auto
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

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