Coda File System

Re: Theory of writeback (without SHA-1 or other crypto)

From: M. Satyanarayanan <satya_at_cs.cmu.edu>
Date: Sun, 25 Mar 2007 09:22:02 -0400
Here's another approach that doesn't require use of SHA-1 or
any other crypographic hash.   It is OS-specific, but the
change looks simple:

1. The Coda kernel module could intercept all  write() calls,
     but just not pass them up to Venus.  So Venus sees
    nothing different from today.

2. For each open() instance, the Coda kernel module could set a 
    bit to indicate that a write() was seen.

3. On close(), the Coda kernel module uses a new parameter
   to indicates whether the file had any write()s performed on it.
   This is an incompatible upgrade, but worth it for the benefits.
    If no writes were seen, Venus avoids the store of the file.

We could generalize things a bit if useful:  instead of
a single bit, we could have a structure with counters (# of reads,
# of writes, # of bytes read, # of bytes written, perhaps something
about lseeks, etc.).  This is maintained per open instance by the
Coda kernel module, and updated on read()s, write()s, etc.  The
structure is returned to Venus as a close() parameter to use as
Venus sees fit.   At the very least this might be useful for 
collecting file traces.

One way think of this is that Venus hands control of a
file to the kernel at open().    This control is returned at close()
to Venus,  along with a brief summary by the kernel of what
happened.  
Received on 2007-03-25 09:28:00