Coda File System

Re: disk quota

From: Jan Harkes <>
Date: Thu, 20 Jul 2000 11:58:50 -0400
On Mon, Jul 17, 2000 at 05:07:54PM +0300, Denis A. Tonkonog wrote:
> 	Hello.
>  As we have just discovered, Coda disk quotas (set with 'cfs sq dir
> blocks') work in inappropriate way. That is, if quota set to 20 (20 is
> in kBytes, right? And this is volume-wide quota, correct?), and
> volume contains less than 20 kBytes of data, I can create HUGE file
> (some MBytes), and only after that Coda won't allow to create more 
> files on volume. That is, quota seemed to be checked during file
> creation but NOT during file extension. It seems to be an incorrect
> behavior for us. Is there any plans to change it?

This has been brought up before, and results from several design
decisions that were made in Coda:

- The userspace cachemanager, Venus, only sees what the size of a file
  is when the last writer closes it. This keeps the kernel-venus
  protocol very simple and a lot more efficient.

- Also, 99.99% of the applications do not check the error returns from
  close(), so we could return ENOSPC when we detect the problem, but the
  application would assume everything went fine because all the writes
  have succeeded.

- We try to avoid dropping data on the floor as much as possible.
  If someone has exceeded his quota, and believes all writes were
  successful, we will not throw away that file. But all future attempts
  can be rejected, because we can now return an error whenever we see
  open(, O_APPEND).

Received on 2000-07-20 12:01:54