nfs_clrpcops.c: Fix acquisition of post-op attributes for link
Without this patch, the link RPC (done by nfsrpc_link()) did not
acquire post link operation attributes for the file object for NFSv4.
For some recent Linux NFSv4 servers that support delegations, this
would result in the client's cached attribute for st_nlinks not being
increased right away, because the delegation would indicate that the
now stale cached attributes were still valid.
This patch fixes the problem by acquiring post link attributes and
updating the client's cached copy in the same manner as the NFSv3
RPC did.
Detected at the recent NFSv4 Bakeathon testing event.
Applications will only be affected if they examine st_nlinks after
a new hard link is created for a file object.
MFC after: 2 weeks
EC2: Remove old broken_txfifo workaround
Early versions of Xen, including those used in the early days of EC2,
had a bug in their UART emulation whereby the TX FIFO wouldn't send the
expected interrupt when emptying; as a result, FreeBSD would write 16
characters to the serial console and then stop because we thought the
FIFO was forever full.
In 2013 (1c60b24baa50) I added a loader tunable "hw.broken_txfifo"
which spinwaits for the FIFO TX rather than relying on the interrupt,
and enabled this in loader.conf in EC2 images.
A decade later, this workaround is almost certainly no longer needed in
EC2 -- most instances don't run Xen, and the bug was long since fixed
in Xen anyway -- but we've been holding on to the workaround "just in
case". Unfortunately, the spinwait behaviour is causing latency spikes
and triggering warnings from the ena(4) driver.
This commit removes the hw.broken_txfifo setting from loader.conf in
[11 lines not shown]
committers-src: add myself (kgalazka@)
Add kgalazka@ (myself) as new src committer
with erj@ and kbowling@ as mentors.
Signed-off-by: Krzysztof Galazka <kgalazka at FreeBSD.org>
Reviewed by: kbowling, erj
Approved by: erj (mentor)
Differential Revision: https://reviews.freebsd.org/D50332
LinuxKPI: 802.11: make sure AUTH frames are not being sent if BSS changed
iwlwifi keeps logging 'Invalid TXQ id' even after previous changes to
catch the BSS changed. The reason for this is that we do not error in
the SCAN -> AUTH path as otherwise we would not have the state machine
get us back to SCAN to clear up firmware state before auth/assoc to the
new BSS.
If we are not in synch as net80211 just swapped the iv_bss from under us,
disable the TX queue for the (old) lsta to prevent the AUTH frame sent
from sta_newstate() reaching the driver. After all we are not trying to
authenticate to that node (sta) anymore.
Sponsored by: The FreeBSD Foundation
PR: 274382
Approved by: re (cperciva)
(cherry picked from commit 16d987fe781780100a31df30b9edd79ebb54f957)
(cherry picked from commit e0692e7bb6e8abcc55a2510dceea5f83e823a827)
libusb: add SUPER_PLUS in speed enum.
Summary:
Some application(like usbmuxd) start to use LIBUSB_SPEED_SUPER_PLUS now.
Though we don't have the corresponding infra in kernel right now, it is
harmless to have this enum value in userspace to prevent the compile error
Reviewed By: bapt
Sponsored By: FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50359
iwlwifi: update man pages for generations, firmware. and 11n/11ac
Put Intel's iwlwifi better in context to iwm, iwx and iwn.
Document the important tunables so users know where to go.
Document the port/package for firmware where firmware is now
maintained.
Adjust wording and table for the firmware and a flavor column.
Update History sections for 11n/11ac support as well as firmware
module removal from base.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: ziaee, emaste (comments)
Differential Revision: https://reviews.freebsd.org/D50319
iichid(4): Do not send packets read in interrupt handler to hidbus
if no hidbus and hidbus clients were attached and opened by users.
iichid(4) enables interrupts before hidbus is attached and sending
packets to it at this time leads to panic at boot time.
Fixes: daa098cc37b9 ("Wait for RESET command response while attaching")
Tested by: dch
PR: 286045
MFC with: daa098cc37b9
(cherry picked from commit 2abdb305bd0c105226f6a71a8d3dc89698c9ef6b)
iichid(4): Read wMaxInputLength bytes over I2C even if we discards data
For some devices e.g. ITE5570 it is not enough to read HID-over-I2C
input length header of RESET command response to acknowledge interrupt.
Do a full-size read to avoid interrupt storm.
Sponsored by: Future Crew LLC
MFC after: 2 month
Differential Revision: https://reviews.freebsd.org/D48957
(cherry picked from commit 548d3aa856a97f4483554beceeb57fa9ba0ff913)
ig4_iic: Allow sleeping if called from iichid interrupt handler.
This replaces 50 ms busy loop with mtx_sleep for the same duration thus
saving CPU time when iichid is driven with interrupts.
Sponsored by: Future Crew, LLC
MFC after: 2 month
Differential Revision: https://reviews.freebsd.org/D48956
(cherry picked from commit c7225a3ede3cf99c538158962f4d65dee435bbcd)
vfs: vntblinit(): Raise default 'kern.maxvnodes' higher than 'kern.maxfiles'
Having 'kern.maxvnodes' higher than 'kern.maxfiles' mitigates a scenario
where some processes can eat up all vnodes in the system, causing
a deadlock, as long as the kernel itself does not create too many vnodes
without creating some file descriptor in some process' FD table. A very
small percentage (~0.6%) of excess vnodes at infinity, coupled with
a large difference near the origin, should cover basic cases more than
enough. Note however that this measure can be defeated, e.g., by using
nullfs mounts with non-trivial file hierarchies.
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50314
subr_devmap: Implement pmap_mapdev with pmap_mapdev_attr
We can now support pmap_mapdev_attr on arm. Switch to use this to
implement pmap_mapdev to reduce duplicate code.
Reviewed by: mhorne, mmel
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D50309
subr_devmap: Add the function name to KASSERT
These messages are almost identical, other than one has " 2" appended.
Change this to include the function name at the start to make it more
obvious which function the KASSERT is from.
Reviewed by: mhorne, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D50308
arm: Make the pmap_kenter signature like arm64
To support a common pmap_mapdev_attr change pmap_kenter to include the
size any memory type in the signature.
Reviewed by: mhorne
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D50307
vfs: vntblinit(): Rework comments on the computation of 'kern.maxvnodes'
Remove the parts that describe what is already in the code formula. Add
hints about which of 'physvnodes'/'virtvnodes' takes precedence, and
when 'desiredvnodes' becomes smaller than 'maxfiles'. These were both
computed analytically and verified experimentally.
Reviewed by: kib (older version)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50310
Revert commit 1935cc945642 ("vfs: vntblinit(): Rework comments on...")
This is because the Differential Revision tag was wrong. Will be recommitted shortly.
vfs: vntblinit(): Rework comments on the computation of 'kern.maxvnodes'
Remove the parts that describe what is already in the code formula. Add
hints about which of 'physvnodes'/'virtvnodes' takes precedence, and
when 'desiredvnodes' becomes smaller than 'maxfiles'. These were both
computed analytically and verified experimentally.
Reviewed by: kib (older version)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50130
Compute 'maxproc'/'maxfiles' from memory amount; Expand/fix comments
Change the formulae so that 'maxproc' and 'maxfiles' are computed based
on the physical memory amount, and not the corresponding number of
pages. Make sure that the practical results are unchanged for all
architectures (which is possible since all have 4096 as their
PAGE_SIZE). Despite this, we do this change to make it clearer how many
units of these values are computed per MB, which is easier on readers.
Change the comments accordingly and expand them to indicate which parts
of the computations are actually not used by default. In passing, fix the
comments about default values and limits for 'maxfiles' (they were off).
No functional change (intended).
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50124
powerpc: Always use BE tag in nexus_map_resource
7b5a5e4e replaced nexus_activate_resource() with the bus generic
equivalent, which uses bus_map_resource(). However, though not intended
to have a functional change, nexus_map_resource() uses the bus tag of
the build (BE vs LE), while nexus_activate_resource() always explicitly
set a big-endian tag, leading to failures on powerpc64le now. Using BE
unless otherwise explicitly specified with the RF_LITTLEENDIAN fixes LE
on bare metal, and doesn't hurt in a VM, which nexus_map_resource() was
added for.
Reported by: pkubaj
Tested by: pkubaj
Fixes: 7b5a5e4e("powerpc nexus: Use bus_generic_rman_*")
MFC after: 1 day
Approved by: re(cperciva)
(cherry picked from commit c4921a0faaf1683f39347dd066000d929c39c8b9)
(cherry picked from commit 45d585ab7f222ca36988c406df528128a17f9884)
cp: Avoid prepending ./ in file-to-file case.
* Make to.base large enough to hold a trailing separator.
* Remove the separator from warning and error messages.
* In the FILE_TO_FILE case, leave to.base empty.
* In the FILE_TO_DIR and DIR_TO_DNE cases, append a separator to
to.base once we've (optionally created and) opened it.
* Thus, in the file-to-file case, we print an empty string followed by
to.path, while in all other cases, to.base already contains the
necessary separator.
This fixes failures in tests that used cp and expected a specific
error message and were surprised to see "./" pop up.
Fixes: 82fc0d09e862
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50357