From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhovopenvz@gmail.com>
Cc: linux-ext4@vger.kernel.org, Ted Tso <tytso@mit.edu>
Subject: Re: Unwritten extent zeroing beyond i_size
Date: Wed, 13 Mar 2013 22:14:06 +0100 [thread overview]
Message-ID: <20130313211406.GB7754@quack.suse.cz> (raw)
In-Reply-To: <CAF5pi0EYU84mVffFx5qUfK7n-T2sAJDj4JLf26ZhvDWozOCxBA@mail.gmail.com>
On Wed 13-03-13 23:04:40, Dmitry Monakhov wrote:
> On Mar 13, 2013 11:57 AM, "Jan Kara" <jack@suse.cz> wrote:
> >
> > 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).
> Looks reasonable, but it will make kernel incompatible with old fsck. How
> long does it takes to force customers to move to new version of fsck?
First we'd have to add the support into fsck and once that is released,
distros pick that up pretty quickly so after a month or two we can release
it in the kernel. After all the fsck complaint isn't anything serious and
it will happen only if we hit ENOSPC while splitting extents beyond i_size
which is pretty rare. In those cases we would have to say to the complaining
people to update e2fsprogs.
> (Sorry for inconvenient email address , I'm on vacation till the end of the
> week)
No problem...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2013-03-13 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20130313211406.GB7754@quack.suse.cz \
--to=jack@suse.cz \
--cc=dmonakhovopenvz@gmail.com \
--cc=linux-ext4@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).