On Wed, 27 Jun 2001, Linus Torvalds wrote:

> and then when ext2 calls down to the generic VFS layer it just passes
> 
>       &ext2_inode->inode
> 
> down, and when it gets a "struct inode *" it uses "inode_to_ext2()" to
> convert it to an ext2 inode pointer.
> 
> This is what the "struct list_head" thing does, and it works remarkably
> well. It allows for embedding a list (or a hundred) into any object. The
> above would take the same approach, and allow embedding an inode (and
> maybe several) into any object.
> 
> Advantages: no extra memory use, no indirection, no memory allocation
> overhead.
> 
> Disadvantages: ??

We get inode initilization (generic parts) spread all over the place and
sooner or later it's going to bite us, for one thing.

Basically, we have the logics that controls allocation/freeing of these beasts
in VFS, but allocate/free them in filesystems. Such things tend to backfire.

IOW, we can do that, but IMO it will result in more frequent bugs.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to