summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* nmount'ify unionfs further by using separate options insteadmux2002-06-152-6/+16
| | | | | | | of passing a flags mount options. This removes the include of sys/fs/unionfs/union.h in mount_unionfs as it should be. Reviewed by: phk
* Convert UDF to nmount.mux2002-06-152-50/+28
| | | | Reviewed by: scottl
* Fix a race during null node creation between relookuping the hash andsemenu2002-06-134-105/+102
| | | | | | | | | | | | | adding vnode to hash. The fix is to use atomic hash-lookup-and-add-if- not-found operation. The odd thing is that this race can't happen actually because the lowervp vnode is locked exclusively now during the whole process of null node creation. This must be thought as a step toward shared lookups. Also remove vp->v_mount checks when looking for a match in the hash, as this is the vestige. Also add comments and cosmetic changes.
* Change null_hashlock into null_hashmtx, because there is no need forsemenu2002-06-131-22/+15
| | | | | | | lockmgr and this helps to vget() vnode from hash without a race. Reviewed by: bp MFC after: 2 weeks
* Fix the "error" path (when dropping not fully initialized vnode).semenu2002-06-133-19/+26
| | | | | | | | Also move hash operations out of null_vnops.c and explicitly initialize v_lock in null_node_alloc (to set wmesg). Reviewed by: bp MFC after: 2 weeks
* Fix wrong locking in null_inactive and null_reclaim. This makes nullfssemenu2002-06-131-10/+7
| | | | | | relatively working back. Reviewed by: mckusick, bp
* Gratuitous whitespace cleanup.des2002-06-065-88/+88
|
* Make devfs to give honour to PDIRUNLOCK flag.semenu2002-06-011-9/+13
| | | | | Reviewed by: jeff MFC after: 1 week
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-312-51/+16
| | | | Requested by: hsu
* Convert unionfs to nmount.mux2002-05-242-25/+22
|
* Fix comments.mux2002-05-241-1/+1
|
* Convert nullfs to nmount.mux2002-05-232-17/+12
|
* Quick fix for non-unique inode numbers for hard links. We use thebde2002-05-221-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | byte offset of the directory entry for the inode number for all types of files except directories, although this breaks hard links for non-directories even if it doesn't cause overflow. Just ignore this broken inode number for stat() and readdir() and return a less broken one (the block offset of the file), so that applications normally can't see the brokenness. This leaves at least the following brokenness: - extra inodes, vnodes and caching for hard links. - various overflow bugs. cd9660 supports 64-bit block numbers, but we silently ignore the top 32 bits in isonum_733() and then drop another 10 bits for our broken inode numbers. We may also have sign extension bugs from storing 32-bit extents in ints and longs even if ints are 32-bits. These bugs affect DVDs. mkisofs apparently limits them by writing directory entries first. Inode numbers were broken mainly in 4.4BSD-Lite2. FreeBSD-1.1.5 seems to have a correct implementation modulo the overflow bugs. We need to look up directory entries from inodes for symlinks only. FreeBSD-1.1.5 use separate fields (iso_parent_extent, iso_parent) to point to the directory entry. 4.4BSD-Lite doesn't have these, and abuses i_ino to point to the directory entry. Correct pointers are impossible for hard links, but symlinks can't be hard links.
* Fix null_lock() not unlocking vp->v_interlock if LK_THISLAYER.semenu2002-05-211-2/+6
| | | | | Reviewed by: bp@FreeBSD.org MFC after: 1 week
* Lock the writer socket across sorwakeup(fip->fi_writesock).tanimura2002-05-211-1/+3
| | | | Spotted by: peter
* Lock down a socket, milestone 1.tanimura2002-05-202-16/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred
* Change p_can{debug,see,sched,signal}()'s first argument to be a threadjhb2002-05-198-9/+11
| | | | | | | pointer instead of a proc pointer and require the process pointed to by the second argument to be locked. We now use the thread ucred reference for the credential checks in p_can*() as a result. p_canfoo() should now no longer need Giant.
* Remove a check of blocknumbers/offsets which will be pointless withphk2002-05-181-12/+0
| | | | | | 64 bit daddr_t. Sponsored by: DARPA & NAI Labs.
* More s/file system/filesystem/gtrhodes2002-05-1628-61/+63
|
* In VOP_LOOKUP, don't assume that the final pathname componentmux2002-05-161-2/+1
| | | | | | | will be in the same filesystem than the one where the current component is. Approved by: scottl
* Make daddr_t and u_daddr_t 64bits wide.phk2002-05-143-8/+8
| | | | | | Retire daddr64_t and use daddr_t instead. Sponsored by: DARPA & NAI Labs.
* Fix several bugs in devfs_lookupx(). When we check the nameiop tomux2002-05-101-3/+3
| | | | | | | | | make sure it's a correct operation for devfs, do it only in the ISLASTCN case. If we don't, we are assuming that the final file will be in devfs, which is not true if another partition is mounted on top of devfs or with special filenames (like /dev/net/../../foo). Reviewed by: phk
* Include systm.h for panic(9) so that DEBUG_ALL_VFS_LOCKS compiles.jeff2002-05-042-0/+2
|
* HPFS picks up the vop_stdgetpages and vop_stdputpages member functionsphk2002-05-031-2/+0
| | | | via the default entry and the default vop vector.
* s/pfs_badop/vop_eopnotsupp/des2002-05-031-17/+9
| | | | Submitted by: phk
* Convert devfs to nmount.mux2002-05-021-6/+5
| | | | Reviewed by: phk
* Convert the pseudofs framework to nmount (thus procfs and linprocfs).mux2002-05-022-8/+8
| | | | Reviewed by: des (some time ago), phk
* Convert fdescfs to nmount.mux2002-05-021-6/+5
| | | | Reviewed by: phk
* Don't reference vop_std* since they are already implicitlyscottl2002-05-021-3/+0
| | | | | | referenced through the VOP_DEFAULT vector Submitted by: phk
* Use vop_panic() instead of rolling our own.phk2002-05-022-43/+19
|
* In udf_bmap(), return the physical block number, not the logicalscottl2002-05-021-1/+5
| | | | block number. This fixes things like cp (ouch!) which use mmap.
* Fix udf_read(). Honor the uio_resid when determining the size ofscottl2002-04-301-16/+22
| | | | | | | | | | | the block to read and copy out. This removes the hack in udf_readatoffset() for only reading one block at a time. WooHoo! Remove a redundant test for fragmented fids in both udf_readdir() and udf_lookup(). Add comment to both as to why the test is written the way it is. Add a few more safety checks for brelse(). Thanks to Timothy Shimmin <tes@boing.melbourne.sgi.com> for pointing out these problems.
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.tanimura2002-04-301-8/+10
| | | | | | | | | | Requested by: bde Since locking sigio_lock is usually followed by calling pgsigio(), move the declaration of sigio_lock and the definitions of SIGIO_*() to sys/signalvar.h. While I am here, sort include files alphabetically, where possible.
* Use vnode locking with devfs; permit VFS locking assertions to makerwatson2002-04-291-0/+6
| | | | | | | | sense for devfs vnodes, and reduce/remove potential races in the devfs code. Submitted by: iadowse Approved by: phk
* UIO_NOCOPY is not supported for now, so refuse read opeartion if this flagbp2002-04-261-0/+6
| | | | is set. The full emulation of bio are on its way...
* Track nfs's getpages() changes:bp2002-04-231-12/+46
| | | | | | Properly count v_vnodepgsin. Do not reread page if is already valid. Properly handle partially filled pages.
* Get rid from extra #ifdefs.bp2002-04-232-79/+4
|
* Don't attempt to decvlare M_DEVFS whern MALLOC_DECLARE is not defined.bde2002-04-211-3/+6
| | | | | | | | This fixes warnings that should be errors in fstat. Reminded by: alpha tinderbox Fixed some style bugs (ones near BOF and EOF; there are many more).
* Include <sys/systm.h> for (at least) the definition of atomic functionsbde2002-04-211-0/+1
| | | | | which are sometimes used by the macros in <sys/mutex.h>; don't depend on not-quite-necessary namespace pollution in <sys/mutex.h>.
* Don't put a line break in string literals. GCC 3.1 complains and GCCmarcel2002-04-201-13/+10
| | | | 3.2 drops the ball.
* Spelling fix for comment.rwatson2002-04-201-1/+1
|
* Cleanup of logic, flow and comments.alfred2002-04-181-20/+18
| | | | Submitted by: bde
* Lock proctree_lock instead of pgrpsess_lock.jhb2002-04-162-4/+4
|
* Sync with UDF p4 tree: Use POSIX integer types instead of BSD types.asmodai2002-04-154-159/+159
|
* Actually add the UDF files!scottl2002-04-147-0/+2986
|
* Remove stale XXX comment.jhb2002-04-141-1/+0
|
* - Change procfs_control()'s first argument to be a thread pointer insteadjhb2002-04-131-47/+32
| | | | | | | | | | | of a process pointer. - Move the p_candebug() at the start of procfs_control() a bit to make locking feasible. We still perform the access check before doing anything, we just now perform it after acquiring locks. - Don't lock the sched_lock for TRACE_WAIT_P() and when checking to see if p_stat is SSTOP. We lock the process while setting p_stat to SSTOP so locking the process is sufficient to do a read to see if p_stat is SSTOP or not.
* Lock the target process for p_candebug().jhb2002-04-131-3/+4
|
* Lock the target process in procfs_doproc*regs() for p_candebug and whilejhb2002-04-133-9/+23
| | | | reading/writing the registers.
* - p_cansee() needs the target process locked.jhb2002-04-131-18/+17
| | | | - We need the proc lock held for more of procfs_doprocstatus().
OpenPOWER on IntegriCloud