Coda File System

Re: quesiton about weak connection adaptation

From: Jan Harkes <>
Date: Wed, 25 Jul 2001 16:20:52 -0400
On Tue, Jul 24, 2001 at 10:35:39PM -0400, Jinsuo Zhang wrote:
> Dear all:
>    Could someboday tell me how the CML solve the problem in this
> scenario:
>    1. editor is used to edit file  paper.doc .
>    2. editor copy paper.doc into to .paper.doc.swap

    create .paper.doc.swap
    store .paper.doc.swap

>    3. the modification is on the temporary file.

    store .paper.doc.swap (optimizes away the previous store in the CML)

>    4. after every save(clicking save in editor save menu), the content
>       in temporary file is copied into paper.doc

    store paper.doc

Actually it looks like you are describing how 'vim' is updating files
and the save action there is really:

    rename paper.doc paper.doc.orig
    create paper.doc
    store paper.doc
    remove paper.doc.orig

> then, how Coda trace the regional modification and replay in 
>       server?

It remembers al the create/store/rename/remove/setattr operations. Coda
also does optimizations to reduce the size of the CML and the amount of
data to be sent back to the server.

    operation	overwrites previous

    store 		store, utimes
    chown 		chown
    chmod		chmod
    utimes		utimes
    remove		store, chown, chmod, utimes
    removedir		chown, chmod, utimes

Then there are whole sequences that can be removed when the last
operation in the sequence is seen, such as,
   create (store|chown|chmod|utimes|link|unlink|rename)* remove

All of this is described in great detail in chapter 6 of James Kistler's
thesis "Disconnected Operation in a Distributed File System", which can
be found at

Received on 2001-07-25 16:20:54