Re: Linux/Pro -- clusters

Alexander Viro (viro@math.psu.edu)
Mon, 3 Dec 2001 21:34:01 -0500 (EST)


[apologies for over-the-head reply]

> On Mon, 3 Dec 2001, Donald Becker wrote:

> > a SCSI device layer that isn't three half-finished clean-ups
<nod>

> > a VFS layer that doesn't require the kernel to know a priori all of
> > the filesystem types that might be loaded

WTF? The only interpretation I can think of is about unions in struct
inode and struct superblock. _If_ you add a filesystem that
a) doesn't do separate allocation of fs-private parts of
inode/superblock (i.e. doesn't use ->u.gerneric_ip and ->u.generic_sbp) and
b) hadn't been known at kernel compile time and
c) has one of these fields (member in inode->u or sb->u) bigger than
all filesystems known at compile time

- yes, you've got a problem.

Solution: use ->u.generic_<...>. Works fine.

Not to mention the fact that VFS per se doesn't give a damn for fs types.
All it needs is sizeof(struct inode) and sizeof(struct superblock). And
any fs using ->generic_<...> (i.e. pointer to separately allocated private
objects) is OK, whether it was known at build time or not.

-
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/