From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p5N5pUm3159884 for ; Thu, 23 Jun 2011 00:51:30 -0500 Received: from mail-ey0-f181.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 4FCBE14F584C for ; Wed, 22 Jun 2011 22:51:27 -0700 (PDT) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) by cuda.sgi.com with ESMTP id PpDGT1VkDOyq2Tl6 for ; Wed, 22 Jun 2011 22:51:27 -0700 (PDT) Received: by eyh5 with SMTP id 5so515908eyh.26 for ; Wed, 22 Jun 2011 22:51:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4E022818.7030406@linux.vnet.ibm.com> References: <4E022818.7030406@linux.vnet.ibm.com> Date: Thu, 23 Jun 2011 11:21:26 +0530 Message-ID: Subject: Re: XFS Test Case:252 - Shows Wrong Output From: Amit Sahrawat List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2148202455065918057==" Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Allison Henderson Cc: xfs@oss.sgi.com --===============2148202455065918057== Content-Type: multipart/alternative; boundary=e0cb4e70053702493504a65aad17 --e0cb4e70053702493504a65aad17 Content-Type: text/plain; charset=ISO-8859-1 Hi, *PLATFORM -- Linux/i686 localhost 2.6.31.5-127.fc12.i686.PAE* The output as per the command mentioned by you: [root@localhost xfstests-2011-05-11]# xfs_io -f -c "truncate 20k" -c "falloc 0 20k" -c "pwrite 0k 8k" -c "fs ync" -c "pwrite 12k 8k" -c "fsync" -c "fpunch 4k 12k" -c "fiemap -v" /media/c/newfile wrote 8192/8192 bytes at offset 0 8 KiB, 2 ops; 0.0000 sec (434.028 MiB/sec and 111111.1111 ops/sec) command "fs ync" not found wrote 8192/8192 bytes at offset 12288 8 KiB, 2 ops; 0.0000 sec (977 MiB/sec and 250000.0000 ops/sec) /media/c/newfile: * EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..15]: 176..191 16 0x0 1: [16..23]: 192..199 8 0x800 2: [24..39]: 200..215 16 0x1 * Thanks & Regards, Amit Sahrawat On Wed, Jun 22, 2011 at 11:06 PM, Allison Henderson < achender@linux.vnet.ibm.com> wrote: > On 06/22/2011 03:48 AM, Amit Sahrawat wrote: > >> 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 >> >> Please let me know about the vailidity of this result. >> > > Hi there, > > 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: > > > 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 (339.674 MiB/sec and 86956.5217 ops/sec) > > somefile: > EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS > 0: [0..7]: 256..263 8 0x0 > > 1: [8..31]: hole 24 > 2: [32..39]: 288..295 8 0x1 > > If you do not see the hole, it could be your punch hole operation is > failing for some reason. > > Allison Henderson > > --e0cb4e70053702493504a65aad17 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
=A0
PLATFORM=A0=A0=A0=A0=A0 -- Linux/i= 686 localhost 2.6.31.5-127.fc12.i686.PAE
=A0
T= he output as per=A0the command mentioned by you:
[root@localhost = xfstests-2011-05-11]# xfs_io -f -c "truncate 20k" -c "falloc= 0 20k" -c "pwrite 0k 8k" -c "fs
ync" -c "pwrite 12k 8k" -c "fsync" -c "fpunch= 4k 12k" -c "fiemap -v" /media/c/newfile
wrote 8192/8192 = bytes at offset 0
8 KiB, 2 ops; 0.0000 sec (434.028 MiB/sec and 111111.1= 111 ops/sec)
command "fs
ync" not found
wrote 8192/8192 bytes at offset = 12288
8 KiB, 2 ops; 0.0000 sec (977 MiB/sec and 250000.0000 ops/sec)
= /media/c/newfile:
=A0EXT: FILE-OFFSET=A0=A0=A0=A0=A0 BLOCK-RANGE= =A0=A0=A0=A0=A0 TOTAL FLAGS
=A0=A0 0: [0..15]:=A0=A0=A0=A0=A0=A0=A0=A0 176..191=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 16=A0=A0 0x0
=A0=A0 1: [16..23]:=A0=A0=A0=A0=A0=A0=A0 192..199= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 8 0x800
=A0=A0 2: [24..39]:=A0=A0= =A0=A0=A0=A0=A0 200..215=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 16=A0=A0 0x1
<= /strong>
Thanks & Regards,
Amit Sahrawat


=A0
On Wed, Jun 22, 2011 at 11= :06 PM, Allison Henderson <achender@linux.vnet.ibm.com> wrote:
On 06/22/2011 03:48 AM, Amit Sahrawat wrote:
xfs_io -f -c "truncate 20k" -c \
"falloc 0 20k" -c "pwrite 0k 8k" -c "fsync" -= c "pwrite 12k 8k" -c =A0\
"fsync" -c "fpunch 4k 12k" -c "fiemap -v" $te= stfile | $filter_cmd

*Original Output(Taken from 252.out):
* =A0 =A0 =A0 =A013. data -> =A0unwritten -> =A0data
0: [0..7]: data
1: [8..31]: hole
2: [32..39]: data
*Output in my case*
=A0 13. data -> =A0unwritten -> =A0data
0: [0..15]: data
1: [16..23]: unwritten
2: [24..39]: data

Please let me know about the vailidity of this result.

Hi there,

It looks like the "fpunch 4k 12k" is supposed to be what puts the= hole there. =A0If I run the command you have above, the fiemap should show= a hole like this:


xfs_io -f -c "truncate 20k" -c "falloc 0 20k" -c "= pwrite 0k 8k" -c "fsync" -c "pwrite 12k 8k" -c =A0= "fsync" -c "fpunch 4k 12k" -c "fiemap -v" som= efile
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 (339.674 MiB/sec and 86956.5217 ops/sec)

somefile:
=A0EXT: FILE-OFFSET =A0 =A0 =A0BLOCK-RANGE =A0 =A0 =A0TOTAL FLAGS
=A0 0: [0..7]: =A0 =A0 =A0 =A0 =A0256..263 =A0 =A0 =A0 =A0 =A0 =A0 8 =A0 0= x0

=A0 1: [8..31]: =A0 =A0 =A0 =A0 hole =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A024
=
=A0 2: [32..39]: =A0 =A0 =A0 =A0288..295 =A0 =A0 =A0 =A0 =A0 =A0 8 =A0 0x1=

If you do not see the hole, it could be your punch hole operation is failin= g for some reason.

Allison Henderson


--e0cb4e70053702493504a65aad17-- --===============2148202455065918057== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs --===============2148202455065918057==--