summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
Commit message (Collapse)AuthorAgeFilesLines
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-273-9/+9
| | | | reference.
* Fix a BUF_TIMELOCK race against BUF_LOCK and fix a deadlock in vget()dillon2001-12-201-1/+1
| | | | | | | | against VM_WAIT in the pageout code. Both fixes involve adjusting the lockmgr's timeout capability so locks obtained with timeouts do not interfere with locks obtained without a timeout. Hopefully MFC: before the 4.5 release
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-102-3/+3
| | | | also don't use ANSI string concatenation.
* Change the vnode list under the mount point from a LIST to a TAILQdillon2001-10-231-2/+2
| | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days
* KSE Milestone 2julian2001-09-129-215/+218
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Protect the mnt_vnode list with the mntvnode lock.jhb2001-06-281-4/+15
|
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-132-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* - sys/n[tw]fs moved to sys/fs/n[tw]fsru2001-05-267-20/+20
| | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-161-22/+3
| | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp
* Implement vop_std{get|put}pages() and add them to the default vop[].phk2001-05-011-4/+2
| | | | | 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-5/+8
| | | | | | | | | | | 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)
* Add a vop_stdbmap(), and make it part of the default vop vector.phk2001-04-291-25/+0
| | | | | | Make 7 filesystems which don't really know about VOP_BMAP rely on the default vector, rather than more or less complete local vop_nopbmap() implementations.
* vnode_pager_freepage() is really vm_page_free() in disguise,alfred2001-04-191-2/+2
| | | | nuke vnode_pager_freepage() and replace all calls to it with vm_page_free()
* Add dependancy on libmchain module.bp2001-03-221-0/+1
| | | | Spotted by: Andrzej Tobola <san@iem.pw.edu.pl>
* Do not kill vnodes after rename. This can cause deadlocks in the deadfs.bp2001-03-111-6/+2
| | | | Noticed by: Matthew N. Dodd <winter@jurai.net>
* Slightly reorganize allocation of new vnode. Use bit NVOLUME to detectedbp2001-03-106-51/+45
| | | | | vnodes which represent volumes (before it was done via strcmp()). Turn n_refparent into bit in the n_flag field.
* Synch with changes in the NCP requester.bp2001-03-103-192/+233
|
* Grab the process lock while calling psignal and before calling psignal.jhb2001-03-071-0/+2
|
* A name of the file can change while its id stays the same. So, we havebp2001-03-062-15/+5
| | | | | | to update it as well. Remove unused function.
* Reviewed by: jlemonadrian2001-03-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
* Change and clean the mutex lock interface.bmilekic2001-02-092-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-042-3/+3
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* v_interlock is a mutex now, not simple lock.bp2000-11-041-1/+1
|
* Make malloc use M_ZERO in some more locations.dwmalone2000-10-292-5/+2
| | | | | | | | Don't check for a null pointer if malloc called with M_WAITOK. Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: bp
* Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ingphk2000-10-291-1/+0
| | | | | | | | | | the offending inline function (BUF_KERNPROC) on it being #included already. I'm not sure BUF_KERNPROC() is even the right thing to do or in the right place or implemented the right way (inline vs normal function). Remove consequently unneeded #includes of <sys/proc.h>
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-042-7/+10
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Protect hash data with lock manager instead of home grown one.bp2000-10-024-71/+105
| | | | | | | | | Replace shared lock on vnode with exclusive one. It shouldn't impact perfomance as NCP protocol doesn't support outstanding requests. Do not hold simple lock on vnode for long period of time. Add functionality to the nwfs_print() routine.
* Get rid from the legacy __P() macro. Remove 'register' keywords.bp2000-10-026-95/+99
|
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.phk2000-07-041-2/+2
| | | | Pointed out by: bde
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:phk2000-07-031-2/+2
| | | | | | | | Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our sources: -sysctl_vm_zone SYSCTL_HANDLER_ARGS +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
* Back out the previous change to the queue(3) interface.jake2000-05-262-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-232-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-053-0/+3
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Remove unneeded #include <vm/vm_zone.h>phk2000-04-301-1/+0
| | | | Generated by: src/tools/tools/kerninclude
* nwfs depends on ncppeter2000-04-291-0/+2
|
* Remove unneeded <sys/buf.h> includes.phk2000-04-181-1/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-151-2/+2
| | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
* Try to obtain timezone offset from an environment of mount program.bp2000-04-054-15/+16
| | | | This helps in cases where CMOS clock set to UTC time.
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-3/+3
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-202-2/+2
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Check if module was compiled without SMP support and running onbp2000-01-151-0/+9
| | | | an SMP system.
* Add VT_NWFS tag.bp2000-01-151-4/+0
|
* Forward declare some structs so that this header is more self-suifficent.bde2000-01-142-0/+19
|
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-292-4/+4
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Second pass commit to introduce new ACL and Extended Attribute systemrwatson1999-12-191-1/+2
| | | | | | | calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind
* Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-151-33/+1
|
* Fix pointer problem for the Alphapeter1999-12-121-2/+2
|
* Bump local version number to 1.3.4.bp1999-12-121-1/+1
|
* Lock reporting and assertion changes.eivind1999-12-111-1/+1
| | | | | | | | | | | | | | | * lockstatus() and VOP_ISLOCKED() gets a new process argument and a new return value: LK_EXCLOTHER, when the lock is held exclusively by another process. * The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them * Extend the vnode_if.src format to allow more exact specification than locked/unlocked. This commit should not do any semantic changes unless you are using DEBUG_VFS_LOCKS. Discussed with: grog, mch, peter, phk Reviewed by: peter
OpenPOWER on IntegriCloud