linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH 2/2] ext4: Fix truncation of symlinks after failed write
Date: Wed, 15 Jul 2009 11:48:56 +0530	[thread overview]
Message-ID: <20090715061856.GB17310@skywalker> (raw)
In-Reply-To: <1247513367-5609-3-git-send-email-jack@suse.cz>

On Mon, Jul 13, 2009 at 09:29:27PM +0200, Jan Kara wrote:
> Contents of long symlinks is written via standard write methods. So when the
> write fails, we add inode to orphan list. But symlinks don't have .truncate
> method defined so nobody properly removes them from the on disk orphan list.
> 
> Fix this by calling ext4_truncate() directly instead of calling vmtruncate()
> (which is saner anyway since we don't need anything vmtruncate() does except
> from calling .truncate in these paths).

We are fixing below by not adding the inode to orphan list if they don't
have a .truncate call back right ?. So changing vmtruncate to ext4_truncate is
not be really needed to fix the problem right ?


>We also add inode to orphan list only
> if ext4_can_truncate() is true (currently, it can be false for symlinks when
> there are no blocks allocated) - otherwise orphan list processing will complain
> and ext4_truncate() will not remove inode from on-disk orphan list.
> 

-aneesh

  reply	other threads:[~2009-07-15  6:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 19:29 [PATCH 0/2] Fix oops / warning when allocation of symlink fails Jan Kara
2009-07-13 19:29 ` [PATCH 1/2] ext3: Fix truncation of symlinks after failed write Jan Kara
2009-07-13 19:29 ` [PATCH 2/2] ext4: " Jan Kara
2009-07-15  6:18   ` Aneesh Kumar K.V [this message]
2009-07-15 10:28     ` Jan Kara

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=20090715061856.GB17310@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).