summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs
Commit message (Collapse)AuthorAgeFilesLines
* Normalize a significant number of kernel malloc type names:rwatson2005-10-313-6/+6
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Fix this:cracauer2005-10-281-2/+6
| | | | | | | | | kern/87959 cracauer ext2fs: no cp(1) possible, mmap returns EINVAL ext2fs was missing vnode_create_vobject. (Reisefs probably has the same problem but I want to get this in quick for 6-release)
* Apply the same fix to a potential race in the ISDOTDOT codedumbbell2005-10-211-1/+3
| | | | | | | | | in reiserfs_lookup() that was used to fix an actual race in ufs_lookup.c:1.78. This is not currently a hazard, but the bug would be activated by marking reiserfs as MPSAFE. Reviewed by: mux (mentor) MFC after: 2 weeks
* Apply the same fix to a potential race in the ISDOTDOT code intruckman2005-10-161-1/+3
| | | | | | | | | ext2_lookup() that was used to fix an actual race in ufs_lookup.c:1.78. This is not currently a hazard, but the bug would be activated by marking ext2fs as MPSAFE. Requested by: bde MFC after: 2 weeks
* Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57,rwatson2005-09-281-2/+0
| | | | | | | | | | | | | | | | | | | | osf1_signal.c:1.41, amd64/amd64/trap.c:1.291, linux_socket.c:1.60, svr4_fcntl.c:1.36, svr4_ioctl.c:1.23, svr4_ipc.c:1.18, svr4_misc.c:1.81, svr4_signal.c:1.34, svr4_stat.c:1.21, svr4_stream.c:1.55, svr4_termios.c:1.13, svr4_ttold.c:1.15, svr4_util.h:1.10, ext2_alloc.c:1.43, i386/i386/trap.c:1.279, vm86.c:1.58, unaligned.c:1.12, imgact_elf.c:1.164, ffs_alloc.c:1.133: Now that Giant is acquired in uprintf() and tprintf(), the caller no longer leads to acquire Giant unless it also holds another mutex that would generate a lock order reversal when calling into these functions. Specifically not backed out is the acquisition of Giant in nfs_socket.c and rpcclnt.c, where local mutexes are held and would otherwise violate the lock order with Giant. This aligns this code more with the eventual locking of ttys. Suggested by: bde
* Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),rwatson2005-09-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | as they both interact with the tty code (!MPSAFE) and may sleep if the tty buffer is full (per comment). Modify all consumers of uprintf() and tprintf() to hold Giant around calls into these functions. In most cases, this means adding an acquisition of Giant immediately around the function. In some cases (nfs_timer()), it means acquiring Giant higher up in the callout. With these changes, UFS no longer panics on SMP when either blocks are exhausted or inodes are exhausted under load due to races in the tty code when running without Giant. NB: Some reduction in calls to uprintf() in the svr4 code is probably desirable. NB: In the case of nfs_timer(), calling uprintf() while holding a mutex, or even in a callout at all, is a bad idea, and will generate warnings and potential upset. This needs to be fixed, but was a problem before this change. NB: uprintf()/tprintf() sleeping is generally a bad ideas, as is having non-MPSAFE tty code. MFC after: 1 week
* In ext2_mountfs(), check that the superblock size, SBSIZE,rodrigc2005-09-101-0/+12
| | | | | | | | | is aligned with the sectorsize value returned by GEOM, before doing a bread() of the superblock. This eliminates a panic when trying the following on an empty CD-ROM drive: mount_ext2fs /dev/acd0 /mnt Reviewed by: phk
* Add a new struct buf flag bit, B_PERSISTENT, and use it to tagtruckman2005-09-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | struct bufs that are persistently held by ext2fs. Ignore any buffers with this flag in the code in boot() that counts "busy" and dirty buffers and attempts to sync the dirty buffers, which is done before attempting to unmount all the file systems during shutdown. This fixes the problem caused by any ext2fs file systems that are mounted at system shutdown time, which caused boot() to give up on a non-zero number of buffers and skip the call to vfs_unmountall(). This left all the mounted file systems in a dirty state and caused them to all require cleanup by fsck on reboot. Move the two separate copies of the "busy" buffer test in boot() to a separate function. Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro. Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with this and previous flag changes. PR: kern/56675, kern/85163 Tested by: "Matthias Andree" matthias.andree at gmx.de Reviewed by: bde MFC after: 3 days
* Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.ssouhlal2005-09-032-5/+6
| | | | Another pointyhat to: ssouhlal
* *_mountfs() (if the filesystem mounts from a device) needs devvp to bessouhlal2005-09-022-9/+5
| | | | | | | locked, so lock it. Glanced at by: phk MFC after: 3 days
* Repair this:cracauer2005-07-091-0/+1
| | | | | | | | | ext2fs fails to set the device in the stat(2) system call. Subsequently, that makes fts(3) fail, which goes as far as make ls(1) fail (which uses fts) on ext2fs. Approved by: re (Robert Watson <rwatson@FreeBSD.org>)
* Replace the use if ext2fs' bitops by bitstring.h macros. This fixesdumbbell2005-06-212-29/+16
| | | | | | | | portability issues. Also note that for amd64, a hack is used to work around gcc optimization (thanks to cognet@). Reviewed by: mux (mentor) Approved by: re (dougb)
* Moving reiserfs from sys/gnu to sys/gnu/fs. This was discussed on arch@.dumbbell2005-06-1813-0/+6347
| | | | | Reviewed by: mux (mentor) Approved by: re (scottl)
* Add standard GPL boilerplate to these files. They are the only onesimp2005-06-167-3/+104
| | | | | | | | contaminated with the GPL code. While this information was present in the COPYRIGHT.INFO file, it is FreeBSD's standard practice to, where possible, include explicit license information in files. Approved by: release engineer (scottl)
* Move ext2fs from src/gnu to src/gnu/fs.rodrigc2005-06-1511-63/+63
| | | | | | | Discussed on arch@. Reviewed by: kan Approved by: re (blanket), kan
* Allow EVFILT_VNODE events to work on every filesystem type, not justssouhlal2005-06-091-1/+0
| | | | | | | | | | | | | | | UFS by: - Making the pre and post hooks for the VOP functions work even when DEBUG_VFS_LOCKS is not defined. - Moving the KNOTE activations into the corresponding VOP hooks. - Creating a MNTK_NOKNOTE flag for the mnt_kern_flag field of struct mount that permits filesystems to disable the new behavior. - Creating a default VOP_KQFILTER function: vfs_kqfilter() My benchmarks have not revealed any performance degradation. Reviewed by: jeff, bde Approved by: rwatson, jmg (kqueue changes), grehan (mentor)
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-4/+3
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cjeff2005-03-291-8/+1
| | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT.
* - ext2fs_lookup() is no longer responsible for unlocking the dvp, this isjeff2005-03-281-16/+1
| | | | | | | handled in vfs_lookup.c. This code was missing PDIRUNLOCK use prior to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c. Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-241-1/+2
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* Add two arguments to the vfs_hash() KPI so that filesystems which dophk2005-03-161-2/+2
| | | | not have unique hashes (NFS) can also use it.
* Remove inode fields previously used for private inode hash tables.phk2005-03-161-1/+0
|
* Don't hold a reference to the disk vnode for each inode.phk2005-03-165-19/+7
| | | | | Don't store the disk cdev in all inodes, it's only used for debugging printfs.
* Improve the vfs_hash() API: vput() the unneeded vnode centrally tophk2005-03-151-3/+1
| | | | avoid replicating the vput in all the filesystems.
* Simplify the vfs_hash calling convention.phk2005-03-151-23/+3
|
* Use vfs_hash() instead of home-rolledphk2005-03-143-64/+28
|
* - Catch up with ufs_inode 1.59, ffs_vfsops.c 1.280, and ufs_vnops.c 1.267.jeff2005-03-133-36/+8
| | | | | | Various changes to support new vgone() locking protocol. Sponsored by: Isilon Systems, Inc.
* Remove debug printout of major/minor numbers, print name instead.phk2005-02-272-4/+4
|
* move ptr deref's to after null ptr checkssam2005-02-241-2/+4
| | | | Noticed by: Coverity Prevent analysis tool
* Make a SYSCTL_NODE staticphk2005-02-101-1/+1
|
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Remove unused argument to vrecycle()phk2005-01-281-1/+1
|
* Introduce and use g_vfs_close().phk2005-01-251-2/+2
|
* Create a vp->v_object in VFS_FHTOVP() if we want to be exportablephk2005-01-241-0/+1
| | | | | | | | | | | | | with NFS. We are moving responsibility for creating the vnode_pager object into the filesystems which own the vnode, and this is one of the places we have to cover. We call vnode_create_vobject() directly because we own the vnode. If we can get the size easily, pass it as an argument to save the call to VOP_GETATTR() in vnode_create_vobject()
* Remove unused cred argument to ext2_reload()phk2005-01-241-6/+3
|
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-2/+2
|
* Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()phk2005-01-111-1/+1
|
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-111-5/+4
| | | | | | | | | | | | | | | | | | I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-0620-33/+33
|
* Add dol FreeBSD dol and /*+ize licenseimp2005-01-061-1/+3
|
* Implement simpler panics for VOP_{read,write} on fifos.phk2004-12-141-55/+2
|
* Revert previous commit. The null-pointer function call (a dereferencemarcel2004-12-111-4/+4
| | | | | | | | | on ia64) was not the result of a change in the vector operations. It was caused by the NFS locking code using a FIFO and those bypassing the vnode. This indirectly caused the panic. The NFS locking code has been changed. Requested by: phk
* Convert to nmount. Add omount compat code.phk2004-12-061-10/+13
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-7/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Fix null-pointer indirect function calls introduced in the previousmarcel2004-12-051-4/+4
| | | | | | | | | | | | commit. In the new world order, the transitive closure on the vector operations is not precomputed. As such, it's unsafe to actually use any of the function pointers in an indirect function call. They can be null, and we need to use the default vector in that case. This is mostly a quick fix for the four function pointers that are ed explicitly. A more generic or scalable solution is likely to see the light of day. No pathos on: current@
* Remove #if 0'ed rootfs mounting code.phk2004-12-041-58/+0
|
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-013-67/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-011-26/+26
|
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-3/+3
| | | | | | | | | instead of a vnode for it. The vnode_pager does not and should not have any interest in what the filesystem uses for backend. (vfs_cluster doesn't use the backing store argument.)
* Get even closer to not crashing ext2fsphk2004-11-062-2/+1
|
OpenPOWER on IntegriCloud