<div>Hi,</div><div> </div><div><strong>PLATFORM -- Linux/i686 localhost 2.6.31.5-127.fc12.i686.PAE</strong></div><div> </div><div>The output as per the command mentioned by you:</div><div>[root@localhost xfstests-2011-05-11]# xfs_io -f -c "truncate 20k" -c "falloc 0 20k" -c "pwrite 0k 8k" -c "fs<br>
ync" -c "pwrite 12k 8k" -c "fsync" -c "fpunch 4k 12k" -c "fiemap -v" /media/c/newfile<br>wrote 8192/8192 bytes at offset 0<br>8 KiB, 2 ops; 0.0000 sec (434.028 MiB/sec and 111111.1111 ops/sec)<br>
command "fs<br>ync" not found<br>wrote 8192/8192 bytes at offset 12288<br>8 KiB, 2 ops; 0.0000 sec (977 MiB/sec and 250000.0000 ops/sec)<br>/media/c/newfile:<br><strong> EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS<br>
0: [0..15]: 176..191 16 0x0<br> 1: [16..23]: 192..199 8 0x800<br> 2: [24..39]: 200..215 16 0x1<br></strong></div><div>Thanks & Regards,</div><div>Amit Sahrawat</div>
<div><br><br> </div><div class="gmail_quote">On Wed, Jun 22, 2011 at 11:06 PM, Allison Henderson <span dir="ltr"><<a href="mailto:achender@linux.vnet.ibm.com">achender@linux.vnet.ibm.com</a>></span> wrote:<br><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote">
<div class="im">On 06/22/2011 03:48 AM, Amit Sahrawat wrote:<br>
</div><div class="im"><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote">
xfs_io -f -c "truncate 20k" -c \<br>
"falloc 0 20k" -c "pwrite 0k 8k" -c "fsync" -c "pwrite 12k 8k" -c \<br>
"fsync" -c "fpunch 4k 12k" -c "fiemap -v" $testfile | $filter_cmd<br>
<br>
*Original Output(Taken from 252.out):<br>
* 13. data -> unwritten -> data<br>
0: [0..7]: data<br>
1: [8..31]: hole<br>
2: [32..39]: data<br>
*Output in my case*<br>
13. data -> unwritten -> data<br>
0: [0..15]: data<br>
1: [16..23]: unwritten<br>
2: [24..39]: data<br>
<br>
Please let me know about the vailidity of this result.<br>
</blockquote>
<br></div>
Hi there,<br>
<br>
It looks like the "fpunch 4k 12k" is supposed to be what puts the hole there. If I run the command you have above, the fiemap should show a hole like this:<div class="im"><br>
<br>
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<br>
wrote 8192/8192 bytes at offset 0<br>
8 KiB, 2 ops; 0.0000 sec (217.014 MiB/sec and 55555.5556 ops/sec)<br>
wrote 8192/8192 bytes at offset 12288<br></div>
8 KiB, 2 ops; 0.0000 sec (339.674 MiB/sec and 86956.5217 ops/sec)<div class="im"><br>
somefile:<br>
EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS<br></div>
0: [0..7]: 256..263 8 0x0<div class="im"><br>
1: [8..31]: hole 24<br></div>
2: [32..39]: 288..295 8 0x1<br>
<br>
If you do not see the hole, it could be your punch hole operation is failing for some reason.<br><font color="#888888">
<br>
Allison Henderson<br>
<br>
</font></blockquote></div><br>