On Thu, Aug 26, 2004 at 05:48:54PM +0200, Christophe Saout wrote: > > > I don't know, ask Hans. How could the VFS know it a filesystem wants to > > > do something specific with a file that is completely transparent to the > > > VFS? > > > > The VFS shouldn't, that the whole point. That's why it allows the > > filesystem to register different method tables for each object. > > Only the objects it can distinguish.
Yes, every inode can have different operation vectors. Which is the smallest possible object the VFS knows about. > > ops->file = reiser4_file_operations; > > ops->symlink = reiser4_symlink_inode_operations; > > ops->special = reiser4_special_inode_operations; > > ops->dentry = reiser4_dentry_operations; > > ops->as = reiser4_as_operations; > > How could reiser4 register other operations for files that should be > stored encrypted or compressed? It's all under reiser4_file_operations. Again, your confusing upper and lower plugins. For things happening below the pagecache you could register different address_space operations which sometimes makes sense. But you want e.g. different inode_operations for directories vs symlinks vs files. Please read through some linux filesystem code, okay :)