summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert KASSERTS to VNASSERTSphk2005-02-171-22/+27
|
* Make various vnode related functions staticphk2005-02-101-65/+9
|
* Don't pass NULL to vprint()phk2005-02-101-1/+1
|
* - Add a new assert in the getnewvnode(). Assert that the usecount is stilljeff2005-02-081-2/+4
| | | | | | | 0 to detect getnewvnode() races. - Add the vnode address to a few panics near by to help in debugging. Sponsored by: Isilon Systems, Inc.
* Access vmobject via the bufobj instead of the vnodephk2005-02-071-11/+11
|
* Don't call VOP_DESTROYVOBJECT(), trust that VOP_RECLAIM() did whatphk2005-02-071-2/+3
| | | | was necessary.
* Remove unused argument to vrecycle()phk2005-01-281-7/+1
|
* Integrate vclean() into vgonel().phk2005-01-281-68/+51
| | | | Various associated polishing.
* Remove register keywordphk2005-01-281-5/+5
|
* Don't use VOP_GETVOBJECT, use vp->v_object directly.phk2005-01-251-11/+12
|
* Eliminate the constant flags argument to vclean()phk2005-01-241-16/+8
|
* Change vprint() to vn_printf() which takes varargs.phk2005-01-241-12/+15
| | | | Add #define for vprint() to call vn_printf().
* Kill the VV_OBJBUF and test the v_object for NULL instead.phk2005-01-241-2/+0
|
* - Add the tunable and sysctl for the mpsafevfs. It currently defaultsjeff2005-01-241-37/+49
| | | | | | | | | | | | | | | to off. - Protect access to mnt_kern_flag with the mointpoint mutex. - Remove some KASSERTs which are not legal checks without the appropriate locks held. - Use VCANRECYCLE() rather than rolling several slightly different checks together. - Return from vtryrecycle() with a recycled vnode rather than a locked vnode. This simplifies some locking. - Remove several GIANT_REQUIRED lines. - Add a few KASSERTs to help with INACT debugging. Sponsored By: Isilon Systems, Inc.
* Fix a bug I introduced in 1.561 which has caused considerable filesystemphk2005-01-161-5/+5
| | | | | | | | | unhappiness lately. As far as I can tell, no files that have made it safely to disk have been endangered, but stuff in transit has been in peril. Pointy hat: phk
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-4/+3
|
* Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()phk2005-01-131-16/+0
| | | | directly.
* Add BO_SYNC() and add a default which uses the secret vnode pointerphk2005-01-111-1/+1
| | | | and VOP_FSYNC() for now.
* More vnode -> bufobj migration.phk2005-01-111-12/+13
|
* Give flushbuflist() a struct bufv as first argument and avoid home-rollingphk2005-01-111-36/+21
| | | | | | | | TAILQ_FOREACH_SAFE(). Loose the error pointer argument and return any errors the normal way. Return EAGAIN for the case where more work needs to be done.
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-111-3/+3
| | | | | | | | | | | | | | | | | | 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-061-1/+1
|
* Since we do not support forceful unmount of DEVFS we can do away withphk2005-01-041-45/+3
| | | | the partially implemented vnode-readoption code in vgonechrl().
* We can only ever get to vgonechrl() from a devfs vnode, so we do notphk2004-12-201-2/+0
| | | | | | | need to reassign the vp->v_op to devfs_specops, we know that is the value already. Make devfs_specops private to devfs.
* The remaining part of nmount/omount/rootfs mount changes. I cannot sensiblyphk2004-12-071-114/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | split the conversion of the remaining three filesystems out from the root mounting changes, so in one go: cd9660: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() nfs(client): Convert to nmount (the simple way, mount_nfs(8) is still necessary). Add omount compat shims. Drop COMPAT_PRELITE2 mount arg compatibility. ffs: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() Remove vfs_omount() method, all filesystems are now converted. Remove MNTK_WANTRDWR, handling RO/RW conversions is a filesystem task, and they all do it now. Change rootmounting to use DEVFS trampoline: vfs_mount.c: Mount devfs on /. Devfs needs no 'from' so this is clean. symlink /dev to /. This makes it possible to lookup /dev/foo. Mount "real" root filesystem on /. Surgically move the devfs mountpoint from under the real root filesystem onto /dev in the real root filesystem. Remove now unnecessary getdiskbyname(). kern_init.c: Don't do devfs mounting and rootvnode assignment here, it was already handled by vfs_mount.c. Remove now unused bdevvp(), addaliasu() and addalias(). Put the few necessary lines in devfs where they belong. This eliminates the second-last source of bogo vnodes, leaving only the lemming-syncer. Remove rootdev variable, it doesn't give meaning in a global context and was not trustworth anyway. Correct information is provided by statfs(/).
* Improve vprint() a little bit: break long lines, reduce indent and tellphk2004-12-031-4/+7
| | | | if the VI_LOCK() is held.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-011-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Move pbgetvp() and pbrelvp() to vm_pager.c with the rest of the pbuf stuff.phk2004-11-151-46/+0
|
* Move the bit of the syncer which deals with vnodes into a separatephk2004-11-141-36/+46
| | | | function.
* Eliminate vop_revoke() function now that devfs_revoke() does the entire job.phk2004-11-131-42/+0
|
* Slim vnodes by another four bytes by eliminating the (now) unused fieldphk2004-11-101-2/+0
| | | | v_cachedid.
* Remove vn_todev()phk2004-11-101-13/+0
|
* Remove vnode->v_cachedfs.phk2004-11-091-1/+0
| | | | | It was only used for the highly dangerous "export all vnodes with a sysctl" function.
* Remove buf->b_dev field.phk2004-11-041-2/+0
|
* Always initialize bo_private along with bo_ops in getnewvnode().phk2004-11-031-1/+1
| | | | Spotted by: tegge
* Loose vfs_mountedon()phk2004-10-291-13/+0
|
* Give the bufobj a private __bo_vnode for now to keep the syncer floating [1]phk2004-10-291-1/+2
| | | | | | | | At some point later the syncer will unlearn about vnodes and the filesystems method called by the syncer will know enough about what's in bo_private to do the right thing. [1] Ok, I know, but I couldn't resist the pun.
* Move the syncer linkage from vnode to bufobj.phk2004-10-271-34/+42
| | | | | This is not quite a perfect separation: the syncer still think it knows that everything is a vnode.
* Put the I/O block size in bufobj->bo_bsize.phk2004-10-261-1/+4
| | | | | | | We keep si_bsize_phys around for now as that is the simplest way to pull the number out of disk device drivers in devfs_open(). The correct solution would be to do an ioctl(DIOCGSECTORSIZE), but the point is probably mooth when filesystems sit on GEOM, so don't bother for now.
* Loose the v_dirty* and v_clean* alias macros.phk2004-10-251-6/+8
| | | | | Check the count field where we just want to know the full/empty state, rather than using TAILQ_EMPTY() or TAILQ_FIRST().
* Remove vnode->v_bsize. This was a dead-end.phk2004-10-251-4/+1
|
* Collapse vnode->v_object and buf->b_object into bufobj->bo_object.phk2004-10-251-4/+0
|
* Move the buffer method vector (buf->b_op) to the bufobj.phk2004-10-241-0/+1
| | | | | | | | | | | | | | | | | 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().
* When MAC is enabled, warn if getnewvnode() is asked to produce a vnoderwatson2004-10-221-0/+2
| | | | | | without a mountpoint. In this scenario, there's no useful source for a label on the vnode, since we can't query the mountpoint for the labeling strategy or default label.
* Alas, poor SPECFS! -- I knew him, Horatio; A filesystem of infinitephk2004-10-221-3/+3
| | | | | | | | | | | jest, of most excellent fancy: he hath taught me lessons a thousand times; and now, how abhorred in my imagination it is! my gorge rises at it. Here were those hacks that I have curs'd I know not how oft. Where be your kludges now? your workarounds? your layering violations, that were wont to set the table on a roar? Move the skeleton of specfs into devfs where it now belongs and bury the rest.
* Add b_bufobj to struct buf which eventually will eliminate the need for b_vp.phk2004-10-221-87/+64
| | | | | | | | | | | | | | | | | | 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.
* Move the VI_BWAIT flag into no bo_flag element of bufobj and call it BO_WWAITphk2004-10-211-55/+22
| | | | | | | | | | Add bufobj_wref(), bufobj_wdrop() and bufobj_wwait() to handle the write count on a bufobj. Bufobj_wdrop() replaces vwakeup(). Use these functions all relevant places except in ffs_softdep.c where the use if interlocked_sleep() makes this impossible. Rename b_vnbufs to b_bobufs now that we touch all the relevant files anyway.
* Add BO_* macros parallel to VI_* macros for manipulating the bo_mtx.phk2004-10-211-7/+11
| | | | | | | | | Initialize the bo_mtx when we allocate a vnode i getnewvnode() For now we point to the vnodes interlock mutex, that retains the exact same locking sematics. Move v_numoutput from vnode to bufobj. Add renaming macro to postpone code sweep.
* Polish vtruncbuf() to improve readability and style a bit.phk2004-10-211-49/+42
|
* Simplify buf_vlist_remove().phk2004-10-211-34/+16
| | | | | Now that we have encapsulated the splaytree related information into a structure we can eliminate the half of this function.
OpenPOWER on IntegriCloud