[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150704040450.GR9456@thunk.org>
Date: Sat, 4 Jul 2015 00:04:50 -0400
From: Theodore Ts'o <tytso@....edu>
To: Eryu Guan <guaneryu@...il.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/2] ext4: be more strict when migrating to non-extent
based file
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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists