xfs_io bmap confused
Dave Chinner
david at fromorbit.com
Wed Jul 8 21:07:51 CDT 2015
On Wed, Jul 08, 2015 at 12:01:53AM -0700, Ming Lin wrote:
> Hi list,
>
> I am testing some direct-io patches.
> xfs_tests/xfs/080 failed.
>
> It's strange.
> There is no hole in "rwtest.file",
> but when read it at some offset it returns zero because of hole.
>
> root at block:~# xfs_io -c bmap /mnt/test/rwtest.file
> /mnt/test/rwtest.file:
> 0: [0..125671]: 160..125831
>
> Then I read at file offset 659456,
> root at block:~# dd if=/mnt/test/rwtest.file of=tmp.file bs=512 skip=1288 count=1
>
> The code actually goes to below if statements.
>
> Any idea what's wrong?
XFS maps unwritten extents as holes on read so that they are
correctly zeroed by the generic code. See this patch:
http://oss.sgi.com/archives/xfs/2007-07/msg00742.html
And the followup for why it should be done:
http://oss.sgi.com/archives/xfs/2007-07/msg00744.html
Sadly I was unable to convince anyone to take the patch, and so that
wart in XFS mapping behaviour still exists because the generic
readpage code still doesn't understand unwritten extents natively.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list