summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
Commit message (Collapse)AuthorAgeFilesLines
* Do not dereference dvp pointer before doing a NULL check.kan2005-05-111-1/+2
| | | | Noticed by: Coverity Prevent analysis tool.
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-7/+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-4/+3
| | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT.
* - nwfs_lookup() is no longer responsible for unlocking the dvp, this isjeff2005-03-281-26/+10
| | | | | | | 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-2/+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.
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-132-2/+1
| | | | | | | | the filesystem. Check that rather than VI_XLOCK. - VOP_INACTIVE should no longer drop the vnode lock. - The vnode lock is required around calls to vrecycle() and vgone(). Sponsored by: Isilon Systems, Inc.
* vp->v_id is a private field for the vfs namecache and it is a big mistakephk2005-02-221-11/+10
| | | | | | | that NFS ever started using it and an even bigger that it got copied&pasted to nwfs and smbfs. Replace with use of vhold()/vdrop().
* Statize malloc types.phk2005-02-101-3/+3
| | | | Don't call vprint with NULL.
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* whitespace nitphk2005-01-191-1/+1
|
* Eliminate constant and unused arguments to nwfs_vinvalbuf()phk2005-01-144-25/+14
|
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-2/+2
|
* Whitespace in vop_vector{} initializations.phk2005-01-131-3/+4
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-0610-10/+10
|
* Convert nwfs to nmount, but take the low road: There is no way this isphk2004-12-061-9/+29
| | | | | ever going to work without a dedicated mount_nwfs(8) program so simply stick struct nwfs_args into a nmount argument and leave it at that.
* Fix warningphk2004-12-061-1/+1
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-8/+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.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-013-37/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-21/+21
|
* Use system wide no-op vfs_start function.phk2004-11-251-16/+0
|
* Refuse attempts to mount root filesystemphk2004-11-091-0/+2
|
* Remove unused B_WRITEINPROG flagphk2004-09-151-2/+0
|
* Explicitly pass the vnode to the nw_doio() function.phk2004-09-073-7/+4
|
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-4/+4
| | | | | | | | | | | | | | | | | | 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.
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-4/+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.
* Make vm_page's PG_ZERO flag immutable between the time of the page'salc2004-05-061-2/+0
| | | | | | | | | | allocation and deallocation. This flag's principal use is shortly after allocation. For such cases, clearing the flag is pointless. The only unusual use of PG_ZERO is in vfs_bio_clrbuf(). However, allocbuf() never requests a prezeroed page. So, vfs_bio_clrbuf() never sees a prezeroed page. Reviewed by: tegge@
* Locking for the per-process resource limits structure.jhb2004-02-041-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists. Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
* Remove useless SMP check code.des2003-12-071-10/+0
|
* Don't mess around with spare fields of public structures.phk2003-11-121-1/+0
|
* Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY.phk2003-10-181-1/+0
| | | | | Remove various comments of KASSERTS and comments about B_PHYS which does not apply anymore.
* Convert some if(bla) panic("foo") to KASSERTS to improve grep-ability.phk2003-10-181-2/+1
|
* - Don't cache_purge() in *_reclaim routines. vclean() does it for us sojeff2003-10-051-1/+0
| | | | this is redundant.
* Synchronize access to a vm page's valid field using the containingalc2003-10-041-4/+2
| | | | vm object's lock.
* - Remove the backtrace() call from the *_vinvalbuf() functions. Thanks to ajeff2003-10-041-5/+1
| | | | | | | | stack trace supplied by phk, I now understand what's going on here. The check for VI_XLOCK stops us from calling vinvalbuf once the vnode has been partially torn down in vclean(). It is not clear that this would cause a problem. Document this in nfs_bio.c, which is where the other two filesystems copied this code from.
* - Remove interlock protection around VI_XLOCK. The interlock is notjeff2003-09-191-3/+3
| | | | | | | | | | | | | sufficient to guarantee that this race is not hit. The XLOCK will likely have to be redesigned due to the way reference counting and mutexes work in FreeBSD. We currently can not be guaranteed that xlock was not set and cleared while we were blocked on the interlock while waiting to check for XLOCK. This would lead us to reference a vnode which was not the vnode we requested. - Add a backtrace() call inside of INVARIANTS in the hopes of finding out if this condition is ever hit. It should not, since we should be retaining a reference to the vnode in these cases. The reference would be sufficient to block recycling.
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-2/+2
| | | | | | | | | 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.
* Lock the vm object when freeing a vm page.alc2003-06-191-1/+7
|
* Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementationsphk2003-06-151-0/+2
| | | | to check that the buffer points to the correct vnode.
* Initialize struct vfsops C99-sparsely.phk2003-06-121-23/+17
| | | | | Submitted by: hmp Reviewed by: phk
* Specify the M_WAITOK flag explicitly in the MALLOC call to silence atjr2003-04-011-1/+2
| | | | runtime warning ("Bad malloc flags: 0").
* Rename vfs_stdsync function to vfs_stdnosync which matches morekan2003-03-111-52/+1
| | | | | | | | | | | | | closely what function is really doing. Update all existing consumers to use the new name. Introduce a new vfs_stdsync function, which iterates over mount point's vnodes and call FSYNC on each one of them in turn. Make nwfs and smbfs use this new function instead of rolling their own identical sync implementations. Reviewed by: jeff
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-1/+1
| | | | | | Remove extraneous uses of vop_null, instead defering to the default op. Rename vnode type "vfs" to the more descriptive "syncer". Fix formatting for various filesystems that use vop_print.
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-3/+3
|
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-021-5/+5
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-021-1/+1
|
* Copy some VM changes from smbfs_putpages() to nwfs_putpages(): locktjr2003-02-271-1/+3
| | | | page queues, use vm_page_undirty().
* Fix vnode corruption bug when trying to rename files across filesystems.tjr2003-02-271-10/+13
| | | | Similar to the bug fixed in smbfs_vnops.c rev 1.33.
* Sync nwfs_access() with smbfs_access(): use vaccess() instead of checkingtjr2003-02-271-13/+5
| | | | permissions ourself, fixes problem with VAPPEND.
* Catch up with recent netncp changes: ncp_chkintr() takes a thread, nottjr2003-02-271-1/+1
| | | | a proc, as its second argument.
* Back out M_* changes, per decision of the TRB.imp2003-02-192-2/+2
| | | | Approved by: trb
OpenPOWER on IntegriCloud