summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* The valid field in struct vm_page can be of type unsigned long whenmarcel2003-08-281-2/+2
| | | | | | 32K pages are selected. In spec_getpages() change the printf format specifier and add an explicit cast so that we always print the field as a long type.
* Use the requested page's object field instead of the vnode's. In somealc2003-08-221-2/+5
| | | | | | | cases, the vnode's object field is not initialized leading to a NULL pointer dereference when the object is locked. Tested by: rwatson
* Add pfs_visible() checks to pfs_getattr() and pfs_getextattr(). Thisdes2003-08-191-0/+6
| | | | | | | | also fixes pfs_access() since it relies on VOP_GETATTR() which will call pfs_getattr(). This prevents jailed processes from discovering the existence, start time and ownership of processes outside the jail. PR: kern/48156
* Spell the name of the lock right in addition to getting the type right.jhb2003-08-181-1/+1
| | | | Submitted by: Kim Culhan <kimc@w8hd.org>
* The allproc lock is a sx lock, not a mutex, so fix the assertion. Thisjhb2003-08-181-1/+1
| | | | | asserts that the sx lock is held, but does not specify if the lock is held shared or exclusive, thus either type of lock satisfies the assertion.
* Rework pfs_iterate() a bit to eliminate a bug related to processdes2003-08-181-9/+12
| | | | | | | | | | | | | | directories. Previously, pfs_iterate() would return -1 when it reached the end of the process list while processing a process directory node, even if the parent directory contained further nodes (which is the case for the linprocfs root directory, where the process directory node is actually first in the list). With this patch, pfs_iterate() will continue to traverse the parent directory's node list after exhausting the process list (as was the intention all along). The code should hopefully be easier to read as well. While I'm here, have pfs_iterate() assert that the allproc lock is held.
* Do not call VOP_BMAP() on our own vnodes.phk2003-08-171-10/+3
| | | | It is particularly silly when all it does is a minor piece of math.
* Add p_candebug() check to access a process map file in procfs; limitrwatson2003-08-141-0/+6
| | | | | | | access to map information for processes that you wouldn't otherwise have debug rights on. Tested by: bms
* Add a '-M mask' option so that users can have differenttrhodes2003-08-123-4/+10
| | | | | | | | | | | masks for files and directories. This should make some of the Midnight Commander users happy. Remove an extra ')' in the manual page. PR: 35699 Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> (original version) Tested by: simon
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-072-4/+4
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* Don't drop giant around ->d_strategy(), too much code explodes.phk2003-08-061-3/+3
|
* Only drop Giant around the drivers ->d_strategy() if the buffer is notphk2003-08-051-1/+1
| | | | marked to prevent this.
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-2612-21/+21
| | | | | | | | | 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.
* Revise and improve ntfs_subr.c 1.30: read only a single cluster at a timetjr2003-07-262-17/+28
| | | | | | | | | | in ntfs_writentvattr_plain and ntfs_readntvattr_plain, and purge the boot block from the buffer cache if isn't exactly one cluster long. These two changes work around the same buffer cache bug that ntfs_subr.c 1.30 tried to, but in a different way. This may decrease throughput by reading smaller amounts of data from the disk at a time, but may increase it by avoiding bogus writes of clean buffers. Problem (re)reported by Karel J. Bosschaart on -current.
* size_t != int. Make this compile on 64 bit platforms (eg: amd64).peter2003-07-241-1/+2
| | | | Also, "u_short value; if (value > 0xffff)" can never be true.
* If bread() returns a zero-length buffer, as can happen after atrhodes2003-07-031-0/+4
| | | | | | | failed write, return an error instead of looping forever. PR: 37035 Submitted by: das
* XXX Copy workaround from UFS: open device for write access even iftjr2003-06-291-0/+19
| | | | | | | | | | | | | | the user requests a read-only mount. This is necessary because we don't do the VOP_OPEN again if they upgrade a read-only mount to read-write. Fixes lockup when creating files on msdosfs mounts that have been mounted read-only then upgraded to read-write. The exact cause of the lockup is not known, but it is likely to be the kernel getting stuck in an infinite loop trying to write dirty buffers to a device without write permission. Reported/tested by andreas, discussed with phk.
* Fix a bug where a truncate operation involving truncate() or ftruncate() ontrhodes2003-06-271-17/+10
| | | | | | | | | an MSDOSFS file system either failed, silently corrupted the file, or sometimes corrupted the neighboring file. PR: 53695 Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my> (original version) MFC: 3 days
* change dev_t to struct cdev * to match ufs. This fixes fstat for cd9660jmg2003-06-242-2/+2
| | | | | | and msdosfs. Reviewed by: bde
* Add a f_vnode field to struct file.phk2003-06-222-1/+2
| | | | | | | | | | | | Several of the subtypes have an associated vnode which is used for stuff like the f*() functions. By giving the vnode a speparate field, a number of checks for the specific subtype can be replaced simply with a check for f_vnode != NULL, and we can later free f_data up to subtype specific use. At this point in time, f_data still points to the vnode, so any code I might have overlooked will still work.
* fix grammar in commentjmg2003-06-201-1/+1
|
* Merge from NetBSD src/sys/ntfs/ntfs_subr.c 1.5 & 1.30 (jdolecek):tjr2003-06-201-1/+15
| | | | | | | | | | | | - Avoid calling bread() with different sizes on the same blkno. Although the buffer cache is designed to handle differing size buffers, it erroneously tries to write the incorrectly-sized buffer buffer back to disk before reading the correctly-sized one, even when it's not dirty. This behaviour caused a panic for read-only NTFS mounts when INVARIANTS was enabled ("bundirty: buffer x still on queue y"), reported by NAKAJI Hiroyuki. - Fix a bug in the code handling holes: a variable was incremented instead of decremented, which could cause an infinite loop.
* Lock the vm object when freeing a vm page.alc2003-06-191-0/+2
|
* Lock the vm object when freeing a vm page.alc2003-06-191-1/+9
|
* Lock the vm object when freeing a vm page.alc2003-06-191-1/+7
|
* Send the close request to the SMB server in smbfs_inactive(), instead oftjr2003-06-174-66/+34
| | | | | | | | smbfs_close(). This fixes paging to and from mmap()'d regions of smbfs files after the descriptor has been closed, and makes thttpd, GNU ld, and perhaps more things work that depend on being able to do this. PR: 48291
* Set f_mntfromname[] to "fdescfs" instead of "fdesc" for consistencytjr2003-06-171-1/+1
| | | | | with other synthetic filesystems, which have f_mntfromname the same as f_fstypename. Noticed by Sean Kelly on -current.
* MFp4: Fix two bugs causing possible deadlocks or panics, and one nit:tjr2003-06-173-13/+95
| | | | | | | | | | | | | | | | | | - Emulate lock draining (LK_DRAIN) in null_lock() to avoid deadlocks when the vnode is being recycled. - Don't allow null_nodeget() to return a nullfs vnode from the wrong mount when multiple nullfs's are mounted. It's unclear why these checks were removed in null_subr.c 1.35, but they are definitely necessary. Without the checks, trying to unmount a nullfs mount will erroneously return EBUSY, and forcibly unmounting with -f will cause a panic. - Bump LOG2_SIZEVNODE up to 8, since vnodes are >256 bytes now. The old value (7) didn't cause any problems, but made the hash algorithm suboptimal. These changes fix nullfs enough that a parallel buildworld succeeds. Submitted by: tegge (partially; LK_DRAIN) Tested by: kris
* Partially back out rev 1.87 by nuking fifo_inactive() and moving thetruckman2003-06-161-20/+4
| | | | | | | | resource deallocation back to fifo_close(). This eliminates any stale data that might be stuck in the socket buffers after all the readers and writers have closed the fifo. Tested by: Thorsten Schroeder <ths@katjusha.de>
* In specfs::vop_specstratey(), assert that the vnode and buffer agree aboutphk2003-06-151-0/+4
| | | | the device.
* I have not had any reports of trouble for a long time, so remove thephk2003-06-151-26/+1
| | | | | gentle versions of the vop_strategy()/vop_specstrategy() mismatch methods and use vop_panic() instead.
* Take 2: Remove _both_ KASSERTS.phk2003-06-151-2/+0
|
* Duh! I misread my handwritte notes: We do _not_ want to asser thatphk2003-06-151-2/+0
| | | | vp == bp->b_vp in specfs, that was the entire point of VOP_SPECSTRATEGY().
* Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementationsphk2003-06-159-0/+20
| | | | to check that the buffer points to the correct vnode.
* Remove in toto coda_strategy which incorrectly implemented vop_panic();phk2003-06-151-23/+0
|
* Fix some style problems, some of which are old, some new, and somedas2003-06-151-8/+10
| | | | | | inherited from UFS. Requested by: bde, njl
* Rename P_THREADED to P_SA. P_SA means a process is using schedulerdavidxu2003-06-151-1/+1
| | | | activations.
* If someone tries to mount a union filesystem with another unionfs asdas2003-06-141-4/+14
| | | | | | the upper layer, fail gracefully instead of panicing. MFC after: 3 days
* Introduce malloc types M_UNDCACHE and M_UNPATH for importantdas2003-06-141-10/+13
| | | | | | | unionfs-related data structures to aid in debugging memory leaks. Use NULL and NULLVP instead of 0 as appropriate. MFC after: 3 days
* Factor out the process of freeing ``directory caches'', which unionfsdas2003-06-143-24/+25
| | | | | | | | directory vnodes use to refer to their constituent vnodes, into union_dircache_free(). Also s/union_dircache/union_dircache_get/ and tweak the structure of union_dircache_r(). MFC after: 3 days
* Don't follow smbnode n_parent pointer when NREFPARENT flag is not settjr2003-06-141-0/+2
| | | | | | in smb_fphelp(): the parent vnode may have already been recycled since we don't hold a reference to it. Fixes a panic when rebooting with mdconfig -t vnode devices referring to vnodes on a smbfs mount.
* Plug a serious memory leak. The -STABLE equivalent of this patch hasdas2003-06-131-8/+20
| | | | | | | | | | | been tested extensively, but -CURRENT testing has been hampered by a number of panics that also occur without the patch. Since the destabilizing changes between 4.X and 5.X are external to unionfs, I believe this patch applies equally well to both. Thanks to scrappy for assistance testing these and other changes. MFC after: 4 days
* Clean up the fifo_open() implementation:truckman2003-06-131-45/+30
| | | | | | | | | | | | | Restructure the error handling portion of the resource allocation code to eliminate duplicated code. Test for the O_NONBLOCK && fi_readers == 0 case before incrementing fi_writers and modifying the the socket flag to avoid having to undo these operations in this error case. Restructure and simplify the code that handles blocking opens. There should be no change to functionality.
* Initialize struct vfsops C99-sparsely.phk2003-06-1216-341/+212
| | | | | Submitted by: hmp Reviewed by: phk
* Use __FBSDID().obrien2003-06-117-8/+21
|
* Use __FBSDID().obrien2003-06-107-27/+23
|
* Don't unlock the parent directory vnode twice if the ISDOTDOT flagtruckman2003-06-011-1/+2
| | | | is set.
* Fix up locking problems in fifo_open() and fifo_close():truckman2003-06-011-25/+73
| | | | | | | | | | | | | | | | | | | | | Sleep on the vnode interlock while waiting for another caller to increment fi_readers or fi_writers. Hold the vnode interlock while incrementing fi_readers or fi_writers to prevent a wakeup from being missed. Only access fi_readers and fi_writers while holding the vnode lock. Previously fifo_close() decremented their values without holding a lock. Move resource deallocation from fifo_close() to fifo_inactive(), which allows the VOP_CLOSE() call in the error return path in fifo_open() to be removed. Fifo_open() was calling VOP_CLOSE() with the vnode lock held, in violation the current vnode locking API. Also the way fifo_close() used vrefcnt() to decide whether to deallocate resources was bogus according to comments in the vrefcnt() implementation. Reviewed by: bde
* Remove unused variable(s).phk2003-05-311-6/+0
| | | | Found by: FlexeLint
OpenPOWER on IntegriCloud