summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add support for a last-close handler.des2001-11-273-3/+38
| | | | | Revert the module version bumps; they're quite pointless as long as the only pseudofs consumer is linprocfs, which is in the tree.
* Fix mounting root from a ISO9660 filesystem on a SCSI CDROM.ken2001-11-271-0/+10
| | | | | | | | | | | | | | | | | | | | | The problem was that the ISO9660 code wasn't opening the device prior to issuing ioctl calls. In particular, the device must be open before iso_get_ssector() is called in iso_mountroot(). If the device isn't opened first, the disk layer blows up due to an uninitialized variable. The solution was to open the device, call iso_get_ssector() and then close it again. The ATAPI CDROM driver doesn't have this problem because it doesn't use the disk layer, and evidently doesn't mind if someone issues an ioctl without first issuing an open call. Thanks to phk for pointing me at the source of this problem. Tested by: dirk MFC after: 1 week
* Replace 'p' with 'td' as appropriate.jhb2001-11-272-25/+25
|
* GC compat macros HASHINIT, VOP__LOCK, VOP__UNLOCK, VGET, and VN_LOCK.jhb2001-11-278-38/+25
|
* Expand LOCKMGR() compat macro.jhb2001-11-276-15/+17
|
* GC some KSE compatiblity macros that were somehow still here.jhb2001-11-262-33/+23
|
* GC non-FreeBSD code that didn't work anyways.jhb2001-11-269-821/+6
|
* Address two minor issues: implement the _PC_NAME_MAX and _PC_PATH_MAXdd2001-11-251-2/+29
| | | | | | | | | pathconf() variables for directories, and set st_size and st_blocks (of struct stat) for directories as appropriate. Note that st_size is always set to DEV_BSIZE, since the size of the directories is not currently kept. Reviewed by: phk, bde
* convert holdsock() to fget(). Add XXX reminder for future socket locking.dillon2001-11-241-3/+6
|
* Missing KSE s/curproc/curthread/peter2001-11-171-1/+1
|
* Switch behavior of fifos to more closely match what goes on in other OSes.alfred2001-11-081-0/+5
| | | | | | | | Basically FIFOs become a real pain to abuse as a rendevous point without this change because you can't really select(2) on them because they always return ready even though there is no writer (to signal EOF). Obtained from: BSD/os
* Fix printf format bugs introduced in rev 1.34 for printing times.peter2001-11-071-4/+4
| | | | | | | | | quad_t cannot be printed with %lld on 64 bit systems. Dont waste cpu to round user and system times up to long long, it is highly improbable that a process will have accumulated 68 years of user or system cpu time (not wall clock time) before a reboot or process restart.
* Correctly unlock the target process if /proc/$foo/mem is open()ed bygreen2001-11-061-1/+1
| | | | | | | another process which cannot p_candebug() it. The bug was introduced in rev. 1.100. Approved by: des
* Fix the fix. BIO_ERROR must be set in b_ioflags, not b_flagsdillon2001-11-041-1/+1
|
* Fix "echo > /dev/null" for non-root users which broke in previous commit.phk2001-11-041-5/+7
|
* Add mnt_reservedvnlist so we can MFC to 4.x, in order to make all mountdillon2001-11-041-0/+1
| | | | | | | | structure changes now rather then piecemeal later on. mnt_nvnodelist currently holds all the vnodes under the mount point. This will eventually be split into a 'dirty' and 'clean' list. This way we only break kld's once rather then twice. nvnodelist will eventually turn into the dirty list and should remain compatible with the klds.
* B_ERROR is BIO_ERROR on -current.phk2001-11-041-1/+1
| | | | Now it compiles, I don't know if it works.
* Fix a bug in CD9660 when vmiodirenable is turned on. CD9660 was assumingdillon2001-11-041-1/+23
| | | | | | | | | | | | | | that a buffer's b_blkno would be valid. This is true when vmiodirenable is turned off because the B_MALLOC'd buffer's data is invalidated when the buffer is destroyed. But when vmiodirenable is turned on a buffer can be reconstituted from its VMIO backing store. The reconstituted buffer will have no knowledge of the physical block translation and the result is serious directory corruption of the CDROM. The solution is to fix cd9660_blkatoff() to always BMAP the buffer if b_lblkno == b_blkno. MFC after: 0 days
* Use vfs_timestamp() instead of getnanotime().phk2001-11-031-3/+12
| | | | | | Add magic stuff copied from ufs_setattr(). Instructed by: bde
* Use vfs_timestamp() instead of getnanotime() directly.phk2001-11-031-3/+3
| | | | | | Fix some modes on directories and symlinks. Instructed by: bde
* Reduce the number of #include dependencies by declaring some of the structsdes2001-11-034-6/+19
| | | | used in pseudofs.h as opaque structs.
OpenPOWER on IntegriCloud