Re: Linux/Pro -- clusters

Alexander Viro
2001-12-04T02:35:24Z

[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.