Re: [PATCH] Son of Unbork (1 of 3)

Alexander Viro (viro@math.psu.edu)
Mon, 25 Feb 2002 13:28:24 -0500 (EST)


On Sat, 23 Feb 2002, Daniel Phillips wrote:

> Please tell me who wrote this:
>
> struct super_operations {
> struct inode *(*alloc_inode)(struct super_block *sb);
> void (*destroy_inode)(struct inode *)

I had. With inodes it _does_ provide things that can't be done
without these methods. Namely, common allocation of generic and
fs-private part *on* *the* *fast* *path* *for* *class* *with*
*many* *instances*.

The latter parts are missing in case of superblocks. We don't
allocate hundreds of thousands of superblocks. Moreover, ones
allocated live much longer than normal struct inode.

IOW, common allocation is worthless in this case and that's the
only rationale for ->alloc_inode()/->destroy_inode().

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/