All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Ashish Sangwan <ashishsangwan2@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org,
	lczerner@redhat.com, Ashish Sangwan <ashish.sangwan2@gmail.com>,
	Namjae Jeon <linkinjeon@gmail.com>
Subject: Re: [PATCH v3] ext4: fix hole punch failure when depth is greater than 0
Date: Sun, 22 Jul 2012 20:34:40 -0400	[thread overview]
Message-ID: <20120723003440.GG9958@thunk.org> (raw)
In-Reply-To: <1341937570-5229-1-git-send-email-ashish.sangwan2@gmail.com>

On Tue, Jul 10, 2012 at 09:56:10PM +0530, Ashish Sangwan wrote:
> Whether to continue removing extents or not is decided by the return value
> of function ext4_ext_more_to_rm() which checks 2 conditions:
> a) if there are no more indexes to process.
> b) if the number of entries are decreased in the header of "depth -1".
> 
> In case of hole punch, if the last block to be removed is not part of the
> last extent index than this index will not be deleted, hence the number of
> valid entries in the extent header of "depth - 1" will remain as it is and
> ext4_ext_more_to_rm will return 0 although the required blocks are not
> yet removed.
> 
> This patch fixes the above mentioned problem as instead of removing the
> extents from the end of file, it starts removing the blocks from the
> particular extent from which removing blocks is actually required and
> continue backward until done.
> 
> Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>

Applied, with a cc: to stable@kernel.org since it is a bug fix.

Thanks for submitting this patch!

	      	       			       	  - Ted

  parent reply	other threads:[~2012-07-23  0:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 16:26 [PATCH v3] ext4: fix hole punch failure when depth is greater than 0 Ashish Sangwan
2012-07-13  8:08 ` Ashish Sangwan
2012-07-23  0:34 ` Theodore Ts'o [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-10  0:43 Ashish Sangwan
2012-07-10  4:35 ` Ashish Sangwan

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=20120723003440.GG9958@thunk.org \
    --to=tytso@mit.edu \
    --cc=ashish.sangwan2@gmail.com \
    --cc=ashishsangwan2@gmail.com \
    --cc=lczerner@redhat.com \
    --cc=linkinjeon@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.