Coda File System

Re: SOLVED: 4.7.4 vs 4.6.5 kernel

From: Robert V. Baron <rvb_at_cs.cmu.edu>
Date: 08 Dec 1998 15:32:50 -0500
Note: These problems were fixed in "4.7.x" at about the same time they were
fixed in 4.6.6.  So the fixes will appear in newer 4.7 snapshots.

Greg Troxel <gdt_at_fnord.ir.bbn.com> writes:

> I have a 4.7.4 venus running now.  The problem is that
> venus/worker.cc, starting in 4.6.6 (and also 4.7.4) calls mount(2)
> with "coda" or "cfs" as the first argument, but not MOUNT_CFS.  This
> ia apparently a lite-2 change that FreeBSD 2.2.x doesn't have.  With
> this change, and one compile nit, I can report that that 4.7.4 source
> tarball compiles ok on FreeBSD 2.2.6, and the resulting venus works
> under a few minutes of light testing.
> 
> I enclose 2 patches:
> 
>   worker.cc:	try MOUNT_CFS too
> 
>   dirbody.c: #include <sys/time.h> to avoid timespec undefined error
> 
> Index: coda/coda-src/venus/worker.cc
> diff -c coda/coda-src/venus/worker.cc:1.1.1.2 coda/coda-src/venus/worker.cc:1.2
> *** coda/coda-src/venus/worker.cc:1.1.1.2	Wed Oct  7 10:33:36 1998
> --- coda/coda-src/venus/worker.cc	Mon Dec  7 12:42:17 1998
> ***************
> *** 276,284 ****
>   #ifdef __BSD44__
>       if (mount("coda", venusRoot, 0, kernDevice) < 0) {
>   	if (mount("cfs", venusRoot, 0, kernDevice) < 0) {
> ! 	    eprint("mount(%s, %s) failed (%d), exiting",
> ! 		   kernDevice, venusRoot, errno);
> ! 	    exit(-1);
>   	}
>       }
>   #endif /* __BSD44__ */
> --- 276,290 ----
>   #ifdef __BSD44__
>       if (mount("coda", venusRoot, 0, kernDevice) < 0) {
>   	if (mount("cfs", venusRoot, 0, kernDevice) < 0) {
> ! #ifdef MOUNT_CFS	    
> ! 	    if (mount(MOUNT_CFS, venusRoot, 0, kernDevice) < 0) {
> ! #endif /* MOUNT_CFS */
> ! 		eprint("mount(%s, %s) failed (%d), exiting",
> ! 		       kernDevice, venusRoot, errno);
> ! 		exit(-1);
> ! #ifdef MOUNT_CFS
> ! 	    }
> ! #endif /* MOUNT_CFS */
>   	}
>       }
>   #endif /* __BSD44__ */
> 
> 
> Index: coda/coda-src/dir/dirbody.c
> diff -c coda/coda-src/dir/dirbody.c:1.1.1.1 coda/coda-src/dir/dirbody.c:1.2
> *** coda/coda-src/dir/dirbody.c:1.1.1.1	Thu Oct  8 17:10:09 1998
> --- coda/coda-src/dir/dirbody.c	Mon Dec  7 12:41:05 1998
> ***************
> *** 48,54 ****
>   #include <stdlib.h>
>   #include <sys/types.h>
>   #include <time.h>
> ! 
>   #include <cfs/coda.h>
>   #include <lwp.h>
>   #include <lock.h>
> --- 48,54 ----
>   #include <stdlib.h>
>   #include <sys/types.h>
>   #include <time.h>
> ! #include <sys/time.h>
>   #include <cfs/coda.h>
>   #include <lwp.h>
>   #include <lock.h>
> 
> 	Greg Troxel <gdt_at_ir.bbn.com>
Received on 1998-12-08 15:43:36