Re: new dentry feature in 2.1.78

Michael Elizabeth Chastain (mec@shout.net)
Sat, 10 Jan 1998 12:24:56 -0600


Colin Plumb writes:
> You know, this, and the way that Linux does inodes, always seemed silly
> to me. Why make all dentries and all iniodes the same size? Why not
> do it like C++, where there is a common leading part (the base class)
> and a type-dependent following part (for the derived class)?

Well, you would have to do something about this bit of code:

/* include/linux/pagemap.h */
static inline unsigned long _page_hashfn(struct inode * inode, unsigned long offset)
{
#define i (((unsigned long) inode)/(sizeof(struct inode) & ~ (sizeof(struct inode) - 1)))
#define o (offset >> PAGE_SHIFT)
#define s(x) ((x)+((x)>>PAGE_HASH_BITS))
return s(i+o) & (PAGE_HASH_SIZE-1);
#undef i
#undef o
#undef s
}

Michael Chastain
<mailto:mec@shout.net>
"love without fear"