<div>This is linked with new feature.. Add punch support, although the code existed before also, but the 'punch' has been specifically handled through</div><div>cmd = XFS_IOC_UNRESVP.</div><div> </div><div>Also, <strong>fallocate</strong> is moved out from <em>'xfs_iops.c'</em> to 'file operations' in <em>xfs_file.c</em>, which handles the case for </div>
<div> </div><div>if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))<br> return -EOPNOTSUPP;</div><div>...</div><div>if(mode & FALLOC_FL_PUNCH_HOLE)<br> cmd = XFS_IOC_UNRESVSP;</div>
<div>...</div><div>Now, for old kernels, how to make sure that this test case does not execute or return meaningful error? without changing the kernel code it will not return error;</div><div>Since, <strong>FALLOC_FL_KEEP_SIZE </strong>this is true and the command work with XFS_IOC_RESVP.</div>
<div> </div><div>Please suggest.</div><div> </div><div> </div><div>Thanks & Regards,</div><div>Amit Sahrawat</div><div><br><br> </div><div class="gmail_quote">On Thu, Jun 23, 2011 at 12:06 PM, Amit Sahrawat <span dir="ltr"><<a href="mailto:amit.sahrawat83@gmail.com">amit.sahrawat83@gmail.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>Fortunately or Unfortunately I have 2.6.31(x86) and 2.6.35.13(ARM) and both do not support "fpunch". As per your earlier mail - 2.6.35.y does not support "fpunch" so I though of trying on 2.6.31.y.</div>
<div> </div><div>I will check out for the return errors in this condition and will update more on this. </div><div> </div><div>Thanks & Regards,</div><div>Amit Sahrawat</div><div><div></div><div class="h5"><div><br><br>
</div><div class="gmail_quote">
On Thu, Jun 23, 2011 at 11:50 AM, Dave Chinner <span dir="ltr"><<a href="mailto:david@fromorbit.com" target="_blank">david@fromorbit.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>On Thu, Jun 23, 2011 at 11:21:26AM +0530, Amit Sahrawat wrote:<br>
> Hi,<br>
><br>
> *PLATFORM -- Linux/i686 localhost 2.6.31.5-127.fc12.i686.PAE*<br>
^^^^^^^^^^^<br>
><br>
> The output as per the command mentioned by you:<br>
> [root@localhost xfstests-2011-05-11]# xfs_io -f -c "truncate 20k" -c "falloc<br>
> 0 20k" -c "pwrite 0k 8k" -c "fs<br>
> ync" -c "pwrite 12k 8k" -c "fsync" -c "fpunch 4k 12k" -c "fiemap -v"<br>
> /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>
> * 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>
</div>> *<br>
<br>
The fpunch command did not punch the range out.<br>
<br>
Amit, once again you're testing on a kernel (2.6.31) that does not<br>
support the punch operation. As I suggested previously, you need to<br>
find out why the fpunch command is not returning an error as that is<br>
root cause of your failures.<br>
<div><div></div><div><br>
Cheers,<br>
<br>
Dave.<br>
--<br>
Dave Chinner<br>
<a href="mailto:david@fromorbit.com" target="_blank">david@fromorbit.com</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>