On Wed, 27 Jun 2001, Linus Torvalds wrote:

> 
> On Wed, 27 Jun 2001, Alexander Viro wrote:
> >
> > We get inode initilization (generic parts) spread all over the place and
> > sooner or later it's going to bite us, for one thing.
> 
> I don't really think so. The "struct inode" has become less and less
> important as far as the VFS layer is concerned, and most of the VFS layer
> functions handling it are really all just helper functions anyway.

Eviction policy for icache. sync() and its ilk. Essentially, you are adding
a new method - ->destroy_inode() and each fs will have to provide one.
kmem_cache_free() needs to know what cache it is dealing with and I'd rather
avoid exporting that. After all, fs can have different kinds of inodes,
with different sizes.

BTW, ->delete_inode() and friends probably ought to be in inode
methods, not superblock ones. Just look at the PITA in procfs.

> Instead of calling "get_empty_inode()", you'd just call
> "initialize_inode()" instead.

Ehh... get_empty_inode() (or new_inode(), for that matter) is hard to forget -
you need it to get a pointer to inode. It's one thing to say "give me
an object";  "here's an object, set it up for me" is quite different.
 
> The current exceptions to this is the "iget()" family of interfaces, but
> those are on the killing block anyway, due to other problems.

iget() is a helper function we could live without, no arguments here.
However, _something_ has to allocate and intialize these suckers, no
matter what interface it would have. It's easy to deal with the situations
along the lines of "functions foo, bar and baz create inodes; they do the
right thing and there's no other way to obtain a new inode". When we get
into "don't forget to call foo, bar or baz on generic part of inode you've
allocated" things get trickier.

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

Reply via email to