Subject: port-mac68k/8625: Patch to enable coda for mac68k
To: None <gnats-bugs@gnats.netbsd.org>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-bugs
Date: 10/14/1999 12:51:14
>Number: 8625
>Category: port-mac68k
>Synopsis: The following patch enables coda to work on mac68k
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-mac68k-maintainer (NetBSD/mac68k Portmaster)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Oct 14 12:24:00 1999
>Last-Modified:
>Originator: Frederick Bruckman
>Organization:
>Release: NetBSD-1.4.1-19991005
>Environment:
System: NetBSD corwin.home 1.4.1 NetBSD 1.4.1 (CORWIN) #24:
Wed Oct 6 09:13:15 CDT 1999 fredb@corwin.home:
/usr/src/sys/arch/mac68k/compile/CORWIN mac68k
>Description:
The following patches are needed to run a coda client on mac68k
[developed with help from Bill Studenmund].
With these, I was able to serve a coda filesystem to a client
on the same machine, a Quadra 840AV, client and server built
using the anoncvs'd current coda sources. The results were less
than stellar--"ctoken" causes the machine to grind to a halt.
That could well be a bug in the client or server, and is no
reason to leave the CODA filesystem disabled.
I chose a major number of "44" simply because it's the next
available. The "vice-setup" script makes a /dev/coda with a major
number of 60, but that's easy to fix once a number is settled on.
>How-To-Repeat:
>Fix:
--- src/sys/arch/mac68k/conf/GENERIC.orig Mon Jun 21 10:08:25 1999
+++ src/sys/arch/mac68k/conf/GENERIC Wed Oct 6 09:09:20 1999
@@ -59,6 +59,7 @@
# File systems
file-system FFS # UFS
+file-system CODA # Coda file system (experimental, needs pseudo-device vcoda)
file-system EXT2FS # second extended file system (linux)
file-system LFS # log-structured file system
file-system MFS # memory file system
@@ -210,6 +211,7 @@
pseudo-device ccd 4 # concatenated/striped disk devices
#pseudo-device raid 4 # RAIDframe disk driver
pseudo-device md 1 # memory disk device (ramdisk)
+pseudo-device vcoda 1 # interface to Venus/Coda fs
pseudo-device vnd 4 # disk-like interface to files
# network pseudo-devices
--- src/etc/etc.mac68k/MAKEDEV.orig Fri Mar 26 02:45:25 1999
+++ src/etc/etc.mac68k/MAKEDEV Wed Oct 6 09:17:25 1999
@@ -41,6 +41,7 @@
# ccd* concatenated disk driver
# md* memory pseudo-disks
# fd* floppy disk drives (3 1/2")
+# cfs* Venus cache driver
#
# Terminal ports:
# ttye* ite consoles
@@ -74,7 +75,7 @@
all)
sh $0 std fd sd0 sd1 sd2 sd3 tty0 tty1 pty0 pty1
- sh $0 st0 st1 ch0 cd0 cd1 fd0 fd1 vnd0 vnd1 vnd2 vnd3
+ sh $0 st0 st1 ch0 cd0 cd1 cfs0 fd0 fd1 vnd0 vnd1 vnd2 vnd3
sh $0 ccd0 ccd1 ccd2 ccd3 md0 ss0 uk0 uk1 raid0 raid1 raid2 raid3
sh $0 ttye0 adb grf0 grf1 grf2 grf3
sh $0 bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7
@@ -338,6 +339,16 @@
mknod scsibus$unit c 39 $unit
chown root:wheel scsibus$unit
chmod 644 scsibus$unit
+ ;;
+
+cfs*)
+ unit=${i#cfs}
+ cfs=cfs$unit
+ major=44
+ rm -f $cfs
+ mknod $cfs c $major $unit
+ chown root.wheel $cfs
+ chmod 600 $cfs
;;
local)
--- src/sys/arch/mac68k/mac68k/conf.c.orig Thu Feb 18 01:32:56 1999
+++ src/sys/arch/mac68k/mac68k/conf.c Wed Oct 6 09:01:22 1999
@@ -54,6 +54,7 @@
#include "raid.h"
#include "sd.h"
#include "st.h"
+#include "vcoda.h"
#include "vnd.h"
/* No cdev for md */
@@ -67,6 +68,7 @@
bdev_decl(sd);
bdev_decl(st);
bdev_decl(sw);
+cdev_decl(vc_nb_);
bdev_decl(vnd);
struct bdevsw bdevsw[] =
@@ -213,6 +215,7 @@
#endif
cdev_disk_init(NRAID,raid), /* 42: RAIDframe disk driver */
cdev_disk_init(NFD,fd), /* 43: Sony floppy disk */
+ cdev_vc_nb_init(NVCODA,vc_nb_), /* 44: Venus cache driver */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
>Audit-Trail:
>Unformatted: