|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
18f5b477 |
| 06-Nov-2021 |
Rick Macklem <[email protected]> |
vfs: Add "ioflag" and "cred" arguments to VOP_ALLOCATE
When the NFSv4.2 server does a VOP_ALLOCATE(), it needs the operation to be done for the RPC's credential and not td_ucred. It also needs the w
vfs: Add "ioflag" and "cred" arguments to VOP_ALLOCATE
When the NFSv4.2 server does a VOP_ALLOCATE(), it needs the operation to be done for the RPC's credential and not td_ucred. It also needs the writing to be done synchronously.
This patch adds "ioflag" and "cred" arguments to VOP_ALLOCATE() and modifies vop_stdallocate() to use these arguments.
The VOP_ALLOCATE.9 man page will be patched separately.
(cherry picked from commit f0c9847a6c477430d6fff647b12e9e9e2b461f2a)
show more ...
|
| #
b9283ea3 |
| 03-Nov-2021 |
Konstantin Belousov <[email protected]> |
Make locking assertions for VOP_FSYNC() and VOP_FDATASYNC() more correct
(cherry picked from commit 47b248ac651683650f7852485c594e76ca375573)
|
|
Revision tags: release/13.0.0 |
|
| #
1f96e4cd |
| 28-Jan-2021 |
Konstantin Belousov <[email protected]> |
Add VOP_VPUT_PAIR() with trivial default implementation.
(cherry picked from commit 49c117c193768b10f5fb1c5e4d6b88300cfbcdd6)
|
| #
dcee9964 |
| 23-Jan-2021 |
Mateusz Guzik <[email protected]> |
cache: add symlink support to lockless lookup
Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488
|
|
Revision tags: release/12.2.0 |
|
| #
c7520caa |
| 22-Oct-2020 |
Mateusz Guzik <[email protected]> |
vfs: prevent avoidable evictions on mkdir of existing directories
mkdir -p /foo/bar/baz will mkdir each path component and ignore EEXIST.
The NOCACHE lookup will make the namecache unnecessarily ev
vfs: prevent avoidable evictions on mkdir of existing directories
mkdir -p /foo/bar/baz will mkdir each path component and ignore EEXIST.
The NOCACHE lookup will make the namecache unnecessarily evict the existing entry, and then fallback to the fs lookup routine eventually leading namei to return an error as the directory is already there.
For invocations like mkdir -p /usr/obj/usr/src/sys/GENERIC/modules this triggers fallbacks to the slowpath for concurrently executing lookups.
Tested by: pho Discussed with: kib
show more ...
|
| #
ab21ed17 |
| 20-Oct-2020 |
Mateusz Guzik <[email protected]> |
vfs: drop the de facto curthread argument from VOP_INACTIVE
|
| #
8ecd87a3 |
| 20-Oct-2020 |
Mateusz Guzik <[email protected]> |
vfs: drop spurious cred argument from VOP_VPTOCNP
|
| #
3c484f32 |
| 15-Sep-2020 |
Konstantin Belousov <[email protected]> |
Convert page cache read to VOP.
There are several negative side-effects of not calling into VOP layer at all for page cache reads. The biggest is the missed activation of EVFILT_READ knotes.
Also,
Convert page cache read to VOP.
There are several negative side-effects of not calling into VOP layer at all for page cache reads. The biggest is the missed activation of EVFILT_READ knotes.
Also, it allows filesystem to make more fine grained decision to refuse read from page cache.
Keep VIRF_PGREAD flag around, it is still useful for nullfs, and for asserts.
Reviewed by: markj Tested by: pho Discussed with: mjg Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26346
show more ...
|
| #
8f226f4c |
| 19-Aug-2020 |
Mateusz Guzik <[email protected]> |
vfs: remove the always-curthread td argument from VOP_RECLAIM
|
| #
21d5af2b |
| 10-Aug-2020 |
Mateusz Guzik <[email protected]> |
vfs: drop the thread argumemnt from vfs_fplookup_vexec
It is guaranteed curthread.
Tested by: pho Sponsored by: The FreeBSD Foundation
|
| #
51ea7bea |
| 07-Aug-2020 |
Mateusz Guzik <[email protected]> |
vfs: add VOP_STAT
The current scheme of calling VOP_GETATTR adds avoidable overhead.
An example with tmpfs doing fstat (ops/s): before: 7488958 after: 7913833
Reviewed by: kib (previous version)
vfs: add VOP_STAT
The current scheme of calling VOP_GETATTR adds avoidable overhead.
An example with tmpfs doing fstat (ops/s): before: 7488958 after: 7913833
Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D25910
show more ...
|
| #
848f8eff |
| 30-Jul-2020 |
Mateusz Guzik <[email protected]> |
vfs: inline vops if there are no pre/post associated calls
This removes a level of indirection from frequently used methods, most notably VOP_LOCK1 and VOP_UNLOCK1.
Tested by: pho
|
| #
07d2145a |
| 25-Jul-2020 |
Mateusz Guzik <[email protected]> |
vfs: add the infrastructure for lockless lookup
Reviewed by: kib Tested by: pho (in a patchset) Differential Revision: https://reviews.freebsd.org/D25577
|
| #
0379ff6a |
| 25-Jul-2020 |
Mateusz Guzik <[email protected]> |
vfs: introduce vnode sequence counters
Modified on each permission change and link/unlink.
Reviewed by: kib Tested by: pho (in a patchset) Differential Revision: https://reviews.freebsd.org/D25573
|
|
Revision tags: release/11.4.0 |
|
| #
2782c00c |
| 23-Feb-2020 |
Ryan Libby <[email protected]> |
vfs: quiet -Wwrite-strings
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23797
|
| #
6698e11f |
| 02-Feb-2020 |
Mateusz Guzik <[email protected]> |
vfs: remove the now empty vop_unlock_post
|
| #
45757984 |
| 01-Feb-2020 |
Mateusz Guzik <[email protected]> |
vfs: consistently use size_t for buflen around VOP_VPTOCNP
|
| #
643656cf |
| 01-Feb-2020 |
Mateusz Guzik <[email protected]> |
vfs: replace VOP_MARKATIME with VOP_MMAPPED
The routine is only provided by ufs and is only used on mmap and exec.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23422
|
| #
b249ce48 |
| 03-Jan-2020 |
Mateusz Guzik <[email protected]> |
vfs: drop the mostly unused flags argument from VOP_UNLOCK
Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version) Differenti
vfs: drop the mostly unused flags argument from VOP_UNLOCK
Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D21427
show more ...
|
|
Revision tags: release/12.1.0 |
|
| #
1e2f0ceb |
| 28-Aug-2019 |
Mateusz Guzik <[email protected]> |
vfs: add VOP_NEED_INACTIVE
vnode usecount drops to 0 all the time (e.g. for directories during path lookup). When that happens the kernel would always lock the exclusive lock for the vnode in order
vfs: add VOP_NEED_INACTIVE
vnode usecount drops to 0 all the time (e.g. for directories during path lookup). When that happens the kernel would always lock the exclusive lock for the vnode in order to call vinactive(). This blocks other threads who want to use the vnode for looukp.
vinactive is very rarely needed and can be tested for without the vnode lock held.
This patch gives filesytems an opportunity to do it, sample total wait time for tmpfs over 500 minutes of poudriere -j 104:
before: 557563641706 (lockmgr:tmpfs) after: 46309603301 (lockmgr:tmpfs)
Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21371
show more ...
|
| #
bb9e2184 |
| 18-Aug-2019 |
Konstantin Belousov <[email protected]> |
Change locking requirements for VOP_UNSET_TEXT().
Require the vnode to be locked for the VOP_UNSET_TEXT() call. This will be used by the following bug fix for a tmpfs issue.
Tested by: sbruno, pho
Change locking requirements for VOP_UNSET_TEXT().
Require the vnode to be locked for the VOP_UNSET_TEXT() call. This will be used by the following bug fix for a tmpfs issue.
Tested by: sbruno, pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
| #
bbbbeca3 |
| 25-Jul-2019 |
Rick Macklem <[email protected]> |
Add kernel support for a Linux compatible copy_file_range(2) syscall.
This patch adds support to the kernel for a Linux compatible copy_file_range(2) syscall and the related VOP_COPY_FILE_RANGE(9).
Add kernel support for a Linux compatible copy_file_range(2) syscall.
This patch adds support to the kernel for a Linux compatible copy_file_range(2) syscall and the related VOP_COPY_FILE_RANGE(9). This syscall/VOP can be used by the NFSv4.2 client to implement the Copy operation against an NFSv4.2 server to do file copies locally on the server. The vn_generic_copy_file_range() function in this patch can be used by the NFSv4.2 server to implement the Copy operation. Fuse may also me able to use the VOP_COPY_FILE_RANGE() method.
vn_generic_copy_file_range() attempts to maintain holes in the output file in the range to be copied, but may fail to do so if the input and output files are on different file systems with different _PC_MIN_HOLE_SIZE values.
Separate commits will be done for the generated syscall files and userland changes. A commit for a compat32 syscall will be done later.
Reviewed by: kib, asomers (plus comments by brooks, jilles) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D20584
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
78022527 |
| 05-May-2019 |
Konstantin Belousov <[email protected]> |
Switch to use shared vnode locks for text files during image activation.
kern_execve() locks text vnode exclusive to be able to set and clear VV_TEXT flag. VV_TEXT is mutually exclusive with the v_w
Switch to use shared vnode locks for text files during image activation.
kern_execve() locks text vnode exclusive to be able to set and clear VV_TEXT flag. VV_TEXT is mutually exclusive with the v_writecount > 0 condition.
The change removes VV_TEXT, replacing it with the condition v_writecount <= -1, and puts v_writecount under the vnode interlock. Each text reference decrements v_writecount. To clear the text reference when the segment is unmapped, it is recorded in the vm_map_entry backed by the text file as MAP_ENTRY_VN_TEXT flag, and v_writecount is incremented on the map entry removal
The operations like VOP_ADD_WRITECOUNT() and VOP_SET_TEXT() check that v_writecount does not contradict the desired change. vn_writecheck() is now racy and its use was eliminated everywhere except access. Atomic check for writeability and increment of v_writecount is performed by the VOP. vn_truncate() now increments v_writecount around VOP_SETATTR() call, lack of which is arguably a bug on its own.
nullfs bypasses v_writecount to the lower vnode always, so nullfs vnode has its own v_writecount correct, and lower vnode gets all references, since object->handle is always lower vnode.
On the text vnode' vm object dealloc, the v_writecount value is reset to zero, and deadfs vop_unset_text short-circuit the operation. Reclamation of lowervp always reclaims all nullfs vnodes referencing lowervp first, so no stray references are left.
Reviewed by: markj, trasz Tested by: mjg, pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D19923
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
1493c2ee |
| 02-Nov-2018 |
Brooks Davis <[email protected]> |
Make vop_symlink take a const target path.
This will enable callers to take const paths as part of syscall decleration improvements.
Where doing so is easy and non-distruptive carry the const throu
Make vop_symlink take a const target path.
This will enable callers to take const paths as part of syscall decleration improvements.
Where doing so is easy and non-distruptive carry the const through implementations. In UFS the value is passed to an interface that must take non-const values. In ZFS, const poisoning would touch code shared with upstream and it's not worth adding diffs.
Bump __FreeBSD_version for external API consumers.
Reviewed by: kib (prior version) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17805
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
b1288166 |
| 17-Jan-2018 |
John Baldwin <[email protected]> |
Use long for the last argument to VOP_PATHCONF rather than a register_t.
pathconf(2) and fpathconf(2) both return a long. The kern_[f]pathconf() functions now accept a pointer to a long value rathe
Use long for the last argument to VOP_PATHCONF rather than a register_t.
pathconf(2) and fpathconf(2) both return a long. The kern_[f]pathconf() functions now accept a pointer to a long value rather than modifying td_retval directly. Instead, the system calls explicitly store the returned long value in td_retval[0].
Requested by: bde Reviewed by: kib Sponsored by: Chelsio Communications
show more ...
|