logo       

Re: e2fsck and large inodes: msg#00009

file-systems.ext2.devel

Subject: Re: e2fsck and large inodes

On Wed, Oct 15, 2003 at 06:23:06PM +0400, Alex Tomas wrote:
> Hi!
>
> Let me ask you for advice. I'd like to implement e2fsck support for
> EA-in-inode feature. Unfortunately, I observed large inodes aren't
> supported well in e2fsck. I mean that most of code work using struct
> ext2_inode, thus ignoring additional space. What's the best way to
> implement such a support? couple ideas come in my mind:
>
> 1) to redefine struct ext2_inode to cover max possible inodes
> (I really dislike this ...)
>
> 2) to go through the code and allocate struct ext2_inode + remains
> from the heap

What I always had in mind is that we would expand the ext2 inode in
two ways, both by expanding the number of fixed fields (with a field
in the superblock to indicate how much of the inode is to be used for
fixed fields), as well as including space for type-length value (TLV)
fields (which would be used for the EA in inode feature). This is
because certain expanded features, such as subsecond resolution for
the timestamps, really make sense to be done by expanding the inode
fixed fields, rather than forcing the kernel to parse through all of
the TLV fields to find the expanded timestamp EA.

I imagine that for most users of libext2fs, including e2fsck, they
would only need the fixed ext2 inode fields. So it would make sense
for struct ext2_inode to contain the fixed fields and an optional
pointer to the remaining bits of the inode. It might or might not
make sense to optionally decide whether or not to allocate/read the
TLV portion of the inode.

The number of places where we would need to allocate/read in the
additional space is very small; just new_inode, read_inode and in the
inode iterate function. So changing the library to support the
expanded metadata should be quite easy.

- Ted


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise