From: Ted Ts'o <tytso@mit.edu>
To: Robin Dong <hao.bigrat@gmail.com>
Cc: Andreas Dilger <adilger@dilger.ca>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [RFC] Add new extent structure in ext4
Date: Mon, 23 Jan 2012 13:59:33 -0500 [thread overview]
Message-ID: <20120123185933.GC9775@thunk.org> (raw)
In-Reply-To: <CAFZ0FUXT-X146SEAHCcNh-bGARUTgLOSP1dCrqeOrT48REN+ow@mail.gmail.com>
On Mon, Jan 23, 2012 at 08:51:53PM +0800, Robin Dong wrote:
>
> We could solve the problem by creating a new extent format to support
> larger extent size, which looks like this:
>
> struct ext4_extent2 {
> __le64 ee_block; /* first logical block extent covers */
> __le64 ee_start; /* starting physical block */
> __le32 ee_len; /* number of blocks covered by extent */
> __le32 ee_flags; /* flags and future extension */
> };
>
> I think we could keep the structure of ext4_extent_header and add new
> imcompat flag EXT4_FEATURE_INCOMPAT_EXTENTS2.
The really unfortunate thing about using a 24 byte on-disk extent
structure is that you can only fit 2 extents in the inode before
needing to spill out to an external header.
So being able to support multiple exent formats in the inode (by using
a different eh_magic number) would probably be a good thing. In fact,
it might be useful to also have a version which looks like this:
struct ext4_extent_packed {
__le32 ee_start_lo;
__le16 ee_start_hi;
__le16 ee_len;
};
i.e., something which only takes 8 bytes, but which is only used for
non-sparse files in the inode structure, so that you can fit 6 extents
in the inode.
The hard part will be cleaning up and refactoring the extent code to
support multiple on-disk extent formats. (That's going to be very
messy, though! So if we're going to go through all of that work, it
would benice if it had advantages not for huge file systems, but also
for desktop workloads.) Once this investment gets done, supporting a
third extent format should be relatively straight forward.
This would also allow us to make the new extent format be an RO_COMPAT
feature, so that an existing ext4 file system could be converted to
take advantage of the new extent encodings without needing to do a
backup / reformat / restore pass.
- Ted
next prev parent reply other threads:[~2012-01-23 18:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 12:51 [RFC] Add new extent structure in ext4 Robin Dong
2012-01-23 18:59 ` Ted Ts'o [this message]
2012-01-23 23:17 ` Andreas Dilger
2012-01-24 13:34 ` Jan Kara
2012-01-24 17:32 ` Andreas Dilger
2012-01-25 22:48 ` Dave Chinner
2012-01-25 23:03 ` Andreas Dilger
2012-01-27 0:19 ` Dave Chinner
2012-01-27 14:27 ` Tao Ma
2012-01-29 22:07 ` Dave Chinner
2012-01-30 22:50 ` Andreas Dilger
2012-01-30 23:52 ` Ted Ts'o
2012-02-01 3:57 ` Dave Chinner
2012-01-30 20:41 ` Eric Sandeen
2012-01-30 22:52 ` Andreas Dilger
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=20120123185933.GC9775@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=hao.bigrat@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 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).