Coda File System

Re: Bux fix for coda linux kernel driver on SMP kernels

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Sat, 29 Apr 2000 04:43:10 -0400
On Fri, Apr 28, 2000 at 11:40:37PM -0400, Mark Aikens wrote:
> I have found a bug in the linux coda driver that only affects SMP
> kernels. The problem that occurs is the coda driver doesn't get the
> kernel lock which causes a kernel BUG message and venus crashes. I
> have attached a patch for the 2.3.99pre6 kernel below.
> 
> Please CC any comments to me directly.
> 
> -Mark Aikens

Yes, I had already noticed that both the read and write paths to
/dev/cfs0 are suffering from concurrency problems. However, the Coda
client is only a single process (userspace threads) and uses blocking
writes, so I'm wondering how it could be able to race with itself.

My current patch against 2.3.99-preX (pre6-7 to be precise) is at:
    ftp.coda.cs.cmu.edu:/pub/coda/linux/kernel/patch-coda-2.3.99-pre6-7.gz

Some of the changes are,
- no more wrappers for read/write/mmap.
- correctly locks the operations on /dev/cfs0.
- caught some memory leaks.
- doesn't break when coda turns a file/directory into a symlink (conflict).
- doesn't force a flush to disk of the dirty blocks on every close.
- reduces the number of upcalls on directory modifying operations.
- lots of dead code removed.
and some other stuff I forgot ;)

One part of the patch is to linux/fs/stat.c to return the size of the
underlying mapping (container file) instead of the coda inode. This
is one of the things I am not 100% sure about.

Jan
Received on 2000-04-29 05:26:34