From: Dave Chinner <david@fromorbit.com>
To: Ming Lin <mlin@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, xfs@oss.sgi.com
Subject: Re: xfs_io bmap confused
Date: Thu, 9 Jul 2015 12:07:51 +1000 [thread overview]
Message-ID: <20150709020751.GH3902@dastard> (raw)
In-Reply-To: <1436338913.13729.11.camel@hasee>
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@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@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@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-07-09 2:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 7:01 xfs_io bmap confused Ming Lin
2015-07-08 8:53 ` Christoph Hellwig
2015-07-08 13:57 ` Ming Lin
2015-07-08 23:40 ` Ming Lin
2015-07-09 6:54 ` Ming Lin
2015-07-09 22:41 ` Dave Chinner
2015-07-09 23:28 ` Ming Lin
2015-07-09 2:07 ` Dave Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150709020751.GH3902@dastard \
--to=david@fromorbit.com \
--cc=hch@lst.de \
--cc=mlin@kernel.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox