summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda
Commit message (Collapse)AuthorAgeFilesLines
* Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()phk2005-01-132-8/+8
| | | | directly.
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-114-10/+6
| | | | | | | | | | | | | | | | | | I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
* Start each of the license/copyright comments with /*-imp2005-01-0519-27/+27
|
* Convert coda to nmount.phk2004-12-061-19/+13
|
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-012-185/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-4/+4
| | | | | | | | | instead of a vnode for it. The vnode_pager does not and should not have any interest in what the filesystem uses for backend. (vfs_cluster doesn't use the backing store argument.)
* Do not use devsw() but si_devsw direction. This is still bogus but aphk2004-09-231-1/+1
| | | | fair bit less so.
* General modernization of coda:brooks2004-09-014-93/+54
| | | | | | | | - 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-303-3/+3
| | | | | | | | | | | | | | | | | 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.
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-13/+14
| | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
* Avoid casts as lvalues.kan2004-07-281-1/+1
|
* 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".
* Remove 'td = curthread' that shadows the arguments to coda_root().rwatson2004-07-121-1/+0
| | | | Missed by: alfred
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-2/+3
| | | | | | This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
* When we traverse the vnodes on a mountpoint we need to look out forphk2004-07-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | our cached 'next vnode' being removed from this mountpoint. If we find that it was recycled, we restart our traversal from the start of the list. Code to do that is in all local disk filesystems (and a few other places) and looks roughly like this: MNT_ILOCK(mp); loop: for (vp = TAILQ_FIRST(&mp...); (vp = nvp) != NULL; nvp = TAILQ_NEXT(vp,...)) { if (vp->v_mount != mp) goto loop; MNT_IUNLOCK(mp); ... MNT_ILOCK(mp); } MNT_IUNLOCK(mp); The code which takes vnodes off a mountpoint looks like this: MNT_ILOCK(vp->v_mount); ... TAILQ_REMOVE(&vp->v_mount->mnt_nvnodelist, vp, v_nmntvnodes); ... MNT_IUNLOCK(vp->v_mount); ... vp->v_mount = something; (Take a moment and try to spot the locking error before you read on.) On a SMP system, one CPU could have removed nvp from our mountlist but not yet gotten to assign a new value to vp->v_mount while another CPU simultaneously get to the top of the traversal loop where it finds that (vp->v_mount != mp) is not true despite the fact that the vnode has indeed been removed from our mountpoint. Fix: Introduce the macro MNT_VNODE_FOREACH() to traverse the list of vnodes on a mountpoint while taking into account that vnodes may be removed from the list as we go. This saves approx 65 lines of duplicated code. Split the insmntque() which potentially moves a vnode from one mount point to another into delmntque() and insmntque() which does just what the names say. Fix delmntque() to set vp->v_mount to NULL while holding the mountpoint lock.
* Second half of the dev_t cleanup.phk2004-06-173-3/+3
| | | | | | | | | | | 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-1610-26/+26
| | | | Bump __FreeBSD_version accordingly.
* add missing #include <sys/module.h>phk2004-05-301-0/+1
|
* Device megapatch 5/6:phk2004-02-211-2/+1
| | | | | | | | | | | | Remove the unused second argument from udev2dev(). Convert all remaining users of makedev() to use udev2dev(). The semantic difference is that udev2dev() will only locate a pre-existing dev_t, it will not line makedev() create a new one. Apart from the tiny well controlled windown in D_PSEUDO drivers, there should no longer be any "anonymous" dev_t's in the system now, only dev_t's created with make_dev() and make_dev_alias()
* 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.
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-091-2/+2
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* Remove mntvnode_mtx and replace it with per-mountpoint mutex.kan2003-11-051-3/+3
| | | | | | | | | | Introduce two new macros MNT_ILOCK(mp)/MNT_IUNLOCK(mp) to operate on this mutex transparently. Eventually new mutex will be protecting more fields in struct mount, not only vnode list. Discussed with: jeff
* Include <sys/mutex.h>. Don't depend on namespace pollution in <sys/vnode.h>.bde2003-10-051-2/+1
| | | | | Fixed a nearby style bug. The include of vcoda.h used angle brackets and was not used.
* - Check XLOCK prior to accessing v_data.jeff2003-10-051-0/+6
|
* - Make proper use of the mntvnode_mtx. We do not need the loop labeljeff2003-10-041-3/+5
| | | | | because we do not drop the mntvnode_mtx. If this code had ever executed and hit the loop condition it would have spun forever.
* Move an overly verbose message under #ifdef CODA_VERBOSE.tjr2003-09-131-0/+2
|
* Move an annoying printf() call that gets triggered every time antjr2003-09-101-0/+2
| | | | operation is interrupted (with ^C or ^Z) under CODA_VERBOSE.
* Add support for the Coda 6.x venus<->kernel interface. This extendstjr2003-09-0711-342/+388
| | | | | | | | | | | | | | FIDs to be 128-bits wide and adds support for realms. Add a new CODA_COMPAT_5 option, which requests support for the old Coda 5.x interface instead of the new one. Create a new coda5.ko module that supports the 5.x interface, and make the existing coda.ko module use the new 6.x interface. These modules cannot both be loaded at the same time. Obtained from: Jan Harkes & the coda-6.0.2 distribution, NetBSD (drochner) (CODA_COMPAT_5 option).
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-262-4/+4
| | | | | | | | | 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.
* Remove in toto coda_strategy which incorrectly implemented vop_panic();phk2003-06-151-23/+0
|
* Initialize struct vfsops C99-sparsely.phk2003-06-122-26/+18
| | | | | Submitted by: hmp Reviewed by: phk
* Use __FBSDID().obrien2003-06-107-27/+23
|
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-311-14/+14
| | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
* Deregister the dev_clone event handler we registered - don't touch thetjr2003-03-271-2/+4
| | | | handlers installed by other devices.
* Set f_fstypename in coda_nb_statfs().tjr2003-03-071-0/+1
|
* Add a temporary workaround for a deadlock in Coda venus 5.3.19 thattjr2003-03-062-2/+28
| | | | | | occurs when mounting the filesystem. The problem is that venus issues the mount() syscall, which calls vfs_mount(), which calls coda_root() which attempts to communicate with venus.
* VOP_PATHCONF returns a register_t, not an int. Noticed by phk.tjr2003-03-051-1/+1
|
* Add prototype for coda_pathconf() that I missed in the previous commit.tjr2003-03-051-0/+1
|
* Add a minimal implementation of VOP_PATHCONF to silence warningtjr2003-03-051-1/+29
| | | | messages from ls(1).
* Handle the case where a_uio->uio_td == NULL properly in coda_readlink().tjr2003-03-051-1/+2
| | | | This happens when called from lookup().
* 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
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Back our kernel support for reliable signal queues.jmallett2002-10-011-11/+7
| | | | Requested by: rwatson, phk, and many others
* When working with sigset_t's, and needing to perform masking operations basedjmallett2002-10-011-7/+11
| | | | | | on a process's pending signals, use the signal queue flattener, ksiginfo_to_sigset_t, on the process, and on a local sigset_t, and then work with that as needed.
* Fix these warns where sizeof(int) != sizeof(void *)njl2002-09-261-4/+4
| | | | | | | | | | | | | | | | /h/des/src/sys/coda/coda_venus.c: In function `venus_ioctl': /h/des/src/sys/coda/coda_venus.c:277: warning: cast from pointer to integer of different size /h/des/src/sys/coda/coda_venus.c:292: warning: cast from pointer to integer of different size /h/des/src/sys/coda/coda_venus.c: In function `venus_readlink': /h/des/src/sys/coda/coda_venus.c:380: warning: cast from pointer to integer of different size /h/des/src/sys/coda/coda_venus.c: In function `venus_readdir': /h/des/src/sys/coda/coda_venus.c:637: warning: cast from pointer to integer of different size Submitted by: des-alpha-tinderbox
* - Use vrefcnt() instead of directly accessing v_usecount.jeff2002-09-253-19/+21
|
* Attempt to fix the error reported by the alpha tinderbox. A pointeriedowse2002-09-221-2/+2
| | | | | was being cast to an integer as part of a hash function, so just add an intptr_t cast to silence the warning.
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-141-1/+1
| | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version)
OpenPOWER on IntegriCloud