[lkml]   [2004]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 15:40 +0200 schrieb Christoph Hellwig:

> > That's your opinion. reiser4 seems to work very well.
> So how many OSes is it ported to currently? The problem is not that it
> doesn't work but that it's really hard to maintain. And remember that
> this maintaince overhead is not just for Hans but for everyone that does
> VFS-level work.

Where does it add overhead? It's just the interface between the reiser4
storage layer and the rest abstracted out.

Ok, there's the code that dispatches the VFS method calls to the plugin
call but I would say that's about it. I didn't develop reiser4 so I
don't know.

/* ->mkdir() VFS method in reiser4 inode_operations */
static int
reiser4_mkdir(struct inode *parent /* inode of parent
* directory */ ,
struct dentry *dentry /* dentry of new object to
* create */ ,
int mode /* new object's mode */ )
reiser4_object_create_data data;

reiser4_stat_inc_at(parent->i_sb, vfs_calls.mkdir);

data.mode = S_IFDIR | mode; = DIRECTORY_FILE_PLUGIN_ID;
return invoke_create_method(parent, dentry, &data);

The invoke_create_method then just calls the create method of the plugin
after setting up a context and lookup up the plugin.

xfs_iops.c seems to do something similar.

> Unless of course we get a blanko permission to break it
> as soon as fixing the mess becomes non-trivial.

Well, I think so. It's done relatively often.

> > What I understood is that you can select exactly one plugin that e.g.
> > handles the file data. The default plugin is optimized for normal files,
> > another one could implement transparent compression or encryption. Some
> > of these plugins also give the storage layer hints how to group files
> > together to optimized performance. Neither of these things mess with the
> > VFS.
> compression or encryption must sit below the pagecache to work nicely,
> and this hint things that usually sit at the pagecache level. But let's
> assume you have a valid use for different file_operations, why don't you
> simply add in different file_operations instead of adding another
> internal dispatch layer?

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

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 14:05    [W:0.588 / U:8.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site