summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Remove the copyinstr call which was trying to copy the pathname in fromdfr2001-03-031-3/+0
| | | | | | | | | user space. It has already been copied in and mp->mnt_stat.f_mntonname has already been initialised by the caller. This fixes a panic on the alpha caused by the fact that the variable 'size' wasn't initialised because the call to copyinstr() bailed out with an EFAULT error.
* Reviewed by: jlemonadrian2001-03-0111-46/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Display the Joliet Extension 'level' in the log message.alfred2001-02-231-1/+1
| | | | PR: kern/24998
* o Move per-process jail pointer (p->pr_prison) to inside of the subjectrwatson2001-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | credential structure, ucred (cr->cr_prison). o Allow jail inheritence to be a function of credential inheritence. o Abstract prison structure reference counting behind pr_hold() and pr_free(), invoked by the similarly named credential reference management functions, removing this code from per-ABI fork/exit code. o Modify various jail() functions to use struct ucred arguments instead of struct proc arguments. o Introduce jailed() function to determine if a credential is jailed, rather than directly checking pointers all over the place. o Convert PRISON_CHECK() macro to prison_check() function. o Move jail() function prototypes to jail.h. o Emulate the P_JAILED flag in fill_kinfo_proc() and no longer set the flag in the process flags field itself. o Eliminate that "const" qualifier from suser/p_can/etc to reflect mutex use. Notes: o Some further cleanup of the linux/jail code is still required. o It's now possible to consider resolving some of the process vs credential based permission checking confusion in the socket code. o Mutex protection of struct prison is still not present, and is required to protect the reference count plus some fields in the structure. Reviewed by: freebsd-arch Obtained from: TrustedBSD Project
* Remove a debug printf.phk2001-02-181-3/+1
|
* Extend kqueue down to the device layer.jlemon2001-02-152-30/+55
| | | | Backwards compatible approach suggested by: peter
* Add a hook for loading of a Unicode -> char conversion routine as a kld at asobomax2001-02-131-0/+12
| | | | | | | | | | run-time. This is temporary solution until proper kernel Unicode interfaces are in place and as such was purposely designed to be as tiny as possible (3 lines of the code not counting comments). The port with conversion routines for the most popular single-byte languages will be added later today Reviewed by: bp, "Michael C . Wu" <keichii@iteration.net> Approved by: bp
* Change and clean the mutex lock interface.bmilekic2001-02-0914-82/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Fix typo: seperate -> separate.asmodai2001-02-062-2/+2
| | | | Seperate does not exist in the english language.
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-041-2/+1
| | | | | Created with: sed(1) Reviewed by: md5(1)
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-0410-17/+17
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Use <sys/queue.h> macro API.phk2001-02-042-3/+2
|
* Remove a DIAGNOSTIC check which belongs in <sys/queue.h> if anyplace at all.phk2001-02-042-8/+0
|
* At the point in time where most devices are created, we don't know whatphk2001-02-022-1/+16
| | | | | time it is because boottime is not yet initialized. Finagle the relevant fields when we get the chance.
* Only superuser can create symlinks.phk2001-02-021-2/+5
| | | | | Give symlinks mode 755 by default to avoid triggering alert eyes. (the mode isn't use on symlinks)
* Zap last remaining references to (and a use use of) of simple_locks.peter2001-01-311-1/+1
|
* Add a BUF_KERNPROC() in the BIO_DELETE path.phk2001-01-301-0/+1
| | | | This seems to fix the problem which md(4) backed filesystems exposed.
* Fix two minor nits.phk2001-01-302-2/+6
| | | | Existences revealed, but no details offered by: bp
* This patch reestablishes the spec_fsync() guarentee that synchronousdillon2001-01-291-7/+16
| | | | | | | | | | | | | | | | fsyncs, which typically occur during unmounting, will drain all dirty buffers even if it takes multiple passes to do so. The guarentee was mangled by the last patch which solved a problem due to -current disabling interrupts while holding giant (which caused an infinite spin loop waiting for I/O to complete). -stable does not have either patch, but has a similar bug in the original spec_fsync() code which is triggered by a bug in the softupdates umount code, a fix for which will be committed to -current as soon as Kirk stamps it. Then both solutions will be MFC'd to -stable. -stable currently suffers from a combination of the softupdates bug and a small window of opportunity in the original spec_fsync() code, and -stable also suffers from the spin-loop bug but since interrupts are enabled the spin resolves itself in a few milliseconds.
* Back out proc locking to protect p_ucred for obtaining additionaljhb2001-01-273-38/+5
| | | | references along with the actual obtaining of additional references.
* Convert all simplelocks to mutexes and remove the simplelock implementations.jasone2001-01-248-64/+58
|
* - Catch up to proc flag changes.jhb2001-01-241-2/+6
|
* The lock being destroyed was misnamed, not unused. Add the lockdestroy()jhb2001-01-241-0/+2
| | | | | | back in but with the proper name so that this compiles. Submitted by: jasone
* Proc locking to protect p_ucred while we obtain additional references.jhb2001-01-241-2/+15
|
* - Remove unused header include.jhb2001-01-231-5/+3
| | | | - Use queue macros.
* Proc locking to protect p_ucred while we obtain an additional reference.jhb2001-01-231-1/+9
|
* - FreeBSD doesn't have an abortop vnop as far as I can tell, so #ifdefjhb2001-01-231-4/+2
| | | | | references to the hpf op out. - Remove a lockdestroy() on a non-existent variable.
* Fix breakage unconvered by LINT - dont refer to undefined variables inpeter2001-01-171-0/+2
| | | | KASSERT()
* Delete unused #include <sys/select.h>.wollman2001-01-095-6/+0
|
* Don't compile a dead variable declaration.wollman2001-01-091-0/+2
|
* Use macro API to <sys/queue.h>phk2000-12-312-6/+6
|
* Fix a lockup problem that occurs with 'cvs update'. specfs's fsync candillon2000-12-301-0/+13
| | | | | | get into the same sort of infinite loop that ffs's fsync used to get into, probably due to background bitmap writes. The solution is the same.
* This implements a better launder limiting solution. There was a solutiondillon2000-12-261-0/+2
| | | | | | | | | | | | | | | | | | | in 4.2-REL which I ripped out in -stable and -current when implementing the low-memory handling solution. However, maxlaunder turns out to be the saving grace in certain very heavily loaded systems (e.g. newsreader box). The new algorithm limits the number of pages laundered in the first pageout daemon pass. If that is not sufficient then suceessive will be run without any limit. Write I/O is now pipelined using two sysctls, vfs.lorunningspace and vfs.hirunningspace. This prevents excessive buffered writes in the disk queues which cause long (multi-second) delays for reads. It leads to more stable (less jerky) and generally faster I/O streaming to disk by allowing required read ops (e.g. for indirect blocks and such) to occur without interrupting the write stream, amoung other things. NOTE: eventually, filesystem write I/O pipelining needs to be done on a per-device basis. At the moment it is globalized.
* Protect proc.p_pptr and proc.p_children/p_sibling with thejake2000-12-232-0/+16
| | | | | | | | proctree_lock. linprocfs not locked pending response from informal maintainer. Reviewed by: jhb, -smp@
* When p_ucred is passed to the venus daemon, first grab the proc lock tojhb2000-12-151-2/+14
| | | | | protect the p_ucred pointer, obtain a seperate reference to the ucred, release the lock, and then pass in the new ucred reference.
* o Tighten restrictions on use of /proc/pid/ctl and move access checksrwatson2000-12-131-4/+10
| | | | | | | in ctl to using centralized p_can() inter-process access control interface. Reviewed by: sef
* - Change the allproc_lock to use a macro, ALLPROC_LOCK(how), insteadjake2000-12-131-1/+4
| | | | | | | | of explicit calls to lockmgr. Also provides macros for the flags pased to specify shared, exclusive or release which map to the lockmgr flags. This is so that the use of lockmgr can be easily replaced with optimized reader-writer locks. - Add some locking that I missed the first time.
* Add a module version (so that linprocfs can properly depend on procfs)des2000-12-091-0/+1
|
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-088-32/+17
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* staticize.phk2000-12-083-6/+7
|
* Protect accesses to member of struct proc with the proc lock.jhb2000-12-063-2/+12
|
* Protect p_stat with the sched_lock.jhb2000-12-021-1/+18
| | | | Reviewed by: jake
* Update to reflect the disappearance of getsock().jlemon2000-11-251-2/+6
| | | | Found by: LINT
* Use vop_defaultop() instead of ntfs_bypass().bp2000-11-181-2/+6
| | | | PR: kern/22756
* Missed conversion of CIRCLEQ => TAILQ for mount list.mckusick2000-11-141-1/+1
|
* More paranoia against overflowseivind2000-11-081-18/+45
|
* v_interlock is a mutex now, not simple lock.bp2000-11-041-1/+1
|
* Take VBLK devices further out of their missery.phk2000-11-021-9/+2
| | | | This should fix the panic I introduced in my previous commit on this topic.
* Fix overflow from jail hostname.eivind2000-11-011-1/+1
| | | | Bug found by: Esa Etelavuori <eetelavu@cc.hut.fi>
* Give vop_mmap an untimely death. The opportunity to give it a timelyeivind2000-11-015-21/+0
| | | | death timed out in 1996.
OpenPOWER on IntegriCloud