[Coco] DriveWire netdisk interface

John W. Linville linville at tuxdriver.com
Thu Nov 19 16:30:22 EST 2009


On Thu, Nov 19, 2009 at 03:46:03PM -0500, Steven Hirsch wrote:

> If pull/modify/push is implemented, I'd suggest using optimistic lock  
> semantics.  For example:
>
> - Before pulling the remote copy, obtain a CRC, file timestamp or  
> (preferably) both.
>
> - Have your way with the local copy.
>
> - Before writing back the local copy, read the remote CRC and timestamp  
> again.  If this information does not match what you read earlier, then  
> your optimistic lock failed, i.e. someone else modified it in the  
> meantime.  You'll then have to decide semantics: do you warn and allow  
> overwriting?  Do you create a versioned copy?  Etc, etc.
>
> Just my 0.02.

Yes that sounds reasonable (unless webdav already has some useful
locking -- no idea).

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.



More information about the Coco mailing list