XFS Test Case:252 - Shows Wrong Output
Allison Henderson
achender at linux.vnet.ibm.com
Wed Jun 22 12:22:37 CDT 2011
On 06/22/2011 03:48 AM, Amit Sahrawat wrote:
> echo "13. data -> unwritten -> data"
> rm -f $testfile
> xfs_io -f -c "truncate 20k" -c \
> "falloc 0 20k" -c "pwrite 0k 8k" -c "fsync" -c "pwrite 12k 8k" -c \
> "fsync" -c "fpunch 4k 12k" -c "fiemap -v" $testfile | $filter_cmd
>
> *Original Output(Taken from 252.out):
> * 13. data -> unwritten -> data
> 0: [0..7]: data
> 1: [8..31]: hole
> 2: [32..39]: data
> *Output in my case*
> 13. data -> unwritten -> data
> 0: [0..15]: data
> 1: [16..23]: unwritten
> 2: [24..39]: data
Hi there,
I believe the -c "fpunch 4k 12k" is supposed to be what puts the hole
there. If I run the command you have above, the fiemap should show you
a hole. Something like this:
xfs_io -f -c "truncate 20k" -c "falloc 0 20k" -c "pwrite 0k 8k" -c
"fsync" -c "pwrite 12k 8k" -c "fsync" -c "fpunch 4k 12k" -c "fiemap -v"
somefile
wrote 8192/8192 bytes at offset 0
8 KiB, 2 ops; 0.0000 sec (217.014 MiB/sec and 55555.5556 ops/sec)
wrote 8192/8192 bytes at offset 12288
8 KiB, 2 ops; 0.0000 sec (269.397 MiB/sec and 68965.5172 ops/sec)
somefile:
EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS
0: [0..7]: 296..303 8 0x0
1: [8..31]: hole 24
2: [32..39]: 328..335 8 0x1
If you do not see the hole there, it could be that your punch hole
operation is failing for some reason.
Allison Henderson
More information about the xfs
mailing list