| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
drive looping and potentially yielding.
Requested by: kib
Notes:
svn path=/head/; revision=220846
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vop_stdallocate() is filesystem agnostic and will run as slow as a
read/write loop in userspace; however, it serves to correctly
implement the functionality for filesystems that do not implement a
VOP_ALLOCATE.
Note that __FreeBSD_version was already bumped today to 900036 for any
ports which would like to use this function.
Also reserve space in the syscall table for posix_fadvise(2).
Reviewed by: -arch (previous version)
Notes:
svn path=/head/; revision=220791
|
|
|
|
|
|
|
|
|
|
| |
locks (in the case where the VFS impl isn't using lf_*)
Submitted by: Matthew Fleming <matthew.fleming@isilon.com>
Reviewed by: zml, dfr
Notes:
svn path=/head/; revision=208003
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vn_open_cred in default implementation. Valid struct ucred is needed for
audit and MAC, and curthread credentials may be wrong.
This further requires modifying the interface of vn_fullpath(9), but it
is out of scope of this change.
Reviewed by: rwatson
Notes:
svn path=/head/; revision=194601
|
|
|
|
|
|
|
|
|
| |
shared vnode locking on ZFS.
Reviewed by: jhb
Notes:
svn path=/head/; revision=194019
|
|
|
|
|
|
|
|
|
|
| |
Also, in vop_write, no longer assert for exclusive locks on the
vnode.
Reviewed by: jhb, kmacy, jeffr
Notes:
svn path=/head/; revision=193762
|
|
|
|
|
|
|
|
|
|
|
| |
permissions, such as VWRITE_ACL. For a filsystems that don't
implement it, there is a default implementation, which works
as a wrapper around VOP_ACCESS.
Reviewed by: rwatson@
Notes:
svn path=/head/; revision=193092
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the removal of NQNFS, but was left in in case it was required for NFSv4.
Since our new NFSv4 client and server can't use it for their
requirements, GC the old mechanism, as well as other unused lease-
related code and interfaces.
Due to its impact on kernel programming and binary interfaces, this
change should not be MFC'd.
Proposed by: jeff
Reviewed by: jeff
Discussed with: rmacklem, zach loafman @ isilon
Notes:
svn path=/head/; revision=190888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filesystem supports additional operations using shared vnode locks.
Currently this is used to enable shared locks for open() and close() of
read-only file descriptors.
- When an ISOPEN namei() request is performed with LOCKSHARED, use a
shared vnode lock for the leaf vnode only if the mount point has the
extended shared flag set.
- Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but
not O_CREAT.
- Use a shared vnode lock around VOP_CLOSE() if the file was opened with
O_RDONLY and the mountpoint has the extended shared flag set.
- Adjust md(4) to upgrade the vnode lock on the vnode it gets back from
vn_open() since it now may only have a shared vnode lock.
- Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since
FIFO's require exclusive vnode locks for their open() and close()
routines. (My recent MPSAFE patches for UDF and cd9660 already included
this change.)
- Enable extended shared operations on UFS, cd9660, and UDF.
Submitted by: ups
Reviewed by: pjd (ZFS bits)
MFC after: 1 month
Notes:
svn path=/head/; revision=189696
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VOP_MARKATIME() since unlike the rest of VOP_SETATTR(), VA_MARKATIME
can be performed while holding a shared vnode lock (the same functionality
is done internally by VOP_READ which can run with a shared vnode lock).
Add missing locking of the vnode interlock to the ufs implementation and
remove a special note and test from the NFS client about not supporting the
feature.
Inspired by: ups
Tested by: pho
Notes:
svn path=/head/; revision=187526
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on a best-effort basis. Teach vn_fullpath to use this new VOP if a
regular VFS cache lookup fails. This VOP is designed to supplement the
VFS cache to provide a better chance that a vnode-to-name lookup will
succeed.
Currently, an implementation for devfs is being committed. The default
implementation is to return ENOENT.
A big thanks to kib for the mentorship on this, and to pho for running it
through his stress test suite.
Reviewed by: arch
Approved by: kib
Notes:
svn path=/head/; revision=185956
|
|
|
|
|
|
|
|
|
|
| |
to add more V* constants, and the variables changed by this patch were often
being assigned to mode_t variables, which is 16 bit.
Approved by: rwatson (mentor)
Notes:
svn path=/head/; revision=184413
|
|
|
|
|
|
|
| |
- Use the right label for vop_vptofh lock assertions so they are enforced.
Notes:
svn path=/head/; revision=184377
|
|
|
|
|
|
|
|
|
| |
was always curthread and totally unuseful.
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Notes:
svn path=/head/; revision=182371
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
user-mode lock manager, build a kernel with the NFSLOCKD option and
add '-k' to 'rpc_lockd_flags' in rc.conf.
Highlights include:
* Thread-safe kernel RPC client - many threads can use the same RPC
client handle safely with replies being de-multiplexed at the socket
upcall (typically driven directly by the NIC interrupt) and handed
off to whichever thread matches the reply. For UDP sockets, many RPC
clients can share the same socket. This allows the use of a single
privileged UDP port number to talk to an arbitrary number of remote
hosts.
* Single-threaded kernel RPC server. Adding support for multi-threaded
server would be relatively straightforward and would follow
approximately the Solaris KPI. A single thread should be sufficient
for the NLM since it should rarely block in normal operation.
* Kernel mode NLM server supporting cancel requests and granted
callbacks. I've tested the NLM server reasonably extensively - it
passes both my own tests and the NFS Connectathon locking tests
running on Solaris, Mac OS X and Ubuntu Linux.
* Userland NLM client supported. While the NLM server doesn't have
support for the local NFS client's locking needs, it does have to
field async replies and granted callbacks from remote NLMs that the
local client has contacted. We relay these replies to the userland
rpc.lockd over a local domain RPC socket.
* Robust deadlock detection for the local lock manager. In particular
it will detect deadlocks caused by a lock request that covers more
than one blocking request. As required by the NLM protocol, all
deadlock detection happens synchronously - a user is guaranteed that
if a lock request isn't rejected immediately, the lock will
eventually be granted. The old system allowed for a 'deferred
deadlock' condition where a blocked lock request could wake up and
find that some other deadlock-causing lock owner had beaten them to
the lock.
* Since both local and remote locks are managed by the same kernel
locking code, local and remote processes can safely use file locks
for mutual exclusion. Local processes have no fairness advantage
compared to remote processes when contending to lock a region that
has just been unlocked - the local lock manager enforces a strict
first-come first-served model for both local and remote lockers.
Sponsored by: Isilon Systems
PR: 95247 107555 115524 116679
MFC after: 2 weeks
Notes:
svn path=/head/; revision=177633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the vnode interlock is not held. vn_printf() already correctly handles
locked and unlocked vnode interlocks, and all the in-tree vop_print
methods are interlock-agnostic.
Some code calls vprintf() with the vnode interlock held, that causes
unjustified panics with INVARIANTS (ffs_syncvnode() as example).
Reported by: Peter Holm
Notes:
svn path=/head/; revision=176590
|
|
|
|
|
|
|
|
|
|
|
|
| |
always curthread.
As KPI gets broken by this patch, manpages and __FreeBSD_version will be
updated by further commits.
Tested by: Andrea Barberio <insomniac at slackware dot it>
Notes:
svn path=/head/; revision=176559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conjuction with 'thread' argument passing which is always curthread.
Remove the unuseful extra-argument and pass explicitly curthread to lower
layer functions, when necessary.
KPI results broken by this change, which should affect several ports, so
version bumping and manpage update will be further committed.
Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
Notes:
svn path=/head/; revision=175294
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation
argument from being file descriptor index into the pointer to struct file.
Proposed and reviewed by: jhb
Reviewed by: daichi (unionfs)
Approved by: re (kensmith)
Notes:
svn path=/head/; revision=170152
|
|
|
|
|
|
|
|
|
| |
function calls are no more generated for vop_lock.
Rename _vop_lock to vop_lock1 to satisfy tools/vnode_if.awk assumption
about vop naming conventions. This restores pre/post-condition calls.
Notes:
svn path=/head/; revision=169671
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we may support multiple structures in v_data vnode field within
one file system without using black magic.
Vnode-to-file-handle should be VOP in the first place, but was made VFS
operation to keep interface as compatible as possible with SUN's VFS.
BTW. Now Solaris also implements vnode-to-file-handle as VOP operation.
VFS_VPTOFH() was left for API backward compatibility, but is marked for
removal before 8.0-RELEASE.
Approved by: mckusick
Discussed with: many (on IRC)
Tested with: ufs, msdosfs, cd9660, nullfs and zfs
Notes:
svn path=/head/; revision=166774
|
|
|
|
|
|
|
|
|
| |
acquisition of lockmgr locks
Approved by: scottl (standing in for mentor rwatson)
Notes:
svn path=/head/; revision=164248
|
|
|
|
|
|
|
|
|
|
| |
a) were incorrectly written and therefore never compiled into
assertions, and
b) were incorrectly specified and when compiled resulted in a
failed assertion.
Notes:
svn path=/head/; revision=159104
|
|
|
|
|
|
|
|
| |
sequences that are distinct from comments. %% is used for argument
locks; %! for pre- and post-conditions.
Notes:
svn path=/head/; revision=159082
|
|
|
|
|
|
|
|
|
|
|
| |
failed assertions with DEBUG_VFS_LOCKS.
We should reinstate them with correct specifications, possibly
after extendng vnode_if.awk
Noted by: truckman@
Notes:
svn path=/head/; revision=159080
|
|
|
|
|
|
|
|
|
| |
lookup, rename, strategy, islocked
The missing % sign meant that the lines were processed as plain
comments and the corresponding assertions were never generated.
Notes:
svn path=/head/; revision=159002
|
|
|
|
| |
Notes:
svn path=/head/; revision=153400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=144909
|
|
|
|
|
|
|
|
|
| |
on enter, exit, error. This allows for the removal of the XLOCK.
Sponsored by: Isilon Systems, Inc.
Notes:
svn path=/head/; revision=143492
|
|
|
|
| |
Notes:
svn path=/head/; revision=141449
|
|
|
|
| |
Notes:
svn path=/head/; revision=140783
|
|
|
|
|
|
|
| |
for a given vnode to create a vnode_pager object if one is needed.
Notes:
svn path=/head/; revision=140781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Notes:
svn path=/head/; revision=139804
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Notes:
svn path=/head/; revision=137043
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=135135
|
|
|
|
|
|
|
|
|
| |
per letter dated July 22, 1999.
Approved by: core
Notes:
svn path=/head/; revision=127911
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=118131
|
|
|
|
| |
Notes:
svn path=/head/; revision=118093
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=118047
|
|
|
|
|
|
|
|
|
|
|
| |
interface, rather than relying on a NULL uio for the deletion
operation.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=116698
|
|
|
|
| |
Notes:
svn path=/head/; revision=116615
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=115867
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=108686
|
|
|
|
|
|
|
|
| |
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=108263
|
|
|
|
| |
Notes:
svn path=/head/; revision=103980
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/head/; revision=103636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=102990
|