aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/ext2fs
Commit message (Collapse)AuthorAgeFilesLines
* Move ext2fs from src/gnu to src/gnu/fs.Craig Rodrigues2005-06-1522-9058/+0
| | | | | | | | | | | Discussed on arch@. Reviewed by: kan Approved by: re (blanket), kan Discussed with: dumbbell Notes: svn path=/head/; revision=147401
* Allow EVFILT_VNODE events to work on every filesystem type, not justSuleiman Souhlal2005-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) Notes: svn path=/head/; revision=147198
* - Change all filesystems and vfs_cache to relock the dvp once the child isJeff Roberson2005-04-131-4/+3
| | | | | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=145006
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cJeff Roberson2005-03-291-8/+1
| | | | | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT. Notes: svn path=/head/; revision=144299
* - ext2fs_lookup() is no longer responsible for unlocking the dvp, this isJeff Roberson2005-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. Notes: svn path=/head/; revision=144211
* - Update vfs_root implementations to match the new prototype. None ofJeff Roberson2005-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. Notes: svn path=/head/; revision=144059
* Add two arguments to the vfs_hash() KPI so that filesystems which doPoul-Henning Kamp2005-03-161-2/+2
| | | | | | | not have unique hashes (NFS) can also use it. Notes: svn path=/head/; revision=143692
* Remove inode fields previously used for private inode hash tables.Poul-Henning Kamp2005-03-161-1/+0
| | | | Notes: svn path=/head/; revision=143686
* Don't hold a reference to the disk vnode for each inode.Poul-Henning Kamp2005-03-165-19/+7
| | | | | | | | Don't store the disk cdev in all inodes, it's only used for debugging printfs. Notes: svn path=/head/; revision=143677
* Improve the vfs_hash() API: vput() the unneeded vnode centrally toPoul-Henning Kamp2005-03-151-3/+1
| | | | | | | avoid replicating the vput in all the filesystems. Notes: svn path=/head/; revision=143663
* Simplify the vfs_hash calling convention.Poul-Henning Kamp2005-03-151-23/+3
| | | | Notes: svn path=/head/; revision=143619
* Forgot cvs rm in last file.Poul-Henning Kamp2005-03-141-169/+0
| | | | Notes: svn path=/head/; revision=143579
* Use vfs_hash() instead of home-rolledPoul-Henning Kamp2005-03-144-68/+32
| | | | Notes: svn path=/head/; revision=143578
* - Catch up with ufs_inode 1.59, ffs_vfsops.c 1.280, and ufs_vnops.c 1.267.Jeff Roberson2005-03-133-36/+8
| | | | | | | | | Various changes to support new vgone() locking protocol. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=143509
* Remove debug printout of major/minor numbers, print name instead.Poul-Henning Kamp2005-02-272-4/+4
| | | | Notes: svn path=/head/; revision=142692
* move ptr deref's to after null ptr checksSam Leffler2005-02-241-2/+4
| | | | | | | Noticed by: Coverity Prevent analysis tool Notes: svn path=/head/; revision=142353
* Make a SYSCTL_NODE staticPoul-Henning Kamp2005-02-101-1/+1
| | | | Notes: svn path=/head/; revision=141633
* Make filesystems get rid of their own vnodes vnode_pager object inPoul-Henning Kamp2005-01-281-0/+1
| | | | | | | VOP_RECLAIM(). Notes: svn path=/head/; revision=140939
* Remove unused argument to vrecycle()Poul-Henning Kamp2005-01-281-1/+1
| | | | Notes: svn path=/head/; revision=140936
* Introduce and use g_vfs_close().Poul-Henning Kamp2005-01-251-2/+2
| | | | Notes: svn path=/head/; revision=140822
* Create a vp->v_object in VFS_FHTOVP() if we want to be exportablePoul-Henning Kamp2005-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() Notes: svn path=/head/; revision=140768
* Remove unused cred argument to ext2_reload()Poul-Henning Kamp2005-01-241-6/+3
| | | | Notes: svn path=/head/; revision=140736
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()Poul-Henning Kamp2005-01-141-2/+2
| | | | Notes: svn path=/head/; revision=140220
* Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()Poul-Henning Kamp2005-01-111-1/+1
| | | | Notes: svn path=/head/; revision=140051
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().Poul-Henning Kamp2005-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 Notes: svn path=/head/; revision=140048
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-0621-34/+34
| | | | Notes: svn path=/head/; revision=139778
* Add dol FreeBSD dol and /*+ize licenseWarner Losh2005-01-061-1/+3
| | | | Notes: svn path=/head/; revision=139777
* Implement simpler panics for VOP_{read,write} on fifos.Poul-Henning Kamp2004-12-141-55/+2
| | | | Notes: svn path=/head/; revision=138868
* Revert previous commit. The null-pointer function call (a dereferenceMarcel Moolenaar2004-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 Notes: svn path=/head/; revision=138693
* Convert to nmount. Add omount compat code.Poul-Henning Kamp2004-12-061-10/+13
| | | | Notes: svn path=/head/; revision=138493
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesPoul-Henning Kamp2004-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. Notes: svn path=/head/; revision=138412
* Fix null-pointer indirect function calls introduced in the previousMarcel Moolenaar2004-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@ Notes: svn path=/head/; revision=138411
* Remove #if 0'ed rootfs mounting code.Poul-Henning Kamp2004-12-041-58/+0
| | | | Notes: svn path=/head/; revision=138368
* Back when VOP_* was introduced, we did not have new-style structPoul-Henning Kamp2004-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) Notes: svn path=/head/; revision=138290
* Mechanically change prototypes for vnode operations to use the new typedefs.Poul-Henning Kamp2004-12-011-26/+26
| | | | Notes: svn path=/head/; revision=138270
* Make VOP_BMAP return a struct bufobj for the underlying storage devicePoul-Henning Kamp2004-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.) Notes: svn path=/head/; revision=137726
* Get even closer to not crashing ext2fsPoul-Henning Kamp2004-11-062-2/+1
| | | | Notes: svn path=/head/; revision=137321
* Get closer to unbreaking ext2fsPoul-Henning Kamp2004-11-061-0/+2
| | | | Notes: svn path=/head/; revision=137320
* Properly implement a default version of VOP_GETWRITEMOUNT.Poul-Henning Kamp2004-11-061-1/+0
| | | | | | | | Remove improper access to vop_stdgetwritemount() which should and will instead rely on the VOP default path. Notes: svn path=/head/; revision=137308
* Move EXT2FS to GEOM backing instead of DEVFS.Poul-Henning Kamp2004-10-294-50/+57
| | | | | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250. Notes: svn path=/head/; revision=137039
* Reduce the locking activity by epsilon by checking VNON condition beforePoul-Henning Kamp2004-10-281-4/+3
| | | | | | | releasing the mountlock. Notes: svn path=/head/; revision=137008
* Eliminate unnecessary KASSERTs.Poul-Henning Kamp2004-10-272-4/+1
| | | | | | | Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument. Notes: svn path=/head/; revision=136991
* Loose the v_dirty* and v_clean* alias macros.Poul-Henning Kamp2004-10-252-3/+4
| | | | | | | | Check the count field where we just want to know the full/empty state, rather than using TAILQ_EMPTY() or TAILQ_FIRST(). Notes: svn path=/head/; revision=136943
* Move the buffer method vector (buf->b_op) to the bufobj.Poul-Henning Kamp2004-10-242-2/+2
| | | | | | | | | | | | | | | | | | | | Extend it with a strategy method. Add bufstrategy() which do the usual VOP_SPECSTRATEGY/VOP_STRATEGY song and dance. Rename ibwrite to bufwrite(). Move the two NFS buf_ops to more sensible places, add bufstrategy to them. Add inlines for bwrite() and bstrategy() which calls through buf->b_bufobj->b_ops->b_{write,strategy}(). Replace almost all VOP_STRATEGY()/VOP_SPECSTRATEGY() calls with bstrategy(). Notes: svn path=/head/; revision=136927
* Add b_bufobj to struct buf which eventually will eliminate the need for b_vp.Poul-Henning Kamp2004-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Initialize b_bufobj for all buffers. Make incore() and gbincore() take a bufobj instead of a vnode. Make inmem() local to vfs_bio.c Change a lot of VI_[UN]LOCK(bp->b_vp) to BO_[UN]LOCK(bp->b_bufobj) also VI_MTX() to BO_MTX(), Make buf_vlist_add() take a bufobj instead of a vnode. Eliminate other uses of bp->b_vp where bp->b_bufobj will do. Various minor polishing: remove "register", turn panic into KASSERT, use new function declarations, TAILQ_FOREACH_SAFE() etc. Notes: svn path=/head/; revision=136767
* Desupport device nodes on EXT2 filesystems.Poul-Henning Kamp2004-09-273-119/+12
| | | | Notes: svn path=/head/; revision=135864
* Give cluster_write() an explicit vnode argument.Poul-Henning Kamp2004-09-271-1/+1
| | | | | | | In the future a struct buf will not automatically point out a vnode for us. Notes: svn path=/head/; revision=135858
* Create simple function init_va_filerev() for initializing a va_filerevPoul-Henning Kamp2004-09-071-24/+1
| | | | | | | | | | | | field. Replace three instances of longhaired initialization va_filerev fields. Added XXX comment wondering why we don't use random bits instead of uptime of the system for this purpose. Notes: svn path=/head/; revision=134899
* Add locking to the kqueue subsystem. This also makes the kqueue subsystemJohn-Mark Gurney2004-08-151-8/+5
| | | | | | | | | | | | | | | | a more complete subsystem, and removes the knowlege of how things are implemented from the drivers. Include locking around filter ops, so a module like aio will know when not to be unloaded if there are outstanding knotes using it's filter ops. Currently, it uses the MTX_DUPOK even though it is not always safe to aquire duplicate locks. Witness currently doesn't support the ability to discover if a dup lock is ok (in some cases). Reviewed by: green, rwatson (both earlier versions) Notes: svn path=/head/; revision=133741
* Put a version element in the VFS filesystem configuration structurePoul-Henning Kamp2004-07-301-5/+5
| | | | | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code. Notes: svn path=/head/; revision=132902