summaryrefslogtreecommitdiffstats
path: root/sys/kern/vnode_if.src
Commit message (Collapse)AuthorAgeFilesLines
* change vop_lock handling to allowing tracking of callers' file and line forkmacy2006-11-131-1/+3
| | | | | | acquisition of lockmgr locks Approved by: scottl (standing in for mentor rwatson)
* Remove two locking assertion entries that:dds2006-05-311-2/+0
| | | | | | | a) were incorrectly written and therefore never compiled into assertions, and b) were incorrectly specified and when compiled resulted in a failed assertion.
* Assertion code specifications are introduced using special characterdds2006-05-301-182/+182
| | | | | sequences that are distinct from comments. %% is used for argument locks; %! for pre- and post-conditions.
* Remove incorrect lock validation specifications that causeddds2006-05-301-7/+0
| | | | | | | | failed assertions with DEBUG_VFS_LOCKS. We should reinstate them with correct specifications, possibly after extendng vnode_if.awk Noted by: truckman@
* Add missing % signs in the lock annotations of the functions:dds2006-05-281-8/+8
| | | | | | lookup, rename, strategy, islocked The missing % sign meant that the lines were processed as plain comments and the corresponding assertions were never generated.
* Eradicate caddr_t from the VFS API.des2005-12-141-2/+2
|
* Allow EVFILT_VNODE events to work on every filesystem type, not justssouhlal2005-06-091-0/+11
| | | | | | | | | | | | | | | 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)
* - Mark the VOPs that require exclusive locks. Those that aren't markedjeff2005-04-111-26/+26
| | | | | | | | | with E may be called with a shared lock held. This list really could be made per filesystem if we had any filesystems which differed from ffs in locking guarantees. VFS itself is not sensitive to this except where vgone() etc. are concerned. Sponsored by: Isilon Systems, Inc.
* - CLOSE, REVOKE, INACTIVE, and RECLAIM are not L L L, that's a locked vnodejeff2005-03-131-4/+4
| | | | | | on enter, exit, error. This allows for the removal of the XLOCK. Sponsored by: Isilon Systems, Inc.
* VOP_DESTROYVOBJECT() is no more.phk2005-02-071-7/+0
|
* Take VOP_GETVOBJECT() out to pasture. We use the direct pointer now.phk2005-01-251-8/+0
|
* Kill VOP_CREATEVOBJECT(), it is now the responsibility of the filesystemphk2005-01-251-9/+0
| | | | for a given vnode to create a vnode_pager object if one is needed.
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-111-1/+0
| | | | | | | | | | | | | | | | | | 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
|
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-2/+1
| | | | | | | | | 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.)
* Remove VOP_SPECSTRATEGY() from the system.phk2004-10-291-9/+0
|
* Remove the buffercache/vnode side of BIO_DELETE processing inphk2004-09-131-14/+0
| | | | | | | preparation for integration of p4::phk_bufwork. In the future, local filesystems will talk to GEOM directly and they will consequently be able to issue BIO_DELETE directly. Since the removal of the fla driver, BIO_DELETE has effectively been a no-op anyway.
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Rename VOP_RMEXTATTR() to VOP_DELETEEXTATTR() for consistency with therwatson2003-07-281-2/+2
| | | | | | | | | | | | kernel ACL interfaces and system call names. Break out UFS2 and FFS extattr delete and list vnode operations from setextattr and getextattr to deleteextattr and listextattr, which cleans up the implementations, and makes the results more readable, and makes the APIs more clear. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Call the new argument "fdidx" that is more precise than "fd".phk2003-07-271-1/+1
|
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-0/+1
| | | | | | | | | 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.
* Expose vop_rmextattr as an explicit operation at the vnode operationrwatson2003-06-221-0/+11
| | | | | | | | interface, rather than relying on a NULL uio for the deletion operation. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Add comment about **vpp being special-cased in vnode_if.awk (1.38)se2003-06-201-0/+6
|
* Add vop_listextattr(), similar to vop_getextattr() but without arwatson2003-06-051-0/+12
| | | | | | | | | specific attribute name. It will have the same semantics as the older vop_getextattr() "retrieve the names" hack, returning a buffer with ASCII nul-seperated names. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Temporarily introduce a new VOP_SPECSTRATEGY operation while I tryphk2003-01-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to sort out disk-io from file-io in the vm/buffer/filesystem space. The intent is to sort VOP_STRATEGY calls into those which operate on "real" vnodes and those which operate on VCHR vnodes. For the latter kind, the call will be changed to VOP_SPECSTRATEGY, possibly conditionally for those places where dual-use happens. Add a default VOP_SPECSTRATEGY method which will call the normal VOP_STRATEGY. First time it is called it will print debugging information. This will only happen if a normal vnode is passed to VOP_SPECSTRATEGY by mistake. Add a real VOP_SPECSTRATEGY in specfs, which does what VOP_STRATEGY does on a VCHR vnode today. Add a new VOP_STRATEGY method in specfs to catch instances where the conversion to VOP_SPECSTRATEGY has not yet happened. Handle the request just like we always did, but first time called print debugging information. Apart up to two instances of console messages per boot, this amounts to a glorified no-op commit. If you get any of the messages on your console I would very much like a copy of them mailed to phk@freebsd.org
* Flush vop_refreshlabel() definition, since it is no longer used.rwatson2002-12-241-9/+0
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* - We don't need any automated lock checking for vop_islocked.jeff2002-09-261-1/+1
|
* VOP_FSYNC() requires that it's vnode argument be locked, which nfs_link()truckman2002-09-191-1/+1
| | | | | | | | | | wasn't doing. Rather than just lock and unlock the vnode around the call to VOP_FSYNC(), implement rwatson's suggestion to lock the file vnode in kern_link() before calling VOP_LINK(), since the other filesystems also locked the file vnode right away in their link methods. Remove the locking and and unlocking from the leaf filesystem link methods. Reviewed by: rwatson, bde (except for the unionfs_link() changes)
* Introduce the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.phk2002-09-051-0/+19
| | | | | | | | | | | | | | | | Together these two implement a simple transcation style grouping for modifications of extended attributes on a vnode. VOP_CLOSEEXTATTR() takes a boolean "commit" argument, which determines if the aggregate changes are attempted written or not. A commit will fail if any of the VOP_SETEXTATTR() calls since the VOP_OPENEXTATTR() have failed to meet their objective or if the flush to disk fails. The default operations for these two VOP's is to return EOPNOTSUPP. This API may still be subject to change. Sponsored by: DARPA & NAI Labs
* - Add two new debugging macros: ASSERT_VI_LOCKED and ASSERT_VI_UNLOCKEDjeff2002-08-211-2/+6
| | | | | | | | - Use the new VI asserts in place of the old mtx_assert checks. - Add the VI asserts to the automated lock checking in the VOP calls. The interlock should not be held across vops with a few exceptions. - Add the vop_(un)lock_{pre,post} functions to assert that interlock is held when LK_INTERLOCK is set.
* Begin committing support for Mandatory Access Control and extensiblerwatson2002-07-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | kernel access control. The MAC framework permits loadable kernel modules to link to the kernel at compile-time, boot-time, or run-time, and augment the system security policy. This commit includes the initial kernel implementation, although the interface with the userland components of the operating system is still under work, and not all kernel subsystems are supported. Later in this commit sequence, documentation of which kernel subsystems will not work correctly with a kernel compiled with MAC support will be added. Introduce two node vnode operations required to support MAC. First, VOP_REFRESHLABEL(), which will be invoked by callers requiring that vp->v_label be sufficiently "fresh" for access control purposes. Second, VOP_SETLABEL(), which be invoked by callers requiring that the passed label contents be updated. The file system is responsible for updating v_label if appropriate in coordination with the MAC framework, as well as committing to disk. File systems that are not MAC-aware need not implement these VOPs, as the MAC framework will default to maintaining a single label for all vnodes based on the label on the file system mount point. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* - Acknowledge recursive vnode locks in the vop_unlock specification. Thejeff2002-07-301-1/+1
| | | | vnode may not be unlocked even if the operation succeeded.
* - Use the new vop_lookup_{pre,post} instead of simpler locking specification.jeff2002-07-091-2/+4
|
* - Require locks for getattr. At some point this could only require sharedjeff2002-07-071-3/+1
| | | | locks.
* - Disable original vop_strategy lock specification.jeff2002-07-061-1/+2
| | | | | | | | - Switch to the new vop_strategy_pre for lock validation. VOP_STRATEGY requires only that the buf is locked UNLESS the block numbers need to be translated. There may be other reasons, but as long as the underlying layer uses a VOP to perform the operations they will be caught later.
* Use the new #! directive for vop_rename. Leave the old lock specificationjeff2002-07-061-4/+5
| | | | intact but disabled.
* Make daddr_t and u_daddr_t 64bits wide.phk2002-05-141-2/+2
| | | | | | Retire daddr64_t and use daddr_t instead. Sponsored by: DARPA & NAI Labs.
* Introduce the new 64-bit size disk block, daddr64_t. Changemckusick2002-03-151-2/+2
| | | | | | | | | | | | the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
* Per discussion at BSDCon, note that the vop_getattr locking protocolrwatson2002-02-181-1/+1
| | | | | | should require a shared lock, rather than an exclusive lock, which can improve performance. No actual code change here, since a number of VFS locking fixes are in the works.
* Add a comment indicating that the locking protocol should be updatedrwatson2002-02-101-0/+2
| | | | | to be 'L L L' for vop_getattr(). Don't update it yet, because there are still many offenders.
* Part I: Update extended attribute API and ABI:rwatson2002-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* KSE Milestone 2julian2001-09-121-20/+20
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* correct description of `vpp' for mknod/symlink: they are actuallyassar2001-07-241-2/+2
| | | | returned locked
* VOP_BALLOC was never really a VOP in the first place, so convert itphk2001-04-291-12/+0
| | | | to UFS_BALLOC like the other "between UFS and FFS function interfaces".
* This patch removes the VOP_BWRITE() vector.phk2001-04-171-8/+0
| | | | | | | | | | | | | VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. For now the buffers have grown a b_magic element which will make such issues a tiny bit easier to debug.
* o Rename "namespace" argument to "attrnamespace" as namespace is a C++rwatson2001-03-191-2/+2
| | | | | | | reserved word. Submitted by: jkh Obtained from: TrustedBSD Project
* o Change the API and ABI of the Extended Attribute kernel interfaces torwatson2001-03-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a new argument, "namespace", rather than relying on a first- character namespace indicator. This is in line with more recent thinking on EA interfaces on various mailing lists, including the posix1e, Linux acl-devel, and trustedbsd-discuss forums. Two namespaces are defined by default, EXTATTR_NAMESPACE_SYSTEM and EXTATTR_NAMESPACE_USER, where the primary distinction lies in the access control model: user EAs are accessible based on the normal MAC and DAC file/directory protections, and system attributes are limited to kernel-originated or appropriately privileged userland requests. o These API changes occur at several levels: the namespace argument is introduced in the extattr_{get,set}_file() system call interfaces, at the vnode operation level in the vop_{get,set}extattr() interfaces, and in the UFS extended attribute implementation. Changes are also introduced in the VFS extattrctl() interface (system call, VFS, and UFS implementation), where the arguments are modified to include a namespace field, as well as modified to advoid direct access to userspace variables from below the VFS layer (in the style of recent changes to mount by adrian@FreeBSD.org). This required some cleanup and bug fixing regarding VFS locks and the VFS interface, as a vnode pointer may now be optionally submitted to the VFS_EXTATTRCTL() call. Updated documentation for the VFS interface will be committed shortly. o In the near future, the auto-starting feature will be updated to search two sub-directories to the ".attribute" directory in appropriate file systems: "user" and "system" to locate attributes intended for those namespaces, as the single filename is no longer sufficient to indicate what namespace the attribute is intended for. Until this is committed, all attributes auto-started by UFS will be placed in the EXTATTR_NAMESPACE_SYSTEM namespace. o The default POSIX.1e attribute names for ACLs and Capabilities have been updated to no longer include the '$' in their filename. As such, if you're using these features, you'll need to rename the attribute backing files to the same names without '$' symbols in front. o Note that these changes will require changes in userland, which will be committed shortly. These include modifications to the extended attribute utilities, as well as to libutil for new namespace string conversion routines. Once the matching userland changes are committed, a buildworld is recommended to update all the necessary include files and verify that the kernel and userland environments are in sync. Note: If you do not use extended attributes (most people won't), upgrading is not imperative although since the system call API has changed, the new userland extended attribute code will no longer compile with old include files. o Couple of minor cleanups while I'm there: make more code compilation conditional on FFS_EXTATTR, which should recover a bit of space on kernels running without EA's, as well as update copyright dates. Obtained from: TrustedBSD Project
* Fixes to track snapshot copy-on-write checking in the specinfomckusick2001-03-071-8/+0
| | | | | | structure rather than assuming that the device vnode would reside in the FFS filesystem (which is obviously a broken assumption with the device filesystem).
* Extend kqueue down to the device layer.jlemon2001-02-151-0/+8
| | | | Backwards compatible approach suggested by: peter
* Give vop_mmap an untimely death. The opportunity to give it a timelyeivind2000-11-011-10/+0
| | | | death timed out in 1996.
OpenPOWER on IntegriCloud