From: tytso@mit.edu
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/3 v3] ext4: Update inode i_size after the preallocation
Date: Mon, 24 Mar 2014 20:05:21 -0400 [thread overview]
Message-ID: <20140325000521.GA2399@thunk.org> (raw)
In-Reply-To: <1395156873-13188-1-git-send-email-lczerner@redhat.com>
On Tue, Mar 18, 2014 at 04:34:31PM +0100, Lukas Czerner wrote:
> Currently in ext4_fallocate we would update inode size, c_time and sync
> the file with every partial allocation which is entirely unnecessary. It
> is true that if the crash happens in the middle of truncate we might end
> up with unchanged i size, or c_time which I do not think is really a
> problem - it does not mean file system corruption in any way. Note that
> xfs is doing things the same way e.g. update all of the mentioned after
> the allocation is done.
>
> This commit moves all the updates after the allocation is done. In
> addition we also need to change m_time as not only inode has been change
> bot also data regions might have changed (unwritten extents). However
> m_time will be only updated when i_size changed.
>
> Also we do not need to be paranoid about changing the c_time only if the
> actual allocation have happened, we can change it even if we try to
> allocate only to find out that there are already block allocated. It's
> not really a big deal and it will save us some additional complexity.
>
> Also use ext4_debug, instead of ext4_warning in #ifdef EXT4FS_DEBUG
> section.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
I noticed I didn't explicitly ack this in patchwork, but as you've
probably noticed, I've merged the v3 version of these patches into the
ext4 patch queue.
Cheers,
- Ted
prev parent reply other threads:[~2014-03-25 0:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 15:34 [PATCH 1/3 v3] ext4: Update inode i_size after the preallocation Lukas Czerner
2014-03-18 15:34 ` [PATCH 2/3 v3] ext4: refactor ext4_fallocate code Lukas Czerner
2014-03-18 15:34 ` [PATCH 3/3 v3] ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Lukas Czerner
2014-03-25 0:05 ` tytso [this message]
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=20140325000521.GA2399@thunk.org \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.