From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH v2] ext3: Convert ext3 to new truncate calling convention
Date: Thu, 26 May 2011 16:23:37 +0200 [thread overview]
Message-ID: <20110526142337.GA5123@quack.suse.cz> (raw)
In-Reply-To: <20110525114822.GA6251@infradead.org>
On Wed 25-05-11 07:48:23, Christoph Hellwig wrote:
> On Wed, May 25, 2011 at 12:43:36PM +0200, Jan Kara wrote:
> > Mostly trivial conversion. We fix a bug that IS_IMMUTABLE and IS_APPEND
> > files could not be truncated during failed writes as we change the code.
> > In fact we remove the test altogether because do_sys_[f]truncate() and
> > may_open() do necessary checks anyway.
>
> This doesn't look quite correct me. One of the major points of the
> new truncate sequence is to to *_truncate_page before updating i_size,
> so that we can properly handle an error there. With your patch it's
> still called too late.
OK, I missed this point (frankly, handling of error from
ext3_block_truncate_page() does not seem like a huge win when we cannot
handle error anywhere else during truncate but it's an improvement I
agree). I'll move ext3_block_truncate_page() before the setting of i_size.
Thanks for having a look at the patch.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2011-05-26 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 10:43 [PATCH v2] ext3: Convert ext3 to new truncate calling convention Jan Kara
2011-05-25 11:48 ` Christoph Hellwig
2011-05-26 14:23 ` Jan Kara [this message]
2011-05-27 7:16 ` Christoph Hellwig
2011-05-25 21:41 ` Ted Ts'o
2011-05-25 21:42 ` Ted Ts'o
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=20110526142337.GA5123@quack.suse.cz \
--to=jack@suse.cz \
--cc=hch@infradead.org \
--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).