Coda File System

Re: I: R: Coda and VPOPMAIL

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Thu, 5 Jul 2001 09:13:37 -0400
On Wed, Jun 27, 2001 at 04:49:46PM +0200, Andrea Cerrito wrote:
> Jan, what do you think about this discussion?
> Is it safe / needed / discouraged to use fsync and lock on a codafs?

Coda doesn't support file locks, they'll either just return an error, or
only work on the local machine depending on how much is done by the VFS
layers of the kernel.

The fsync handling is kind of heavy (almost paranoid). When the kernel
received an fsync call the container file is synced and an upcall is
sent to venus which then forces a system wide sync (don't know why, just
noticed it now), and flushes all pending RVM operations to disk.

However, the following 'close' is not forced to disk but will be flushed
only after about 30 seconds. So if the machine crashes before that time,
venus will during startup see that the owrite flag is still set and
discard the file. As the normal 'dirty buffer flush' time (at least on
Linux) is about 30 seconds, we would get exactly the same consistency
guarantees when fsync is not used at all.

Fsync should maybe force a store of the file to the servers, this way
logfiles would get updated even when the file is kept open, and fsync
would actually provides some sort of reliability guarantee. It would on
the other hand likely be more expensive than the current
fsync(containerfile)/sync()/rvm-flush sequence.

Jan
Received on 2001-07-05 09:14:59