xfs
[Top] [All Lists]

Re: XFS Test Case:252 - Shows Wrong Output

To: Allison Henderson <achender@xxxxxxxxxxxxxxxxxx>
Subject: Re: XFS Test Case:252 - Shows Wrong Output
From: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
Date: Thu, 23 Jun 2011 11:21:26 +0530
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=qfgk5ebv5uoHOFes2WH3fpY9Yq5ihICrnEl1n9ZAoe8=; b=U5SXNlu8Qlc7974mNJ62+LL04q37c3DGIfCXRu6w5qTqrNP3t5fsAm2cUcGiAobwPD nk2i0OUiULLH4xWCN8rXqu6ISFQrV9q0pyu5ygOk8gAdJw+EHb+KUBF57f3d1jUk29PZ Uu3b4+jHYWZqyuW6hSNvp1+1LnNvI/3k4M+wk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=m8myEh6RweT9ATnObA8l6kMDmgrAL3/RAvSYJKcKQtFd2DYmTYe/8JFNOBtXtKtiiW rVXCe3k4NctYdLOm//+Oa+y3Wt1J3smCRdnNHmt1AkhanSMqbxftfdkdQs1JAw1Y9Fm7 vfYpCDEdfx68FyC//PLSmSJeBZSQdcBWrDLkI=
In-reply-to: <4E022818.7030406@xxxxxxxxxxxxxxxxxx>
References: <BANLkTinBNa9ox+jDaorBoKdhoQQzTUA58A@xxxxxxxxxxxxxx> <BANLkTi=wHAxYuLE33AVsc2rp0eEm5GB40w@xxxxxxxxxxxxxx> <4E022818.7030406@xxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxx> 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


<Prev in Thread] Current Thread [Next in Thread>