From: Tao Ma <tao.ma@oracle.com>
To: linux-ext4@vger.kernel.org, Theodore Tso <tytso@mit.edu>,
linux-kernel@vger.kernel.org
Subject: fiemap is broken for sparse file in ext4?
Date: Fri, 11 Jun 2010 10:15:10 +0800 [thread overview]
Message-ID: <4C119C2E.2090801@oracle.com> (raw)
Hi Ted and other ext4 gurus,
I found fiemap may be broken for sparse files in ext4. Here is a simple
example.
dd if=/dev/zero of=testfile1 bs=1M count=1
using fiemap shows that it has a delalloc extent.
Logical: 0 Ext length: 1048576 Physical: 0 flags: 7
flags 7 means FIEMAP_EXTENT_LAST, FIEMAP_EXTENT_UNKNOWN and
FIEMAP_EXTENT_DELALLOC,
while if we create a sparse file, fiemap will not show the delalloc extent.
dd if=/dev/zero of=testfile1 bs=1M count=1 seek=1
using fiemap shows that it has no extent for the file. while we should
have some output like:
Logical: 1048576 Ext length: 1048576 Physical: 0 flags: 7
So we have different output with sparse and non-sparse file. Is it a bug
for ext4?
Regards,
Tao
next reply other threads:[~2010-06-11 2:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 2:15 Tao Ma [this message]
2010-06-11 4:08 ` fiemap is broken for sparse file in ext4? Eric Sandeen
2010-06-11 5:05 ` Tao Ma
2010-06-11 13:43 ` Eric Sandeen
2010-06-11 15:46 ` Eric Sandeen
2010-06-11 16:46 ` Greg Freemyer
2010-06-11 16:56 ` Eric Sandeen
2010-06-11 23:46 ` Tao Ma
2010-06-11 23:55 ` Eric Sandeen
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=4C119C2E.2090801@oracle.com \
--to=tao.ma@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).