summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Cannot release vnode underlying the nullfs vnode in null_inactivemckusick2002-03-181-19/+26
| | | | | | | | | | as it leaves the nullfs vnode allocated, but with no identity. The effect is that a null mount can slowly accumulate all the vnodes in the system, reclaiming them only when it is unmounted. Thus the null_inactive state instead accelerates the release of the null vnode by calling vrecycle which will in turn call the null_reclaim operator. The null_reclaim routine then does the freeing actions previosuly (incorrectly) done in null_inactive.
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-1717-62/+110
| | | | | | | | | | | | locking flags when acquiring a vnode. The immediate purpose is to allow polling lock requests (LK_NOWAIT) needed by soft updates to avoid deadlock when enlisting other processes to help with the background cleanup. For the future it will allow the use of shared locks for read access to vnodes. This change touches a lot of files as it affects most filesystems within the system. It has been well tested on FFS, loopback, and CD-ROM filesystems. only lightly on the others, so if you find a problem there, please let me (mckusick@mckusick.com) know.
* Introduce the new 64-bit size disk block, daddr64_t. Changemckusick2002-03-154-11/+25
| | | | | | | | | | | | the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
* Be consistent with UFS in a way how devfs_setattr() checks credentialsmaxim2002-03-141-4/+5
| | | | | | | | for chmod(2), chown(2) and utimes(2) with respect to jail(2). Reviewed by: rwatson, ru Not objected by: phk Approved by: ru
* If in strategy we find that we have no devsw on the device anymore wephk2002-03-051-3/+6
| | | | | are probably talking about some disk-device which wente away, so return ENXIO instead of panicing.
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-2717-40/+39
| | | | reference.
* Fix LINT breakage by adding a missing include.tmm2002-02-231-0/+1
|
* Lock struct pgrp, session and sigio.tanimura2002-02-234-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | New locks are: - pgrpsess_lock which locks the whole pgrps and sessions, - pg_mtx which protects the pgrp members, and - s_mtx which protects the session members. Please refer to sys/proc.h for the coverage of these locks. Changes on the pgrp/session interface: - pgfind() needs the pgrpsess_lock held. - The caller of enterpgrp() is responsible to allocate a new pgrp and session. - Call enterthispgrp() in order to enter an existing pgrp. - pgsignal() requires a pgrp lock held. Reviewed by: jhb, alfred Tested on: cvsup.jp.FreeBSD.org (which is a quad-CPU machine running -current)
* Paranoia: if the process is setugid, set all sensitive files mode 0.des2002-02-181-1/+3
|
* Don't even think about using v_id for magic tricks, v_id is givingphk2002-02-171-5/+0
| | | | us enough trouble as it is for SMPng.
* FIxed the following style bugs:bde2002-02-162-10/+16
| | | | | | | | | | - clobbering of jsp's $Id$ by FreeBSD's old $Id$. - long lines in recent KSE changes (procfs_ctl.c). - other style bugs in KSE changes (most related to an shadowed variable in procfs_status.c -- the td in the outer scope is obfuscated by PFS_FILL_ARGS). Approved by: des
* FIxed the following style bugs:bde2002-02-163-11/+21
| | | | | | | - clobbering of jsp's $Id$ by FreeBSD's old $Id$. - lost Berkeley id in procfs_dbregs.c - long lines in recent KSE changes. - various gratuitous differences between procfs_*regs.c.
* Fixed missing PHOLD()/PRELE().bde2002-02-161-0/+2
| | | | | Obtained from: procfs_dbregs.c Approved by: des
* Various nit-picking, mostly of style(9) character.phk2002-02-101-43/+41
| | | | Obtained from: ~bde/sys.dif.gz
* Part I: Update extended attribute API and ABI:rwatson2002-02-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Pre-KSE/M3 commit.julian2002-02-076-14/+19
| | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
* Change EPERM to EOPNOTSUPP when failing pseudofs_setattr() arbitrarily.rwatson2002-02-041-4/+2
| | | | Quoth the alfred: The latter would be better.
* Return EPERM instead of 0 in the un-implemented pseudofs_setattr().rwatson2002-02-041-2/+1
| | | | Conceivably, it should even return EOPNOTSUPP.
* Fix select on fifos.alfred2002-01-141-11/+29
| | | | | | | | | | | | | Backout revision 1.56 and 1.57 of fifo_vnops.c. Introduce a new poll op "POLLINIGNEOF" that can be used to ignore EOF on a fifo, POLLIN/POLLRDNORM is converted to POLLINIGNEOF within the FIFO implementation to effect the correct behavior. This should allow one to view a fifo pretty much as a data source rather than worry about connections coming and going. Reviewed by: bde
* Commit a know fix for hpfs to use vop_defaultop plug instead of wrongsemenu2002-01-141-13/+1
| | | | | | hpfs_bypass() routine. MFC after: 1 day
* don't initialize the mutex in the temporary struct file, the soo_*alfred2002-01-141-6/+0
| | | | | | | | functions just grab f_data and don't muck with anything else so this should be ok. this fixes a panic with invariants where it thinks we've doubly initialized the filetmp mutex even though all we've done is neglect to bzero it.
* Replace ffind_* with fget calls.alfred2002-01-142-11/+4
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* remove unused socket pointeralfred2002-01-131-1/+0
|
* Include sys/_lock.h and sys/_mutex.h to reduce namespace pollution.alfred2002-01-134-0/+4
| | | | Requested by: jhb
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-137-14/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Add a new sysinit SI_SUB_DEVFS. Devfs hooks into the kernel at SI_ORDER_FIRST,msmith2002-01-091-1/+1
| | | | | | and devices can be created anytime after that. Print a warning if an atttempt is made to create a device too early.
* Use a sysinit to initialise the devfs hooks in kern_conf.c rather than commonmsmith2002-01-091-3/+10
| | | | | | variables. Reviewed by: phk (in principle)
* Staticise the coda vfsop pointer.msmith2002-01-082-2/+1
|
* Staticise pfs_vncache, it's not used anywhere else.msmith2002-01-081-1/+1
| | | | Reviewed by: des
* Do not derefer null.tanimura2002-01-041-0/+4
| | | | Reviewed by: des
* o Make the credential used by socreate() an explicit argument torwatson2001-12-312-3/+6
| | | | | | | | | | | | | | socreate(), rather than getting it implicitly from the thread argument. o Make NFS cache the credential provided at mount-time, and use the cached credential (nfsmount->nm_cred) when making calls to socreate() on initially connecting, or reconnecting the socket. This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well as bugs involving NFS and mandatory access control implementations. Reviewed by: freebsd-arch
* Fix a BUF_TIMELOCK race against BUF_LOCK and fix a deadlock in vget()dillon2001-12-206-6/+6
| | | | | | | | 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
* Previous commit was intented to silence a warning, not to change codepath.bp2001-12-201-2/+3
|
* Silence harmless "smbfs_closel: Negative opencount" messages atsheldonh2001-12-201-1/+1
| | | | | | | | unmount time. Thanks to iedowse for the background information. Submitted by: bp
* Pseudofs was leaking VFS cache entries badly due to its cache and use ofdillon2001-12-192-4/+22
| | | | | | the wrong VOP descriptor. This misuse caused VFS-cached vnodes to be re-cached, resulting in the leak. This commit is an interim fix until DES has a chance to rework the code involved.
* Add module dependency on libmchain.sheldonh2001-12-131-0/+2
| | | | | | With this change, mounting an smb share (using mount_smb, which is not yet included in the tree) without any of smbfs, libiconv or libmchain compiled into the kernel or loaded works.
* Fix select on named pipes without a reader.alfred2001-12-121-1/+0
| | | | | PR: kern/19871 MFC after: 1 month
* Add VOP_GETEXTATTR(9) passthrough support to pseudofs.green2001-12-112-0/+55
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Remove an obsolete prototype for procfs_kmemaccess().des2001-12-111-3/+0
| | | | Submitted by: rwatson
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-108-17/+17
| | | | also don't use ANSI string concatenation.
* Fix various bugs in the debugging code and reenable it.des2001-12-092-9/+9
|
* Fix an incorrect PFS_TRACE. Also, use __func__ instead of __FUNCTION__.des2001-12-091-3/+3
|
* Fix a KSEfication brain-o in procfs_doprocfile(): return the path of the ↵des2001-12-082-3/+5
| | | | | | | | | target process, not the calling process. While we're here, also unstaticize procfs_doprocfile() and procfs_docurproc() so linprocfs can call them directly instead of duplicating them. Submitted by: Dominic Mitchell <dom@semantico.com>
* Pseudofsize procfs(5).des2001-12-0416-2035/+477
|
* o Introduce pr_mtx into struct prison, providing protection for therwatson2001-12-031-4/+7
| | | | | | | | | | | | | | | | | | mutable contents of struct prison (hostname, securelevel, refcount, pr_linux, ...) o Generally introduce mtx_lock()/mtx_unlock() calls throughout kern/ so as to enforce these protections, in particular, in kern_mib.c protection sysctl access to the hostname and securelevel, as well as kern_prot.c access to the securelevel for access control purposes. o Rewrite linux emulator abstractions for accessing per-jail linux mib entries (osname, osrelease, osversion) so that they don't return a pointer to the text in the struct linux_prison, rather, a copy to an array passed into the calls. Likewise, update linprocfs to use these primitives. o Update in_pcb.c to always use prison_getip() rather than directly accessing struct prison. Reviewed by: jhb
* Catch up with KSE changes.bp2001-12-025-155/+158
| | | | Submitted by: Max Khon <fjoe@iclub.nsu.ru>
* Fix indentation after removing GEMDOS support. Whitespace changes only.jhb2001-11-281-14/+14
|
* Use suser_td() instead of explicitly checking cr_uid against 0.jhb2001-11-282-3/+3
| | | | | | PR: kern/21809 Submitted by: <mbendiks@eunet.no> Reviewed by: rwatson
* Axe more unused GEMDOS code that was #ifdef atari.jhb2001-11-284-44/+1
| | | | | PR: kern/21809 Submitted by: <mbendiks@eunet.no>
* Remove GEMDOS support from msdosfs. I don't think anyone is going tojhb2001-11-272-130/+0
| | | | port FreeBSD to Atari machines any time soon.
OpenPOWER on IntegriCloud