#
1ccbdf56 |
| 06-Dec-2024 |
Olivier Certner <olce@FreeBSD.org> |
tmpfs: Rework file handles
Change 'struct tmpfs_fid_data' to behave consistently with the private structure other FSes use. In a nutshell, make it a full alias of 'struct fid', instead of just usin
tmpfs: Rework file handles
Change 'struct tmpfs_fid_data' to behave consistently with the private structure other FSes use. In a nutshell, make it a full alias of 'struct fid', instead of just using it to fill 'fid_data'. This implies adding a length field at start (aliasing 'fid_len' of 'struct fid'), and filling 'fid_len' with the full size of the aliased structure.
To ensure that the new 'struct tmpfs_fid_data' is smaller than 'struct fid', which the compile-time assert introduced in commit 91b5592a1e1af974 ("fs: Add static asserts for the size of fid structures") checks (and thus was not strong enough when added), use '__packed'.
A consequence of this change is that copying the 'struct tmpfs_fid_data' into a stack-allocated variable becomes unnecessary, we simply rely on the compiler emitting the proper code on seeing '__packed' (and on the start of 'struct tmpfs_fid_data' being naturally aligned, which is normally guaranteed by kernel's malloc() and/or inclusion in 'struct fhandle').
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47956
show more ...
|
Revision tags: release/14.2.0, release/13.4.0 |
|
#
8370e9df |
| 29-Jul-2024 |
Mark Johnston <markj@FreeBSD.org> |
vm: Remove kernel stack swapping support, part 3
- Modify PHOLD() to no longer fault in the process. - Remove _PHOLD_LITE(), which is now the same as _PHOLD(), fix up consumers. - Remove faultin()
vm: Remove kernel stack swapping support, part 3
- Modify PHOLD() to no longer fault in the process. - Remove _PHOLD_LITE(), which is now the same as _PHOLD(), fix up consumers. - Remove faultin() and its callees.
Tested by: pho Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D46114
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
765ad5b2 |
| 11-Aug-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: add the "pgread" mount option to the allowed options list for mount
Fixes: 0f613ab85e5a5274704d179f39fb15163d46e7c4 Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
0f613ab8 |
| 06-Aug-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: add a knob to enable pgcache read for mount
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41334
|
#
b61a5730 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch up to that fact and revert to their recommended match of BS
spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
15df9021 |
| 23-Feb-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: support the nosymfollow mount option
PR: 269772 Reported by: firk@cantconnect.ru Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
56242a4c |
| 05-Dec-2022 |
Fedor Uporov <fsu@FreeBSD.org> |
Add extended attributes
The extattrs follows semantic of ufs, mean it cannot be set to char/block devices and fifos. The attributes are allocated using regular malloc with M_WAITOK allocation with t
Add extended attributes
The extattrs follows semantic of ufs, mean it cannot be set to char/block devices and fifos. The attributes are allocated using regular malloc with M_WAITOK allocation with the own malloc tag M_TMPFSEA. The memory consumed by extended attributes is limited to avoid OOM triggereing by tmpfs_mount variable tm_ea_memory_max, which is set initialy to 16 MB. The extended attributes entries are stored as linked list in the tmpfs node. The mount point lock is required only under setextattr and deleteextattr to update extended attributes memory-inuse counter, all other operations are doing under vnode lock.
Reviewed by: kib MFC after: 2 week Differential revision: https://reviews.freebsd.org/D38052
show more ...
|
#
1d9f3a37 |
| 06-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Stop cleaning MNT_LOCAL on unmount
There is no point in clearing just this flag. Flags are reset on the struct mount re-allocation for reuse anyway.
Reviewed by: mckusick Sponsored by: The FreeBSD
Stop cleaning MNT_LOCAL on unmount
There is no point in clearing just this flag. Flags are reset on the struct mount re-allocation for reuse anyway.
Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37966
show more ...
|
Revision tags: release/12.4.0 |
|
#
37aea264 |
| 20-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: for used pages, account really allocated pages, instead of file sizes
This makes tmpfs size accounting correct for the sparce files. Also correct report st_blocks/va_bytes. Previously the rep
tmpfs: for used pages, account really allocated pages, instead of file sizes
This makes tmpfs size accounting correct for the sparce files. Also correct report st_blocks/va_bytes. Previously the reported value did not accounted for the swapped out pages.
PR: 223015 Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
show more ...
|
#
d9dc64f1 |
| 20-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: make vm_object point to the tmpfs node instead of vnode
The vnode could be reclaimed and allocated again during the lifecycle of the node, but the node cannot. Also, referencing the node wou
tmpfs: make vm_object point to the tmpfs node instead of vnode
The vnode could be reclaimed and allocated again during the lifecycle of the node, but the node cannot. Also, referencing the node would allow to reach it and tmpfs mount data from the object, regardless of the state of the possibly absent vnode.
Still use swp_tmpfs for back-pointer, instead of using handle. Use of named swap objects would incur taking the sw_alloc_sx on node allocation and deallocation.
swp_tmpfs is renamed to swp_priv to remove the last bit of tmpfs in vm/.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
show more ...
|
#
83aff0f0 |
| 20-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
Add 'show tmpfs' ddb command
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
4dcdf398 |
| 18-May-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: replace the MNTK_TEXT_REFS flag with VIRF_TEXT_REF
This allows to stop maintaing the VI_TEXT_REF flag and consequently opens up fully lockless v_writecount adjustment.
Reviewed by: kib Differe
vfs: replace the MNTK_TEXT_REFS flag with VIRF_TEXT_REF
This allows to stop maintaing the VI_TEXT_REF flag and consequently opens up fully lockless v_writecount adjustment.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D33127
show more ...
|
#
c12118f6 |
| 24-Aug-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
tmpfs: Fix styles
A lot of return statements were in the wrong style before this commit.
Sponsored by: The FreeBSD Foundation MFC after: 3 days
|
#
eec2e4ef |
| 07-May-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
tmpfs: reimplement the mtime scan to use the lazy list
Tested by: pho Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30065
|
#
28bc23ab |
| 07-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: dynamically register tmpfs pager
Remove OBJT_SWAP_TMPFS. Move tmpfs-specific swap pager bits into tmpfs_subr.c.
There is no longer any code to directly support tmpfs in sys/vm, most tmpfs kn
tmpfs: dynamically register tmpfs pager
Remove OBJT_SWAP_TMPFS. Move tmpfs-specific swap pager bits into tmpfs_subr.c.
There is no longer any code to directly support tmpfs in sys/vm, most tmpfs knowledge is shared by non-anon swap object type implementation. The tmpfs-specific methods are provided by registered tmpfs pager, which inherits from the swap pager.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30168
show more ...
|
#
4b8365d7 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add OBJT_SWAP_TMPFS pager
This is OBJT_SWAP pager, specialized for tmpfs. Right now, both swap pager and generic vm code have to explicitly handle swap objects which are tmpfs vnode v_object, in th
Add OBJT_SWAP_TMPFS pager
This is OBJT_SWAP pager, specialized for tmpfs. Right now, both swap pager and generic vm code have to explicitly handle swap objects which are tmpfs vnode v_object, in the special ways. Replace (almost) all such places with proper methods.
Since VM still needs a notion of the 'swap object', regardless of its use, add yet another type-classification flag OBJ_SWAP. Set it in vm_object_allocate() where other type-class flags are set.
This change almost completely eliminates the knowledge of tmpfs from VM, and opens a way to make OBJT_SWAP_TMPFS loadable from tmpfs.ko.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
Revision tags: release/13.0.0 |
|
#
9f200bc4 |
| 05-Jan-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs_free_tmp(): explicitly assert that tmp is locked
Despite TMPFS_UNLOCK() is done in both paths later, unlocking not locked mutex provides different failure mode.
MFC after: 1 week Sponsored by
tmpfs_free_tmp(): explicitly assert that tmp is locked
Despite TMPFS_UNLOCK() is done in both paths later, unlocking not locked mutex provides different failure mode.
MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
42bebbda |
| 05-Jan-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: make M_TMPFSMNT static to tmpfs_vfsops.c
This malloc type is only used in this file.
MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
Revision tags: release/12.2.0 |
|
#
081e36e7 |
| 15-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Add tmpfs page cache read support.
Or it could be explained as lockless (for vnode lock) reads. Reads are performed from the node tn_obj object. Tmpfs regular vnode object lifecycle is significant
Add tmpfs page cache read support.
Or it could be explained as lockless (for vnode lock) reads. Reads are performed from the node tn_obj object. Tmpfs regular vnode object lifecycle is significantly different from the normal OBJT_VNODE: it is alive as far as ref_count > 0.
Ensure liveness of the tmpfs VREG node and consequently v_object inside VOP_READ_PGCACHE by referencing tmpfs node in tmpfs_open(). Provide custom tmpfs fo_close() method on file, to ensure that close is paired with open.
Add tmpfs VOP_READ_PGCACHE that takes advantage of all tmpfs quirks. It is quite cheap in code size sense to support page-ins for read for tmpfs even if we do not own tmpfs vnode lock. Also, we can handle holes in tmpfs node without additional efforts, and do not have limitation of the transfer size.
Reviewed by: markj Discussed with and benchmarked by: mjg (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26346
show more ...
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
e81829d0 |
| 16-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r364264 through r364278.
|
#
a92a971b |
| 16-Aug-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove the thread argument from vget
It was already asserted to be curthread.
Semantic patch:
@@
expression arg1, arg2, arg3;
@@
- vget(arg1, arg2, arg3) + vget(arg1, arg2)
|
#
440cec3f |
| 12-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|