linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* e2fsprogs/debugfs/write: Input/output error when file size is zero
@ 2013-07-24  8:59 Robert Yang
  2013-07-24 15:00 ` Eric Sandeen
  2013-07-24 15:11 ` [PATCH] debugfs: properly set up extent header in do_write Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Yang @ 2013-07-24  8:59 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-ext4, Theodore Ts'o, Darren Hart


Hello experts,

I met a "Input/output error" problem when used debugfs' command "write"
to copy a zero size file to ext4 fs, here are the steps to reproduce the
problem:

$ dd if=/dev/zero of=test.img count=1M bs=1k
$ mkfs.ext4 -F test.img
$ touch emptyfile
$ debugfs -R "write emptyfile emptyfile" -w test.img
$ mkdir mnt
$ mount test.img mnt/
$ ls mnt/emptyfile
ls: cannot access mnt/emptyfile: Input/output error

The degbufs is from the up-to-date git repo, the ext2 and ext3 work well,
I think that it is caused by the EXT4_EXTENTS_FL, it works well if we
turn off the EXT4_EXTENTS_FL when the file size is zero, but this is not
a correct fix, would you please give me some instructions so that I can
fix it?

-- 
Thanks

Robert

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

end of thread, other threads:[~2013-07-29  3:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24  8:59 e2fsprogs/debugfs/write: Input/output error when file size is zero Robert Yang
2013-07-24 15:00 ` Eric Sandeen
2013-07-24 15:11 ` [PATCH] debugfs: properly set up extent header in do_write Eric Sandeen
2013-07-25  6:18   ` Robert Yang
2013-07-29  2:33     ` Theodore Ts'o

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