From: Andreas Dilger <adilger@clusterfs.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Alexandre Ratchov <alexandre.ratchov@bull.net>,
linux-ext4@vger.kernel.org,
Jean-Pierre Dion <jean-pierre.dion@bull.net>
Subject: Re: [patch 04/12] rfc: 2fsprogs update
Date: Tue, 26 Sep 2006 13:54:49 -0600 [thread overview]
Message-ID: <20060926195449.GN22010@schatzie.adilger.int> (raw)
In-Reply-To: <20060926173253.GC4219@thunk.org>
On Sep 26, 2006 13:32 -0400, Theodore Tso wrote:
> hopefully I or someone else will be able to rework this patch (which
> is way too big, and violates the namespace guidelines --- all
> publically visible new symbols in the ext2fs library must be prefixed
> by ext2fs_ in order to minimize namespace pollution issues)
The only function which matches this description is block_iterate_extents()
but it is not desired that this be a public interface. It is just the
"bridge" function between the block iterator and the extent iterator.
> */
> struct ext2fs_extent {
> blk64_t e_pblk; /* first physical block */
> blk64_t e_lblk; /* first logical block extent covers */
> int e_len; /* number of blocks covered by extent */
> };
>
>
> Note the use of blk64_t; yes, this means that blk_t will stay as a
> 32-bit value, and blk64_t will be used for new interfaces and be a
> 64-bit value. The basic idea is that as we add support for new extents
> formats: 48-bit, 64-bit, bit-packing for compressing many extents inside
> the inode, etc., I don't want this to be visible to most applications.
> So we will define a new structure to pass extents informatoin between
> the library and applications, which is independent of the on-disk
> format.
>
> This will get used to define an extent iterator function, that will look
> something like this:
>
> errcode_t ext2fs_extent_iterate(ext2_filsys fs,
> ext2_ino_t ino,
> int flags,
> char *block_buf,
> int (*func)(ext2_filsys fs,
> struct ext2fs_extent *extent,
> void *priv_data),
> int (*meta_func)(ext2_filsys fs,
> blk64_t blk,
> int blk_type,
> char *buf,
> void *priv_data),
> void *priv_data);
Hmm, except that this interface isn't sufficient (at first glance) to
allow full correctness checking of the extent metadata blocks. It
would allow checking of a given indirect/index block but not parent/child
relationships between the index block and the extents/index it points to...
> This interface will work for both extent and non-extent-based
> inodes.... that is, if this interface is called on an inode which is
> using direct and indirect blocks, the function will Do The Right Thing
> and find contiguous blocks runs which it will use to fill extent
> structures that will be passed to the callback function. This is fine,
> since extent-based interfaces will be easier and more efficient to use
> anyway.
Do you think this will be CPU-intensive on non-extent filesystems?
> We will also define two interfaces to manipulate the extents tree (and
> which again, will Do The Right Thing on traditional non-extents based
> inods):
>
> errcode_t ext2fs_extent_set(ext2_filsys fs,
> ext2_ino_t ino,
> ext2_ino_t *block_buf,
> struct_ext2fs_extent *extent);
>
> errcode_t ext2fs_extent_delete(ext2_filsys fs,
> ext2_ino_t ino,
> ext2_ino_t *block_buf,
> struct_ext2fs_extent *extent);
Should the above "ext2_ino_t *block_buf" be "ext2_blk_t *block_buf"?
> The other interface which I've started spec'ing out in my mind is a new
> form interface and implementation for bitmaps(). The new-style bitmaps
> will take a blk64_t type, but their biggest difference is that they will
> allow multiple different types of interfaces, much like the io_manager
> abstractions we have right now abstracts our I/O reoutines. Some
> implementations may use an extents tree to keep track of used and unused
> bits. Anothers might use a disk file as a LRU backing store (this will
> be necessary to support really large storage devices on systems with
> limited physical memory). And of course, at least initially the first
> implementation we will support will be the old-fasheioned, "store the
> whole thing in memory" approach.
It sounds desirable, but is this going to be a requirement for 1.40? It
seems like a lot of non-critical work at a point where you have little free
time and there are other things awaiting the release of 1.40.
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
next prev parent reply other threads:[~2006-09-26 19:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 14:33 rfc: 2fsprogs update Alexandre Ratchov
2006-09-26 14:45 ` [patch 02/12] " Alexandre Ratchov
2006-09-26 14:46 ` [patch 03/12] " Alexandre Ratchov
2006-09-26 14:47 ` [patch 04/12] " Alexandre Ratchov
2006-09-26 17:32 ` Theodore Tso
2006-09-26 19:54 ` Andreas Dilger [this message]
2006-09-26 21:16 ` Theodore Tso
2006-09-27 12:59 ` Alexandre Ratchov
2006-09-27 14:10 ` Theodore Tso
2006-09-26 14:47 ` [patch 05/12] " Alexandre Ratchov
2006-09-26 14:48 ` [patch 06/12] " Alexandre Ratchov
2006-09-26 14:48 ` [patch 07/12] " Alexandre Ratchov
2006-09-26 17:37 ` Theodore Tso
2006-09-27 13:36 ` Alexandre Ratchov
2006-09-27 14:38 ` Theodore Tso
2006-09-26 14:49 ` [patch 08/12] " Alexandre Ratchov
2006-09-26 14:50 ` [patch 10/12] " Alexandre Ratchov
2006-09-26 14:50 ` [patch 11/12] " Alexandre Ratchov
2006-09-26 14:50 ` [patch 12/12] " Alexandre Ratchov
2006-09-26 16:47 ` Alexandre Ratchov
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=20060926195449.GN22010@schatzie.adilger.int \
--to=adilger@clusterfs.com \
--cc=alexandre.ratchov@bull.net \
--cc=jean-pierre.dion@bull.net \
--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