linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fiemap is broken for sparse file in ext4?
@ 2010-06-11  2:15 Tao Ma
  2010-06-11  4:08 ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: Tao Ma @ 2010-06-11  2:15 UTC (permalink / raw)
  To: linux-ext4, Theodore Tso, linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-06-11 23:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11  2:15 fiemap is broken for sparse file in ext4? Tao Ma
2010-06-11  4:08 ` 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

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).