3 * Coda: an Experimental Distributed File System
6 * Copyright (c) 1987-1998 Carnegie Mellon University
9 * Permission to use, copy, modify and distribute this software and its
10 * documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation, and
14 * that credit is given to Carnegie Mellon University in all documents
15 * and publicity pertaining to direct or indirect use of this code or its
18 * CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS KNOWN TO HAVE BUGS,
19 * SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON ALLOWS
20 * FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON
21 * DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
22 * RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF
23 * ANY DERIVATIVE WORK.
25 * Carnegie Mellon encourages users of this software to return any
26 * improvements or extensions that they make, and to grant Carnegie
27 * Mellon the rights to redistribute these changes without encumbrance.
29 * @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
30 * $FreeBSD: src/sys/coda/coda_fbsd.c,v 1.18 1999/09/25 18:23:43 phk Exp $
31 * $DragonFly: src/sys/vfs/coda/Attic/coda_fbsd.c,v 1.13 2006/07/28 02:17:41 dillon Exp $
35 #include "use_vcoda.h"
37 #include <sys/param.h>
38 #include <sys/systm.h>
39 #include <sys/kernel.h>
41 #include <sys/device.h>
43 #include <sys/malloc.h>
44 #include <sys/fcntl.h>
45 #include <sys/ucred.h>
46 #include <sys/vnode.h>
49 #include <vm/vnode_pager.h>
53 #include "coda_vnops.h"
54 #include "coda_psdev.h"
57 From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
58 Subject: Re: New 3.0 SNAPshot CDROM about ready for production..
59 To: "Robert.V.Baron" <rvb@GLUCK.CODA.CS.CMU.EDU>
60 Date: Fri, 20 Feb 1998 15:57:01 -0800
62 > Also I need a character device major number. (and might want to reserve
63 > a block of 10 syscalls.)
65 Just one char device number? No block devices? Very well, cdev 93 is yours!
70 static struct dev_ops coda_dev_ops = {
71 { "Coda", VC_DEV_NO, 0 },
73 .d_close = vc_nb_close,
75 .d_write = vc_nb_write,
76 .d_ioctl = vc_nb_ioctl,
81 #define VCDEBUG if (vcdebug) printf
84 codadev_modevent(module_t mod, int type, void *data)
88 dev_ops_add(&coda_dev_ops, 0, 0);
91 dev_ops_remove(&coda_dev_ops, 0, 0);
98 static moduledata_t codadev_mod = {
103 DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+VC_DEV_NO);
106 coda_fbsd_getpages(struct vop_getpages_args *ap)
111 ret = vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count,
117 coda_fbsd_putpages(struct vop_putpages_args *ap)
120 return vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count,
121 ap->a_sync, ap->a_rtvals);