lkml.org 
[lkml]   [1999]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cachefs module for linux?
Date
From

monnier+lists/linux/kernel/news/@tequila.cs.yale.edu said:
> A bit of both. Coda is a lot fancier than NFS is many ways and some
> of that requires for coda to be aware of any change made to the files.
> This also applies to locally applied changes: any local file access
> need to go through coda.

> I guess you could make a `coda on anyfs' but then the local accesses
> would have a special status: the consistency guarantees between local
> accesses and remote accesses would be rather poor (while coda provides
> pretty good such guarantees between two remote accesses).

cf. my eariler comment about kcodad. Local file access _does_ go through the
kernel, so if we have kcodad, we can keep the consistency guarantees quite
happily.

As an added bonus, we shouldn't even need to screw with the VFS (much) to add
the necessary hooks...

When a filesystem is exported by kcodad, it can change the fops for the
underlying filesystem to point to its own wrappers.

So when an ext2 filesystem is exported by coda, all files on that filesystem
now have codad_wrapper_fops instead of ext2_file_operations (can this be done
on the fly? What about files that are already open?)

So all ext2 file access is then enforced to be through the codad routines, and
we don't have to worry about direct access by local processes any more. We can
keep track of everything.

If we can't retrospectively change the fops for existing files, we may need
a mount option (-ocodad) which causes the fops for the filesystem at mount
time to be set to something like...

static ssize_t codad_wrapper_write(struct file * filp, const char * buf,
size_t count, loff_t *ppos)
{
if (CODAD_ACTIVE(filp->f_dentry->sb))
return codad_write(filp, buf, count, ppos);
else
return filp->old_fops->write(filp, buf, count, ppos);

/* Of course, there's not actually a 'filp->old_fops' and that's
* not where we'd really put it, but you get the idea.
*/
}


---- ---- ----
David Woodhouse David.Woodhouse@mvhi.com Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger dwmw2@ferret.lmh.ox.ac.uk for PGP key.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.022 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site