public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Tomasz Majkowski <moosh009@gmail.com>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: add test 203, xfs_io bmap reallocation
Date: Fri, 20 Mar 2009 22:46:53 -0500	[thread overview]
Message-ID: <49C4632D.2050901@sandeen.net> (raw)
In-Reply-To: <20090320072857.GB26571@infradead.org>

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@gmail.com>.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

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@gmail.com>.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2009 Christoph Hellwig.
> +#-----------------------------------------------------------------------
> +#
> +# creator
> +owner=hch@lst.de
> +
> +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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-03-21  4:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-20  7:28 [PATCH] xfstests: add test 203, xfs_io bmap reallocation Christoph Hellwig
2009-03-21  3:46 ` Eric Sandeen [this message]
2009-03-21 20:02   ` Christoph Hellwig
2009-03-21 22:12     ` Eric Sandeen

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=49C4632D.2050901@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=hch@infradead.org \
    --cc=moosh009@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox