summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs
Commit message (Collapse)AuthorAgeFilesLines
...
* - 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
|
* Get closer to unbreaking ext2fsphk2004-11-061-0/+2
|
* Properly implement a default version of VOP_GETWRITEMOUNT.phk2004-11-061-1/+0
| | | | | Remove improper access to vop_stdgetwritemount() which should and will instead rely on the VOP default path.
* Move EXT2FS to GEOM backing instead of DEVFS.phk2004-10-294-50/+57
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Reduce the locking activity by epsilon by checking VNON condition beforephk2004-10-281-4/+3
| | | | releasing the mountlock.
* Eliminate unnecessary KASSERTs.phk2004-10-272-4/+1
| | | | Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.
* Loose the v_dirty* and v_clean* alias macros.phk2004-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().
* Move the buffer method vector (buf->b_op) to the bufobj.phk2004-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().
* Add b_bufobj to struct buf which eventually will eliminate the need for b_vp.phk2004-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.
* Desupport device nodes on EXT2 filesystems.phk2004-09-273-119/+12
|
* Give cluster_write() an explicit vnode argument.phk2004-09-271-1/+1
| | | | In the future a struct buf will not automatically point out a vnode for us.
* Create simple function init_va_filerev() for initializing a va_filerevphk2004-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.
* Add locking to the kqueue subsystem. This also makes the kqueue subsystemjmg2004-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)
* Put a version element in the VFS filesystem configuration structurephk2004-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.
* Remove global variable rootdevs and rootvp, they are unused as such.phk2004-07-281-1/+2
| | | | | | | | Add local rootvp variables as needed. Remove checks for miniroot's in the swappartition. We never did that and most of the filesystems could never be used for that, but it had still been copy&pasted all over the place.
* Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This iscperciva2004-07-261-5/+5
| | | | | | | | | | | somewhat clearer, but more importantly allows for a consistent naming scheme for suser_cred flags. The old name is still defined, but will be removed in a few days (unless I hear any complaints...) Discussed with: rwatson, scottl Requested by: jhb
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-2/+3
| | | | | | This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
* Update for the KDB framework:marcel2004-07-101-5/+3
| | | | o Make debugging code conditional upon KDB instead of DDB.
* When we traverse the vnodes on a mountpoint we need to look out forphk2004-07-041-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | our cached 'next vnode' being removed from this mountpoint. If we find that it was recycled, we restart our traversal from the start of the list. Code to do that is in all local disk filesystems (and a few other places) and looks roughly like this: MNT_ILOCK(mp); loop: for (vp = TAILQ_FIRST(&mp...); (vp = nvp) != NULL; nvp = TAILQ_NEXT(vp,...)) { if (vp->v_mount != mp) goto loop; MNT_IUNLOCK(mp); ... MNT_ILOCK(mp); } MNT_IUNLOCK(mp); The code which takes vnodes off a mountpoint looks like this: MNT_ILOCK(vp->v_mount); ... TAILQ_REMOVE(&vp->v_mount->mnt_nvnodelist, vp, v_nmntvnodes); ... MNT_IUNLOCK(vp->v_mount); ... vp->v_mount = something; (Take a moment and try to spot the locking error before you read on.) On a SMP system, one CPU could have removed nvp from our mountlist but not yet gotten to assign a new value to vp->v_mount while another CPU simultaneously get to the top of the traversal loop where it finds that (vp->v_mount != mp) is not true despite the fact that the vnode has indeed been removed from our mountpoint. Fix: Introduce the macro MNT_VNODE_FOREACH() to traverse the list of vnodes on a mountpoint while taking into account that vnodes may be removed from the list as we go. This saves approx 65 lines of duplicated code. Split the insmntque() which potentially moves a vnode from one mount point to another into delmntque() and insmntque() which does just what the names say. Fix delmntque() to set vp->v_mount to NULL while holding the mountpoint lock.
* Fixed misformatting of code and breaking of a comment in previous commit.bde2004-06-201-2/+2
|
* Fixed misformatting in previous commit.bde2004-06-201-1/+1
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-164-9/+9
| | | | Bump __FreeBSD_version accordingly.
* Remove advertising clause from University of California Regent'simp2004-04-0713-52/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Properly vector all bwrite() and BUF_WRITE() calls through the same pathphk2004-03-111-4/+4
| | | | and s/BUF_WRITE()/bwrite()/ since it now does the same as bwrite().
* Remove unused mnt_reservedvnlist field.phk2004-03-111-1/+0
|
* Remove unused second arg to vfinddev().phk2004-03-111-1/+3
| | | | Don't call addaliasu() on VBLK nodes.
* Enforce the file size limit in VOP_WRITE() as well as VOP_TRUNCATE();tjr2004-02-194-16/+11
| | | | pointed out by bde.
OpenPOWER on IntegriCloud