summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda/coda_fbsd.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unit2minor() use from kernel code.ed2008-09-261-1/+1
| | | | | | | | | | | | | | | When I changed kern_conf.c three months ago I made device unit numbers equal to (unneeded) device minor numbers. We used to require bitshifting, because there were eight bits in the middle that were reserved for a device major number. Not very long after I turned dev2unit(), minor(), unit2minor() and minor2unit() into macro's. The unit2minor() and minor2unit() macro's were no-ops. We'd better not remove these four macro's from the kernel, because there is a lot of (external) code that may still depend on them. For now it's harmless to remove all invocations of unit2minor() and minor2unit(). Reviewed by: kib
* Since we're now actively maintaining the Coda module in the FreeBSD sourcerwatson2008-02-101-34/+41
| | | | | | | | | | | tree, restyle everything but coda.h (which is more explicitly shared across systems) into a closer approximation to style(9). Remove a few more unused function prototypes. Add or clarify some comments. MFC after: 1 month
* Various further non-functional cleanups to coda:rwatson2008-02-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename print_vattr to coda_print_vattr and make static, rename print_cred to coda_print_cred. - Remove unused coda_vop_nop. - Add XXX comment because coda_readdir forwards to the cache vnode's readdir rather than venus_readdir, and annotate venus_readdir as unused. - Rename vc_nb_* to vc_*. - Use d_open_t, d_close_t, d_read_t, d_write_t, d_ioctl_t and d_poll_t for prototyping vc_* as that is the intent, don't use our own definitions. - Rename coda_nb_statfs to coda_statfs, rename NB_SFS_SIZ to CODA_SFS_SIZ. - Replace one more OBE reference to NetBSD with a reference to FreeBSD. - Tidy up a little vertical whitespace here and there. - Annotate coda_nc_zapvnode as unused. - Remove unused vcodattach. - Annotate VM_INTR as unused. - Annotate that coda_fhtovp is unused and doesn't match the FreeBSD prototype, so isn't hooked up to vfs_fhtovp. If we want NFS export of Coda to work someday, this needs to be fixed. - Remove unused getNewVnode. - Remove unused coda_vget, coda_init, coda_quotactl prototypes. MFC after: 1 month
* Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/codarwatson2007-07-121-4/+4
| | | | | | | | | | by removing files from src/sys/coda, and updating include paths in the new location, kernel configuration, and Makefiles. In one case add $FreeBSD$. Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith) Repo-copy madness: simon
* Avoid crash when opening Coda device: when allocating coda_mntinfo, werwatson2007-07-111-2/+3
| | | | | | | | need to initialize dev so that we can actually find the allocated coda_mntinfo structure later on. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Merge the dev_clone and dev_clone_cred event handlers into a singlerwatson2005-08-081-3/+4
| | | | | | | | | | | | | event handler, dev_clone, which accepts a credential argument. Implementors of the event can ignore it if they're not interested, and most do. This avoids having multiple event handler types and fall-back/precedence logic in devfs. This changes the kernel API for /dev cloning, and may affect third party packages containg cloning kernel modules. Requested by: phk MFC after: 3 days
* Explicitly hold a reference to the cdev we have just cloned. Thisphk2005-03-311-0/+1
| | | | | closes the race where the cdev was reclaimed before it ever made it back to devfs lookup.
* Remove unused coda_fbsd_getpages()phk2005-01-191-67/+0
|
* Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()phk2005-01-131-2/+2
| | | | directly.
* Start each of the license/copyright comments with /*-imp2005-01-051-1/+1
|
* General modernization of coda:brooks2004-09-011-49/+32
| | | | | | | | - Ditch NVCODA - Don't use a static major - Don't declare functions extern Reviewed by: peter
* Kill count device support from config. I've changed the last fewpeter2004-08-301-1/+1
| | | | | | | | | | | | | | | | | remaining consumers to have the count passed as an option. This is i4b, pc98/wdc, and coda. Bump configvers.h from 500013 to 600000. Remove heuristics that tried to parse "device ed5" as 5 units of the ed device. This broke things like the snd_emu10k1 device, which required quotes to make it parse right. The no-longer-needed quotes have been removed from NOTES, GENERIC etc. eg, I've removed the quotes from: device snd_maestro device "snd_maestro3" device snd_mss I believe everything will still compile and work after this.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-2/+2
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Second half of the dev_t cleanup.phk2004-06-171-1/+1
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-2/+2
| | | | Bump __FreeBSD_version accordingly.
* add missing #include <sys/module.h>phk2004-05-301-0/+1
|
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-1/+1
| | | | | | | | | contain the filedescriptor number on opens from userland. The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/* For now pass -1 all over the place.
* Use __FBSDID().obrien2003-06-101-3/+3
|
* Deregister the dev_clone event handler we registered - don't touch thetjr2003-03-271-2/+4
| | | | handlers installed by other devices.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+8
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* msgphk2003-02-261-2/+0
|
* Remove __P.alfred2002-03-201-3/+3
|
* Warning fix: coda_fbsd.c:113: warning: unused variable `ret'peter2001-06-151-1/+0
|
* Now works again and as a module and with devfs.shafeeq2001-06-051-1/+51
| | | | Used the bpf & tun drivers as examples as to what is necessary for devfs.
* Implement vop_std{get|put}pages() and add them to the default vop[].phk2001-05-011-15/+1
| | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-2/+3
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-35/+1
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Simplify cdevsw registration.phk1999-05-311-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-6/+21
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-2/+2
| | | | kernel compile
* Fix warnings preparing for -Wall -Wcast-qualdillon1999-01-271-2/+2
| | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary.
* Clean up the KLD/LKM goop a bit.peter1999-01-171-75/+1
|
* Remove the 'waslocked' parameter to vfs_object_create().eivind1999-01-051-2/+2
|
* Finished updating module event handlers to be compatible withbde1998-11-151-2/+2
| | | | modeventhand_t.
* Support KLD. We register and unregister two modules. "coda" (the vfs)peter1998-11-031-42/+57
| | | | | | | | | via VFS_SET(), and "codadev" for the cdevsw entry. From kldstat -v: 3 1 0xf02c5000 115d8 coda.ko Contains modules: Id Name 2 codadev 3 coda
* Fixes for lkm:rvb1998-09-291-3/+3
| | | | | 1. use VFS_LKM vs ACTUALLY_LKM_NOT_KERNEL 2. don't pass -DCODA to lkm build
* Cleanup and fix THE bugrvb1998-09-281-12/+13
|
* Put "stray" printouts under DIAGNOSTIC. Make everything buildrvb1998-09-251-16/+85
| | | | | with DEBUG on. Add support for lkm. (The macro's don't work for me; for a good chuckle look at the end of coda_fbsd.c.)
* Finish conversion of cfs -> codarvb1998-09-131-5/+5
|
* All the references to cfs, in symbols, structs, and stringsrvb1998-09-111-9/+9
| | | | have been changed to coda. (Same for CFS.)
* Pass2 completervb1998-09-021-78/+42
|
* Very Preliminary Codarvb1998-08-291-0/+241
OpenPOWER on IntegriCloud