linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unwritten extent zeroing beyond i_size
@ 2013-03-13  9:56 Jan Kara
       [not found] ` <CAF5pi0EYU84mVffFx5qUfK7n-T2sAJDj4JLf26ZhvDWozOCxBA@mail.gmail.com>
  2013-03-14  7:56 ` Lukáš Czerner
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Kara @ 2013-03-13  9:56 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: linux-ext4, Ted Tso

  Hello Dmitry,

  I'm tracking down failure in xfstests test 274 (fallocate + ENOSPC
testing). The problem I found (and that's really unrelated to the question
I want to ask) is that if write beyond i_size fails, we truncate the file
to i_size to remove any blocks that may have been allocated under the page
by the write before it failed (think of blocksize < pagesize config).

Now in this test the write fails because it needs to split unwritten extent
and there's no space for that and zeroing out is impossible because we are
beyond i_size. And here comes my question: You disallowed zeroing of
extents beyond i_size because fsck complains about those. Won't it be
better to just add inode flag saying "this inode has blocks preallocated
beyond i_size" and make fsck not complain about such blocks? IMHO that
would catch 99% of corruptions as well and would let us solve the problem
with ENOSPC on writes to preallocated space (plus it would simplify the
kernel code).

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

end of thread, other threads:[~2013-03-14 12:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13  9:56 Unwritten extent zeroing beyond i_size Jan Kara
     [not found] ` <CAF5pi0EYU84mVffFx5qUfK7n-T2sAJDj4JLf26ZhvDWozOCxBA@mail.gmail.com>
2013-03-13 21:14   ` Jan Kara
2013-03-14  7:56 ` Lukáš Czerner
2013-03-14 10:56   ` Jan Kara
2013-03-14 11:11     ` Lukáš Czerner
2013-03-14 12:05       ` Jan Kara
2013-03-14 12:29         ` Lukáš Czerner

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