From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <andreas.dilger@intel.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/4] libext2fs: fix block-mapped file punch
Date: Mon, 16 Nov 2015 07:04:28 -0500 [thread overview]
Message-ID: <20151116120428.GC29432@thunk.org> (raw)
In-Reply-To: <1447463429-5966-3-git-send-email-andreas.dilger@intel.com>
On Fri, Nov 13, 2015 at 06:10:28PM -0700, Andreas Dilger wrote:
> If ext2fs_punch() is called with "end = ~0U" (which is natural from
> a programming POV) it tries to compute "count" based on "start" and
> "end", but doesn't quite get it right.
You should make clear that this only applies in the case where we are
punching on an indirect block mapped file. I read this and alarm
bells started going off since end is a blk64_t, and we can't do this
for extent-mapped files.
> Pass "count=~0"
> in this case, and also handle that explicitly in ext2_punch_ind().
> Since ext2_punch_ind() is itself a public function, so it makes
> sense to fix this in both places.
Um, ext2fs_punch()_ind is *not* a public function.
- Ted
next prev parent reply other threads:[~2015-11-16 19:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 1:10 [PATCH 1/4] libext2fs: fix parents when modifying extents Andreas Dilger
2015-11-14 1:10 ` [PATCH 2/4] LU-7368 e2fsck: skip quota update when interrupted Andreas Dilger
2015-11-14 2:07 ` Andreas Dilger
2015-11-16 11:50 ` Theodore Ts'o
2015-11-14 1:10 ` [PATCH 3/4] libext2fs: fix block-mapped file punch Andreas Dilger
2015-11-16 12:04 ` Theodore Ts'o [this message]
2015-11-16 19:11 ` Theodore Ts'o
2015-11-14 1:10 ` [PATCH 4/4] e2fsck: fix e2fsck -fD directory truncation Andreas Dilger
2015-11-14 1:40 ` Dilger, Andreas
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=20151116120428.GC29432@thunk.org \
--to=tytso@mit.edu \
--cc=andreas.dilger@intel.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 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).