linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Josef Bacik <jbacik@fb.com>
Cc: Omar Sandoval <osandov@osandov.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	kernel-team@fb.com
Subject: Re: [RFC PATCH] coredump: avoid ext4 auto_da_alloc for core file
Date: Tue, 5 Jul 2016 12:57:15 -0400	[thread overview]
Message-ID: <20160705165715.GH15193@thunk.org> (raw)
In-Reply-To: <e906173a-a589-ec6a-73e0-ecf899e86b0e@fb.com>

On Tue, Jul 05, 2016 at 11:01:40AM -0400, Josef Bacik wrote:
> > > Omar, this probably breaks the case where we do
> > > fallocate(FALLOC_FL_KEEP_SIZE), the i_size will be 0 but there will be
> > > blocks to truncate.  Probably want to check i_blocks or something.  Thanks,
> > 
> > Sure, but this is in the coredump code; do we care there?  What are
> > the odds that someone will have fallocated blocks beyond i_size in a
> > file named "core"?  And if so, it's not like it's going to make the
> > coredump invalid or non-useful in any way.
> 
> Wow I totally didn't notice this was in coredump.c, I thought it was in ext4
> code because you said it failed regression tests, which I assumed were your
> ext4 tests.  Ignore me.  Thanks,

Yeah, Omar's original patch was something he described as a "hack" to
the coredump code.  I actually don't think it's that bad, but it does
make sense to have ext4 not enable the "replace-via-truncate" code
when the truncate is a no-op, but it turns out this is a bit tricky
because the places where we set i_size and where we decide to truncate
beyond i_size are separated.  I tried to do something simple but it
didn't quite work right; I'll look into why it didn't work hopefully
later today.

						- Ted

      reply	other threads:[~2016-07-05 16:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 17:42 [RFC PATCH] coredump: avoid ext4 auto_da_alloc for core file Omar Sandoval
2016-06-29 18:34 ` Omar Sandoval
2016-07-04  2:24   ` Theodore Ts'o
2016-07-04 15:11     ` Theodore Ts'o
2016-07-05 13:42 ` Josef Bacik
2016-07-05 14:37   ` Theodore Ts'o
2016-07-05 15:01     ` Josef Bacik
2016-07-05 16:57       ` 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=20160705165715.GH15193@thunk.org \
    --to=tytso@mit.edu \
    --cc=jbacik@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=osandov@osandov.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).