All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Eryu Guan <guaneryu@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] ext4: be more strict when migrating to non-extent based file
Date: Sat, 4 Jul 2015 00:04:50 -0400	[thread overview]
Message-ID: <20150704040450.GR9456@thunk.org> (raw)
In-Reply-To: <1435942311-2337-2-git-send-email-guaneryu@gmail.com>

On Sat, Jul 04, 2015 at 12:51:50AM +0800, Eryu Guan wrote:
> Currently the check in ext4_ind_migrate() is not enough before doing the
> real conversion:
> 
> a) delayed allocated extents could bypass the check on eh->eh_entries
>    and eh->eh_depth
> 
> This can be demonstrated by this script
> 
>   xfs_io -fc "pwrite 0 4k" -c "pwrite 8k 4k" /mnt/ext4/testfile
>   chattr -e /mnt/ext4/testfile
> 
> where testfile has two extents but still be converted to non-extent
> based file format.
> 
> b) only extent length is checked but not the offset, which would result
>    in data lose (delalloc) or fs corruption (nodelalloc), because
>    non-extent based file only supports at most (12 + 2^10 + 2^20 + 2^30)
>    blocks
>
> ...

Thanks for the really great commit description!  I've applied this to
the ext4 git tree.

					- Ted

  reply	other threads:[~2015-07-04  4:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 16:51 [PATCH 0/2] fix ext4 i_blocks corruption in generic/269 Eryu Guan
2015-07-03 16:51 ` [PATCH 1/2] ext4: be more strict when migrating to non-extent based file Eryu Guan
2015-07-04  4:04   ` Theodore Ts'o [this message]
2015-07-03 16:51 ` [PATCH 2/2] ext4: reserve hole in the migration " Eryu Guan
2015-07-04  4:33   ` Theodore Ts'o
2015-07-04 16:05     ` Eryu Guan

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=20150704040450.GR9456@thunk.org \
    --to=tytso@mit.edu \
    --cc=guaneryu@gmail.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 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.