Commit graph

5047 commits

Author SHA1 Message Date
Rick Macklem b484bcd504 nfscl: Fix handling of a copyout() error reply
If vfs.nfs.nfs_directio_enable is set non-zero (the default is
zero) and a file on an NFS mount is read after being opened
with O_DIRECT | O_ RDONLY, a call to nfsm_mbufuio() calls
copyout() without checking for an error return.
If copyout() returns EFAULT, this would not work correctly.

Only the call path
 VOP_READ()->ncl_readrpc()->nfsrpc_read()->nfsrpc_readrpc()
will do this and the error return for EFAULT will
be returned back to VOP_READ().

This patch adds the error check to nfsm_mbufuio().

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D43160
2023-12-22 12:11:22 -08:00
Mike Karels 636592343c tmpfs: increase memory reserve to a percent of available memory + swap
The tmpfs memory reserve defaulted to 4 MB, and other than that,
all of available memory + swap could be allocated to tmpfs files.
This was dangerous, as the page daemon attempts to keep some memory
free, using up swap, and then resulting in processes being killed.
Increase the reserve to a fraction of available memory + swap at
file system startup time.  The limit is expressed as a percentage
of available memory + swap that can be used, and defaults to 95%.
The percentage can be changed via the vfs.tmpfs.memory_percent sysctl,
recomputing the reserve with the new percentage but the initial
available memory + swap.  Note that the reserve can also be set
directly with an existing sysctl, ignoring the percentage.  The
previous behavior can be specified by setting vfs.tmpfs.memory_percent
to 100.

Add sysctl for vfs.tmpfs.memory_percent and the pre-existing
vfs.tmpfs.memory_reserved to tmpfs(5).

PR:		275436
MFC after:	1 month
Reviewed by:	rgrimes
Differential Revision:	https://reviews.freebsd.org/D43011
2023-12-19 09:33:33 -06:00
Mike Karels ed19c0989f tmpfs: enforce size limit on writes when file system size is default
tmpfs enforced the file system size limit on writes for file systems
with a specified size, but not when the size was the default.  Add
enforcement when the size is default: do not allocate additional
pages if the available memory + swap falls to the reserve level.
Note, enforcement is also done when attempting to create a file,
both with and without an explicit file system size.

PR:		275436
MFC after:	1 month
Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D43010
2023-12-19 09:32:58 -06:00
Mark Johnston 6fa843f6e6 nfsclient: Propagate copyin() errors from nfsm_uiombuf()
Approved by:	so
Security:	SA-23:18.nfsclient
Reviewed by:	rmacklem
Sponsored by:	The FreeBSD Foundation
2023-12-12 14:05:24 -05:00
Rick Macklem 0a958aa16f nfscl: Fix comment for commit 6aded1e6b2
Commit 6aded1e6b2 fixed a rare case when handling an NFSv4
Rename reply when delegations are in use.  This patch fixes the
associated comment.

MFC after:	2 weeks
2023-12-03 16:12:14 -08:00
Rick Macklem 6aded1e6b2 nfscl: Fix processing of a rare Rename reply case
When delegations are enabled (they are not by default in
the FreeBSD NFSv4 server), rename will check for and return
delegations.  If the second of these DelegReturn operations
were to fail (they rarely do), then the code would not retry
the rename with returning delegations, as it is intended to do.

The patch fixes the problem, since the DelegReturn reply status
is the second iteration of the loop and not the first iteration.

As noted, this bug would have rarely manifested a problem, since
DelegReturn operations do not normally fail.

MFC after:	2 weeks
2023-12-03 15:31:01 -08:00
Konstantin Belousov 326836a1eb nullfs: do not allow bypass on copy_file_range()
There must be no callers of VOP_COPY_FILE_RANGE() except
vn_copy_file_range(), which does enough to find the write-vnodes where
to call the VOP.

Reviewed by:	markj, Olivier Certner <olce.freebsd@certner.fr>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42603
2023-11-28 19:32:53 +02:00
Konstantin Belousov c5405d1c85 vn_copy_file_range(): provide ENOSYS fallback to vn_generic_copy_file_range()
Reviewed by:	markj, Olivier Certner <olce.freebsd@certner.fr>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42603
2023-11-28 19:32:53 +02:00
Konstantin Belousov 4cbe4c48a7 VFS: add VOP_GETLOWVNODE()
It is similar to VOP_GETWRITEMOUNT(), and for given vnode vp should
return the lower vnode which would actually handle write to vp.
Flags allow to specify FREAD or FWRITE for benefit of possible unionfs
implementation.

Reviewed by:	markj, Olivier Certner <olce.freebsd@certner.fr>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42603
2023-11-28 19:32:53 +02:00
Warner Losh fdafd315ad 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
2023-11-26 22:24:00 -07:00
Warner Losh 29363fb446 sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:30 -07:00
Alvin Chen e0d0f0930e pseudofs: fix off by one in hash iteration in pfs_purge
Sponsored by:	Dell Technologies
Differential Revision:	https://reviews.freebsd.org/D42628
2023-11-20 05:57:25 +00:00
Konstantin Belousov 4c6cded216 fuse_vnop_copy_file_range(): add safety
v_mount for unlocked vnode could be NULL, check for it.  Explain why it
is safe to access fs-specific data for mp if it is read as non-NULL.

Reviewed by:	asomers, jah
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42625
2023-11-16 22:10:31 +02:00
Konstantin Belousov 318c56714a fuse_vnop_copy_file_range(): use vn_lock_pair()
Reviewed by:	asomers, jah
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42625
2023-11-16 22:10:30 +02:00
Rick Macklem 501bdf3001 nfscl: newnfs_copycred() cannot be called when a mutex is held
Since newnfs_copycred() calls crsetgroups() which in turn calls
crextend() which might do a malloc(M_WAITOK), newnfs_copycred()
cannot be called with a mutex held.  Fortunately, the malloc()
call is rarely done, since XU_GROUPS is 16 and the NFS client
uses a maximum of 17 (only 17 groups will cause the malloc() to
be called).  Further, it is only a problem if the malloc() tries
to sleep().  As such, this bug does not seem to have caused
problems in practice.

This patch fixes the one place in the NFS client where
newnfs_copycred() is called while a mutex is held by moving the
call to after where the mutex is released.

Found by inspection while working on an experimental patch.

MFC after:	2 weeks
2023-11-06 14:25:30 -08:00
Navdeep Parhar c656f5c1a6 Fix build with gcc12. 2023-10-27 16:39:12 -07:00
Rick Macklem dd7d42a1fa nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers
During recent testing related to the IETF NFSv4 Bakeathon, it was
discovered that Kerberized NFSv4.1/4.2 mounts to pNFS servers
(sec=krb5[ip],pnfs mount options) was broken.
The FreeBSD client was using the "service principal" for
the MDS to try and establish a rpcsec_gss credential for a DS,
which is incorrect. (A "service principal" looks like
"nfs@<fqdn-of-server>" and the <fqdn-of-server> for the DS is not
the same as the MDS for most pNFS servers.)

To fix this, the rpcsec_gss code needs to be able to do a
reverse DNS lookup of the DS's IP address.  A new kgssapi upcall
to the gssd(8) daemon is added by this patch to do the reverse DNS
along with a new rpcsec_gss function to generate the "service
principal".

A separate patch to the gssd(8) will be committed, so that this
patch will fix the problem.  Without the gssd(8) patch, the new
upcall fails and current/incorrect behaviour remains.

This bug only affects the rare case of a Kerberized (sec=krb5[ip],pnfs)
mount using pNFS.

This patch changes the internal KAPI between the kgssapi and
nfscl modules, but since I did a version bump a few days ago,
I will not do one this time.

MFC after:	1 month
2023-10-23 13:21:14 -07:00
Rick Macklem 14bbf4fe5a nfscl: Handle a Getattr failure with NFSERR_DELAY following Open
During testing at a recent IETF NFSv4 Bakeathon, a non-FreeBSD
server was rebooted.  After the reboot, the FreeBSD client sent
an Open/Claim_previous with a Getattr after the Open in the same
compound.  The Open/Claim_previous was done to recover the Open
and a Delegation for for a file.  The Open succeeded, but the
Getattr after the Open failed with NFSERR_DELAY.  This resulted
in the FreeBSD client retrying the entire RPC over and over again,
until the server's recovery grace period ended.  Since the Open
succeeded, there was no need to retry the entire RPC.

This patch modifies the NFSv4 client side recovery Open/Claim_previous
RPC reply handling to deal with this case.  With this patch, the
Getattr reply of NFSERR_DELAY is ignored and the successful Open
reply is processed.

This bug will not normally affect users, since this non-FreeBSD
server is not widely used (it may not even have shipped to any
customers).

MFC after:	1 month
2023-10-21 18:33:33 -07:00
Rick Macklem 196787f79e nfscl: Use Claim_Null_FH and Claim_Deleg_Cur_FH
For NFSv4.1/4.2, there are two new options for the Open operation.
These two options use the file handle for the file instead of the
file handle for the directory plus a file name.  By doing so, the
client code is simplified (it no longer needs the "nfsv4node" structure
attached to the NFS vnode).  It also avoids problems caused by another
NFS client (or process running locally in the NFS server) doing a
rename or remove of the file name between the Lookup and Open.

Unfortunately, there was a bug (fixed recently by commit X)
in the NFS server which mis-parsed the Claim_Deleg_Cur_FH
arguments.  To allow this patch to work with the broken FreeBSD
NFSv4.1/4.2 server, NFSMNTP_BUGGYFBSDSRV is defined and is set
when a correctly formatted Claim_Deleg_Cur_FH fails with NFSERR_EXPIRED.
(This is what the old, broken NFS server does, since it erroneously
uses the Getattr arguments as a stateID.)  Once this flag is set,
the client fills in a stateID, to make the broken NFS server happy.

Tested at a recent IETF NFSv4 Bakeathon.

MFC after:	1 month
2023-10-20 16:10:25 -07:00
Rick Macklem f300335d9a nfsd: Fix NFSv4.1/4.2 Claim_Deleg_Cur_FH
When I implemented a test patch using Open Claim_Deleg_Cur_FH
I discovered that the NFSv4.1/4.2 server was broken for this
Open option.  Fortunately it is never used by the FreeBSD
client and never used by other clients unless delegations
are enabled. (The FreeBSD NFSv4 server does not have delegations
enabled by default.)

Claim_Deleg_Cur_FH was broken because the code mistakenly
assumed a stateID argument, which is not the case.
This patch fixes the bug by changing the XDR parser to not
expect a stateID and to fill most of the stateID in from the
clientID. The clientID is the first two elements of the "other"
array for the stateID and is sufficient to identify which
client the delegation is issued to.  Since there is only one
delegation issued to a client per file, this is sufficient to
locate the correct delegation.

If you are running non-FreeBSD NFSv4.1/4.2 mounts against the
FreeBSD server, you need this patch if you have delegations enabled.

PR:	274574
MFC after:	2 weeks
2023-10-19 12:35:35 -07:00
Rick Macklem 57ce37f9dc nfscl: Make NFSv4.2 Copy set atime on infd
RFC7862 does not specify infile atime behaviour when a NFSv4.2 Copy
operation is performed.  Since the collective opinion of a mailing
list discussion (on freebsd-hackers@) seemed to indicate that
copy_file_range(2) should update atime on the infd,
even if there is no data copied, this
patch attempts to ensure that behaviour.

For Copy, it preceeds the Copy operation with a Setattr of
TimeAccess_Set(NFSv4. speak for atime) for the invp.  For the case
where no data will be copied, it does a Setattr RPC to set
TimeAccess_Set for the invp.

A __FreeBSD_version bump will be done as a separate commit, since
this patch changes the internal interface between the nfscommon and
nfscl modules.

MFC after:	1 month
2023-10-18 13:07:39 -07:00
Rick Macklem c4e298251a nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server
In a recent email list discussion related to NFSv4 mount problems
against a non-FreeBSD NFSv4 server, the reporter of the issue noted
that the server had replied 10068 (NFSERR_RETRYUNCACHEDREP).  This
did not seem related to the mount problem, but I had never seen this
error before.  It indicates that an RPC retry after a new TCP
connection has been established failed because the server did not
cache the reply.  Since this should only happen for idempotent
operations, redoing the RPC should be safe.

This patch modifies the NFSv4.1/4.2 client to redo the RPC instead
of considering the server error fatal.  It should only affect the
unusual case where TCP connections to NFSv4 servers are breaking
without the NFSv4 server rebooting.

Reported by:	J David <j.devid.lists@gmail.com>
MFC after:	2 weeks
2023-10-18 12:42:12 -07:00
Rick Macklem db7257ef97 nfsd: Fix a server crash
PR#274346 reports a crash which appears to be caused by a NULL default session
being destroyed.  This patch should avoid the crash.

Tested by:	Joshua Kinard <freebsd@kumba.dev>
PR:	274346
MFC after:	2 weeks
2023-10-17 19:43:25 -07:00
Rick Macklem cd5edc7db2 nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations
Without this patch, a NFSv4 Readdir operation acquires the vnode for
each entry in the directory.  If only the Type, Fileid, Mounted_on_fileid
and ReaddirError attributes are requested by a client, acquiring the vnode
is not necessary for non-directories.  Directory vnodes must be acquired
to check for server file system mount points.

This patch avoids acquiring the vnode, as above, resulting in a 3-8%
improvement in Readdir RPC RTT for some simple tests I did.

Note that only non-rdirplus NFSv4 mounts will benefit from this change.

Tested during a recent IETF NFSv4 Bakeathon testing event.

MFC after:	1 month
2023-10-17 13:55:48 -07:00
Zhenlei Huang 95c01e9b32 nfscl: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'vfs.nfs.iodmin' is actually a loader tunable. Add
sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:21 +08:00
Alan Somers 662ec2f781 fusefs: sanitize FUSE_READLINK results for embedded NULs
If VOP_READLINK returns a path that contains a NUL, it will trigger an
assertion in vfs_lookup.  Sanitize such paths in fusefs, rejecting any
and warning the user about the misbehaving server.

PR:		274268
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	mjg, markj
Differential Revision: https://reviews.freebsd.org/D42081
2023-10-07 08:22:03 -06:00
Jason A. Harmening 67864268da devfs: add integrity asserts for cdevp_list
It's possible for misuse of cdev KPIs or for bugs in devfs itself to
result in e.g. a cdev object's container being freed while still on the
global list used to populate each devfs mount; see PR 273418 for a
recent example.

Since a node may be marked inactive well before it is reaped from the
list, add a new flag solely to track list membership, and employ it in
some basic list integrity assertions to catch bad actors.

Discussed with:	kib, mjg
MFC after:	1 week
2023-09-21 11:51:12 -05:00
Alan Somers fb619c94c6 fusefs: fix some bugs updating atime during close
When using cached attributes, we must update a file's atime during
close, if it has been read since the last attribute refresh.  But,

* Don't update atime if we lack write permissions to the file or if the
  file system is readonly.
* If the daemon fails our atime update request for any reason, don't
  report this as a failure for VOP_CLOSE.

PR:		270749
Reported by:	Jamie Landeg-Jones <jamie@catflap.org>
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D41925
2023-09-21 08:02:31 -06:00
Martin Matuska 969071be93 vfs: copy_file_range() between multiple mountpoints of the same fs type
VOP_COPY_FILE_RANGE(9) is now caled when source and target vnodes
reside on the same filesystem type (not just on the same mountpoint).
The check if vnodes are on the same mountpoint must be done in the
filesystem code. There are currently only three users - fusefs(5) already
has this check, ZFS can handle multiple mountpoints and a check has been
added to NFS client.

ZFS block cloning is now possible between all snapshots and datasets
of the same ZFS pool.

MFC after:	1 week
Reviewed by:	rmacklem
Differential Revision:	https://reviews.freebsd.org/D41721
2023-09-06 14:28:23 +02:00
Doug Rabson b5c4616582 Fix MNT_IGNORE for devfs, fdescfs and nullfs
The MNT_IGNORE flag can be used to mark certain filesystem mounts so
that utilities such as df(1) and mount(8) can filter out those mounts by
default. This can be used, for instance, to reduce the noise from
running container workloads inside jails which often have at least three
and sometimes as many as ten mounts per container.

The flag is supplied by the nmount(2) system call and is recorded so
that it can be reported by statfs(2). Unfortunately several filesystems
override the default behaviour and mask out the flag, defeating its
purpose. This change preserves the MNT_IGNORE flag for those filesystems
so that it can be reported correctly.

MFC after:	1 week
2023-08-26 12:08:37 +01:00
Dag-Erling Smørgrav e738085b94 Remove my middle name. 2023-08-17 15:08:30 +02:00
Warner Losh 78d146160d sys: Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:17 -06:00
Warner Losh 031beb4e23 sys: Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:58 -06:00
Warner Losh 685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -06:00
Warner Losh dfc016587a sys: Remove $FreeBSD$: two-line .c pattern
Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/
2023-08-16 11:54:30 -06:00
Warner Losh 71625ec9ad sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:24 -06:00
Warner Losh 2ff63af9b8 sys: Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:18 -06:00
Warner Losh 95ee2897e9 sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:11 -06:00
Konstantin Belousov 765ad5b28d tmpfs: add the "pgread" mount option to the allowed options list for mount
Fixes:	0f613ab85e
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-11 21:01:49 +03:00
Konstantin Belousov 0f613ab85e 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
2023-08-09 06:54:15 +03:00
John Baldwin 4af849d71f cd9660: Reject volumes with small logical block sizes
ISO9660 permits specifying a logical block size that is any power of 2
greater than or equal to 512.  The geom disk layer requires requests
to be aligned on sector boundaries of the provider.  With a volume
that uses a logical block size smaller than the underlying disk sector
size (e.g. a logical block size of 512 or 1024 on a CD which uses 2048
byte sectors), the current cd9660 vfs can issue requests for partial
sectors, or on non-sector boundaries.

Fixing this properly would require wrapping all of the calls to
bread*/bwrite* in cd9660 vfs to roundup requests to be on sector
boundaries which can include both the length, but also the starting
sector number (and thus requiring use of an offset relative to b_data
in the resulting buf).

These images do not seem to be common however given that no one has
fixed this in cd9660's vfs in the past few decades, so just reject
them during mount with an error.  If such images are found to be used
in the wild in practice, then the larger fix can be applied.

PR:		258063
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41228
2023-08-04 16:41:50 -07:00
John Baldwin c70e615051 udf: Reject read requests with an invalid length
- If the size is negative or if rounding it up to a multiple of
  the block size overflows, fail the read request with ERANGE.

- While here, add a sanity check that the ICB length for the root
  directory is at least as long as a minimum-sized file entry.

PR:		257768
Reported by:	Robert Morris <rtm@lcs.mit.edu>
MFC after:	1 week
Sponsored by:	FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41220
2023-08-04 16:40:19 -07:00
Konstantin Belousov 9e6941a2c7 udf: reject invalid block sizes from lvd
PR:	272893
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-05 01:49:36 +03:00
Gordon Bergling 11892bc710 nfsserver: Fix a typo in a source code comment
- s/restared/restarted/

MFC after:	3 days
2023-08-02 11:27:30 +02:00
Konstantin Belousov fa3cf6cdc6 cd9660: do not leak buffers in cd9660_rrip_loop()
Reported by:	 Robert Morris <rtm@lcs.mit.edu>
PR:	272856
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-01 01:55:13 +03:00
Konstantin Belousov 3905309dfe fdescfs: add a mount option rdlnk
which changes /dev/fd/N files types to symbolic link with the behavior
of symbolic links.

PR:	272127
Reported by:	Peter Eriksson <pen@lysator.liu.se>
Reviewed by:	dchagin
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40969
2023-07-13 04:14:20 +03:00
Konstantin Belousov 9c3bfe2ad0 Revert "VFS: Remove VV_READLINK flag" and "fdescfs: improve linrdlnk mount option"
This reverts commits 4a402dfe0b and
3bffa22623.

The fix will be implemented in somewhat different manner.  The semantic
adjustment is incompatible with linuxolator expectations.

Reported and reviewed by:	dchagin
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40969
2023-07-13 04:14:12 +03:00
Konstantin Belousov 7e4c6b2163 msdosfs: zero partially valid extended cluster
It contains arbitrary garbage, which is not cleared by vfs_bio_clrbuf()
which only zeroes invalid portions of the pages.

Reported by:	Maxim Suhanov <dfirblog@gmail.com>
Discussed with:	so
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-07-11 03:49:09 +03:00
Mateusz Guzik ba8cc6d727 vfs: use __enum_uint8 for vtype and vstate
This whacks hackery around only reading v_type once.

Bump __FreeBSD_version to 1400093
2023-07-05 15:06:30 +00:00
Konstantin Belousov 3bffa22623 fdescfs: improve linrdlnk mount option
Instead of using VV_READLINK vnode flag and checking it in one place,
just assign VLNK type to the Fdesc vnodes for linrdlnk mounts.  Then all
places where symlinks needs to be followed, e.g. lookup(), are handled.

PR:	272127
Reported by:	Peter Eriksson <pen@lysator.liu.se>
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40700
2023-06-27 13:43:17 +03:00