From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Eric Sandeen <sandeen@redhat.com>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: fix reservation overflow in ext4_da_write_begin
Date: Sat, 11 Oct 2014 19:52:00 -0400 [thread overview]
Message-ID: <20141011235200.GD6262@thunk.org> (raw)
In-Reply-To: <979DAB3D-0F2D-4CF2-BDF2-EF101713829B@dilger.ca>
On Thu, Oct 02, 2014 at 03:00:23PM -0600, Andreas Dilger wrote:
> On Oct 2, 2014, at 9:28 AM, Eric Sandeen <sandeen@redhat.com> wrote:
> > Delalloc write journal reservations only reserve 1 credit,
> > to update the inode if necessary. However, it may happen
> > once in a filesystem's lifetime that a file will cross
> > the 2G threshold, and require the LARGE_FILE feature to
> > be set in the superblock as well, if it was not set already.
> >
> > This overruns the transaction reservation, and can be
> > demonstrated simply on any ext4 filesystem without the LARGE_FILE
> > feature already set:
> >
> > dd if=/dev/zero of=testfile bs=1 seek=2147483646 count=1 \
> > conv=notrunc of=testfile
> > sync
> > dd if=/dev/zero of=testfile bs=1 seek=2147483647 count=1 \
> > conv=notrunc of=testfile
> >
> > leads to:
> >
> > EXT4-fs: ext4_do_update_inode:4296: aborting transaction: error 28 in __ext4_handle_dirty_super
> > EXT4-fs error (device loop0) in ext4_do_update_inode:4301: error 28
> > EXT4-fs error (device loop0) in ext4_reserve_inode_write:4757: Readonly filesystem
> > EXT4-fs error (device loop0) in ext4_dirty_inode:4876: error 28
> > EXT4-fs error (device loop0) in ext4_da_write_end:2685: error 28
> >
> > Adjust the number of credits based on whether the flag is
> > already set, and whether the current write may extend past the
> > LARGE_FILE limit.
> >
> > Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Applied, thanks. I added the likely() qualifer per Andreas'
suggestion.
- Ted
prev parent reply other threads:[~2014-10-11 23:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 21:33 [PATCH] ext4: ensure LARGE_FILE feature when mounting delalloc Eric Sandeen
2014-10-02 1:26 ` Andreas Dilger
2014-10-02 2:15 ` Eric Sandeen
2014-10-02 15:28 ` [PATCH] ext4: fix reservation overflow in ext4_da_write_begin Eric Sandeen
2014-10-02 21:00 ` Andreas Dilger
2014-10-11 23:52 ` Theodore Ts'o [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=20141011235200.GD6262@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/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).