Date: Sun, 7 Dec 1997 12:26:44 -0800 (PST) From: Rob Mallory <rmallory@qualcomm.com> To: dyson@freebsd.org Cc: hackers@freebsd.org, freebsd-afs@freebsd.org Subject: Re: AFS for FreeBSD - OK, I think we're ready! Message-ID: <199712072026.MAA15886@tarkin.qualcomm.com> In-Reply-To: <199712070223.VAA11570@dyson.iquest.net> from "John S. Dyson" at "Dec 6, 97 09:23:12 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
John Dyson said:
> I just took a look at the CODA stuff, and noticed the FreeBSD name in
> some of it. It really shouldn't be too hard to get it working, but I
> don't know enough to accurately make that judgement. If you have some
> work that appears to be close, maybe I can help and take a look at it?
>
> (I only have about 10% time to work on it :-(, but I do think that this
> is important.)
(here is 1/2 of 1% you can spend right now ;-)
OK, I spent a few minutes bringing my old stuff up to -current.
John, can you review/commit these diffs? Getting these out of the
way now makes porting much easier...
If the syscall id numbers conflict with the AFS numbers, go ahead
and bump them up.
-rob [rmallory@Qualcomm.com]
diff -r -c -d -C 2 -P sys.orig/conf/files sys/conf/files
*** sys.orig/conf/files Tue Dec 2 13:26:31 1997
--- sys/conf/files Sun Dec 7 11:28:07 1997
***************
*** 14,17 ****
--- 14,23 ----
clean "aic7xxx_seq.h aic7xxx_reg.h" \
dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/scsi/scsi_message.h aicasm"
+ cfs/cfs_namecache.c optional vcfs
+ cfs/cfs_nbsd.c optional vcfs
+ cfs/cfs_psdev.c optional vcfs
+ cfs/cfs_subr.c optional vcfs
+ cfs/cfs_vfsops.c optional vcfs
+ cfs/cfs_vnodeops.c optional vcfs
ddb/db_access.c optional ddb
ddb/db_aout.c optional ddb
diff -r -c -d -C 2 -P sys.orig/i386/conf/files.i386 sys/i386/conf/files.i386
*** sys.orig/i386/conf/files.i386 Mon Dec 1 01:29:50 1997
--- sys/i386/conf/files.i386 Sun Dec 7 11:30:51 1997
***************
*** 304,305 ****
--- 304,312 ----
gnu/i386/isa/dgb.c optional dgb device-driver
pci/ide_pci.c optional wd device-driver
+ cfs/cfs_subr.c optional vcfs
+ cfs/cfs_namecache.c optional vcfs
+ cfs/cfs_vfsops.c optional vcfs
+ cfs/cfs_nbsd.c optional vcfs
+ cfs/cfs_vnodeops.c optional vcfs
+ cfs/cfs_psdev.c optional vcfs
+
diff -r -c -d -C 2 -P sys.orig/kern/init_sysent.c sys/kern/init_sysent.c
*** sys.orig/kern/init_sysent.c Sun Oct 26 12:28:51 1997
--- sys/kern/init_sysent.c Sun Dec 7 11:24:55 1997
***************
*** 266,269 ****
--- 266,281 ----
{ 0, (sy_call_t *)nosys }, /* 239 = timer_getoverrun */
{ 2, (sy_call_t *)nanosleep }, /* 240 = nanosleep */
+ #ifdef CFS
+ { 6, (sys_call_t *)icreate }, /* 241 = icreate */
+ { 3, (sys_call_t *)iopen }, /* 242 = iopen */
+ { 6, (sys_call_t *)iread }, /* 243 = iread */
+ { 6, (sys_call_t *)iwrite }, /* 244 = iwrite */
+ { 3, (sys_call_t *)iinc }, /* 245 = iinc */
+ { 3, (sys_call_t *)idec }, /* 246 = idec */
+ { 4, (sys_call_t *)pioctl }, /* 247 = pioctl */
+ { 0, (sy_call_t *)nosys }, /* 248 = unimplemented setpag */
+ { 0, (sy_call_t *)nosys }, /* 249 = unimplemented */
+ { 3, (sy_call_t *)minherit }, /* 250 = minherit */
+ #else /* !CFS */
{ 0, (sy_call_t *)nosys }, /* 241 = nosys */
{ 0, (sy_call_t *)nosys }, /* 242 = nosys */
***************
*** 276,279 ****
--- 288,292 ----
{ 0, (sy_call_t *)nosys }, /* 249 = nosys */
{ 3, (sy_call_t *)minherit }, /* 250 = minherit */
+ #endif /* !CFS */
{ 1, (sy_call_t *)rfork }, /* 251 = rfork */
{ 3, (sy_call_t *)openbsd_poll }, /* 252 = openbsd_poll */
diff -r -c -d -C 2 -P sys.orig/kern/syscalls.c sys/kern/syscalls.c
*** sys.orig/kern/syscalls.c Sun Oct 26 12:28:54 1997
--- sys/kern/syscalls.c Sun Dec 7 11:24:55 1997
***************
*** 255,258 ****
--- 255,269 ----
"#239", /* 239 = timer_getoverrun */
"nanosleep", /* 240 = nanosleep */
+ #ifdef CFS
+ "icreate", /* 241 = icreate */
+ "iopen", /* 242 = iopen */
+ "iread", /* 243 = iread */
+ "iwrite", /* 244 = iwrite */
+ "iinc", /* 245 = iinc */
+ "idec", /* 246 = idec */
+ "pioctl", /* 247 = pioctl */
+ "#248", /* 248 = unimplemented setpag */
+ "#249", /* 249 = unimplemented */
+ #else /* !CFS */
"#241", /* 241 = nosys */
"#242", /* 242 = nosys */
***************
*** 264,267 ****
--- 275,279 ----
"#248", /* 248 = nosys */
"#249", /* 249 = nosys */
+ #endif /* !CFS */
"minherit", /* 250 = minherit */
"rfork", /* 251 = rfork */
diff -r -c -d -C 2 -P sys.orig/kern/syscalls.master sys/kern/syscalls.master
*** sys.orig/kern/syscalls.master Sun Oct 26 12:27:51 1997
--- sys/kern/syscalls.master Sun Dec 7 11:24:55 1997
***************
*** 382,385 ****
--- 382,403 ----
240 STD POSIX { int nanosleep(const struct timespec *rqtp, \
struct timespec *rmtp); }
+ ; system calls 241-249 reserved for Coda File System
+ #ifdef CFS
+ 241 STD { int sys_icreate(int dev, int near_inode, int param1, \
+ int param2, int param3, int param4); }
+ 242 STD { int sys_iopen(int dev, int inode, int usermode); }
+ 243 STD { int sys_iread(int dev, int inode, long inode_p1, \
+ unsigned int offset, char *cbuf, \
+ unsigned int count); }
+ 244 STD { int sys_iwrite(int dev, int inode, long inode_p1, \
+ unsigned int offset, char *cbuf, \
+ unsigned int count); }
+ 245 STD { int sys_iinc(int dev, int inode, long inode_p1); }
+ 246 STD { int sys_idec(int dev, int inode, long inode_p1); }
+ 247 STD { int sys_pioctl(char *path, int com, caddr_t comarg, \
+ int follow); }
+ 248 UNIMPL setpag
+ 249 UNIMPL
+ #else /* !CFS */
241 UNIMPL NOHIDE nosys
242 UNIMPL NOHIDE nosys
***************
*** 391,394 ****
--- 409,413 ----
248 UNIMPL NOHIDE nosys
249 UNIMPL NOHIDE nosys
+ #endif /* !CFS */
; syscall numbers initially used in OpenBSD
250 STD BSD { int minherit(caddr_t addr, size_t len, int inherit); }
diff -r -c -d -C 2 -P sys.orig/sys/mount.h sys/sys/mount.h
*** sys.orig/sys/mount.h Mon Nov 24 23:07:47 1997
--- sys/sys/mount.h Sun Dec 7 11:24:14 1997
***************
*** 108,112 ****
#define MOUNT_EXT2FS 17 /* Linux EXT2FS */
#define MOUNT_TFS 18 /* Netcon Novell filesystem */
! #define MOUNT_MAXTYPE 18
#define INITMOUNTNAMES { \
--- 108,113 ----
#define MOUNT_EXT2FS 17 /* Linux EXT2FS */
#define MOUNT_TFS 18 /* Netcon Novell filesystem */
! #define MOUNT_CFS 19 /* Coda Filesystem */
! #define MOUNT_MAXTYPE 19
#define INITMOUNTNAMES { \
***************
*** 130,134 ****
"ext2fs", /* 17 MOUNT_EXT2FS */ \
"tfs", /* 18 MOUNT_TFS */ \
! 0, /* 18 MOUNT_SPARE */ \
}
--- 131,136 ----
"ext2fs", /* 17 MOUNT_EXT2FS */ \
"tfs", /* 18 MOUNT_TFS */ \
! "cfs", /* 19 MOUNT_TFS */ \
! 0, /* 19 MOUNT_SPARE */ \
}
diff -r -c -d -C 2 -P sys.orig/sys/syscall.h sys/sys/syscall.h
*** sys.orig/sys/syscall.h Sun Oct 26 12:28:41 1997
--- sys/sys/syscall.h Sun Dec 7 11:24:14 1997
***************
*** 241,243 ****
#define SYS_munlockall 325
#define SYS___getcwd 326
! #define SYS_MAXSYSCALL 327
--- 241,250 ----
#define SYS_munlockall 325
#define SYS___getcwd 326
! #define SYS_icreate 327
! #define SYS_iopen 328
! #define SYS_iread 329
! #define SYS_iwrite 330
! #define SYS_iinc 331
! #define SYS_idec 332
! #define SYS_pioctl 333
! #define SYS_MAXSYSCALL 334
diff -r -c -d -C 2 -P sys.orig/sys/sysproto.h sys/sys/sysproto.h
*** sys.orig/sys/sysproto.h Thu Nov 6 11:29:49 1997
--- sys/sys/sysproto.h Sun Dec 7 11:24:14 1997
***************
*** 736,739 ****
--- 736,783 ----
struct timespec * rmtp;
};
+ struct icreate_args {
+ int dev;
+ int near_inode;
+ int param1;
+ int param2;
+ int param3;
+ int param4;
+ };
+ struct iopen_args {
+ int dev;
+ int inode;
+ int usermode;
+ };
+ struct iread_args {
+ int dev;
+ int inode;
+ long inode_p1;
+ unsigned int offset;
+ char * cbuf;
+ };
+ struct iwrite_args {
+ int dev;
+ int inode;
+ long inode_p1;
+ unsigned int offset;
+ char * cbuf;
+ unsigned int count;
+ };
+ struct iinc_args {
+ int dev;
+ int inode;
+ long inode_p1;
+ };
+ struct idec_args {
+ int dev;
+ int inode;
+ long inode_p1;
+ };
+ struct pioctl_args {
+ char * path;
+ int com;
+ caddr_t comarg;
+ int follow;
+ };
struct minherit_args {
caddr_t addr;
diff -r -c -d -C 2 -P sys.orig/sys/vnode.h sys/sys/vnode.h
*** sys.orig/sys/vnode.h Fri Dec 5 11:55:49 1997
--- sys/sys/vnode.h Sun Dec 7 11:24:14 1997
***************
*** 61,65 ****
VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_PC, VT_LFS, VT_LOFS, VT_FDESC,
VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS,
! VT_UNION, VT_MSDOSFS, VT_DEVFS, VT_TFS
};
--- 61,65 ----
VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_PC, VT_LFS, VT_LOFS, VT_FDESC,
VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS,
! VT_UNION, VT_MSDOSFS, VT_DEVFS, VT_TFS, VT_CFS
};
*** dinode.h Sat Feb 22 01:47:37 1997
--- dinode.h.coda Sun Sep 28 15:06:45 1997
diff -r -c -d -C 2 -P sys.orig/ufs/ufs/dinode.h sys/ufs/ufs/dinode.h
*** sys.orig/ufs/ufs/dinode.h Sat Feb 22 01:47:37 1997
--- sys/ufs/ufs/dinode.h Sun Sep 28 15:06:45 1997
***************
*** 75,80 ****
--- 75,83 ----
union {
u_int16_t oldids[2]; /* 4: Ffs: old user and group ids. */
int32_t inumber; /* 4: Lfs: inode number. */
+ #ifdef CFS
+ int32_t volumeid; /* 4: Coda volume number */
+ #endif CFS
} di_u;
u_int64_t di_size; /* 8: File byte count. */
int32_t di_atime; /* 16: Last access time. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712072026.MAA15886>
