Shared vs. exclusive locking is determined not by MNT_EXTENDED_SHARED
but by MNT_SHARED_WRITES (although there are several places that
ignore this and simply always use an exclusive lock). Also add a
comment on the possible difference between VOP_GETWRITEMOUNT(vp)
and vp->v_mount on this path.
Found by local testing of unionfs atop ZFS with DEBUG_VFS_LOCKS.
Reviewed by: kib, olce
Differential Revision: https://reviews.freebsd.org/D43816
(cherry picked from commit 9530182e371dee382b76d8594f65633a304b396f)
The sample rate selection of snd_uaudio(4) at runtime was implicitly
relying on a specific order in the device config list. In case a default
was set through the hw.usb.uaudio.default_rate sysctl tunable, commit
42fdcd9fd917 removed a duplicate sample rate entry from that list, which
inadvertently broke sample rate selection at runtime. Implement sample
rate selection in a way that works for any order in the device config
list.
Reported by: Lexi Winter <lexi@le-fay.org>
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D44051
(cherry picked from commit a9341f0f0ae01b4d249dbf3bacfa420152c46aef)
The last example in the manpage md5(1) wants to demonstrate
GNU mode (md5sum), but uses BSD mode (md5) instead:
In GNU mode, the -c option does not compare against a hash string
passed as parameter. Instead, it expects a digest file,
as created under the name digest for /boot/loader.conf in
the example above.
PR: 276560
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D44098
(cherry picked from commit 865baeaf1abeb14327ad6a4a1f8ce722e242ff73)
The manpage of nvmecontrol(8) has the following SYNOPSIS:
nvmecontrol format [-f fmt] [-m mset] [-o pi] [-l pil] [-E]
[-C] <device-id | namespace-id>
The correct switch for the pi option is -p according
to sbin/nvmecontrol/format.c:
OPT("pi", 'p', arg_uint32, opt, pi, "Protective information")
So correct the SYNOPSIS section accordingly.
PR: 276554
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44099
(cherry picked from commit 77f6c0ce92888d047d91e87b931242403764902b)
The specification follows a commentary to the function parse_part()
in the source code and the code itself.
(cherry picked from commit d1797fb5bbaeb212501a72b916d647fb2e021d50)
Fixing the error messages when detaching the mana gdma devices
showed in dmesg: "Device leaked memory resources".
Reported by: NetApp
MFC after: 3 days
Sponsored by: Microsoft
(cherry picked from commit 47e99e5bc5bcfa621fe6a3e62386f227c47e8cff)
The cleanup of d854370fa86b7 had a cut and paste error (so f_verssort
was set to 1 and then to 0 rather thame f_timesort being set to 0).
Fixes: d854370fa86b7
Sponsored by: Netflix
(cherry picked from commit ef75877fc2d93199aab2b509089136c433af1f20)
Since TCPHPTS is now included in the GENERIC kernel, remove the
documented dependency of it from the tcp_rack(4) and tcp_bbr(4)
manual pages.
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43084
(cherry picked from commit 4fb5eda6493c3dada695efbfad0a44d204b7fc5e)
This is a migitation to avoid sudden extreme jumps in
cwnd, as t_epoch can be very out of date after an RTO.
Per RFC9438, sec 4.8, t_epoch is to be reset whenever
cwnd grows beyond ssthresh (CC phase transitions from
slow start to congestion avoidance), to be fixed with
the upcoming cc_cubic changes.
MFC after: 3 days
Reviewed By: cc, #transport
Sponsored by: NetApp, Inc
Differential Revision: https://reviews.freebsd.org/D44023
(cherry picked from commit 038699a8f18a0a651ee06b85fa1dbbee1eab56f1)
Make sure the divident is at least one. While cwnd should
never be smaller than t_maxseg, this can happen during
Path MTU Discovery, or when TCP options are considered
in other parts of the stack.
PR: 276674
MFC after: 3 days
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43797
(cherry picked from commit 38983d40c18ec5705dcba19ac320b86c5efe8e7e)
Just skip compiling this file if RACCT isn't defined. This allows to
skip including headers that no code uses at all, and also to remove the
whole file's #ifdef/#endif bracketing.
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7fa08d415283c9a0c1e2b57edfbb13d722c25735)
Approved by: emaste (mentor)
If RCTL is not defined, only the system call stubs returning ENOSYS are
compiled in. In this case, don't waste time including most headers
since their code is not used.
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e0205aa325c0936ccdd0e635576875786c41f6c3)
Approved by: emaste (mentor)
Necessary to have the definition of 'struct timespec'.
No functional change.
Approved by: markj (mentor)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit bcaa0b4c2bab2866d5ee11c9eb8900a70bdb21e1)
Approved by: emaste (mentor)
Avoid duplicating common flags for the preempted and non-preempted
cases, making it clear that they are the same without resorting to
formatting.
No functional change.
Approved by: markj (mentor)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 6a3c02bc52892eb09c3b766562b8ddb452c393a9)
Approved by: emaste (mentor)
snd_uaudio(4) selects the first maching rate/channel/bit/format/buffer
configuration for use during attach, even though it will print the rest
of the supported configurations detected. To make this clear, mark the
selected playback and recording configurations with a "selected" string.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D43766
(cherry picked from commit f60e99f45e8197de2bc0970c7dd7f87148fdaf30)
Let the USB audio descriptor iteration detect configurations with more
channels and larger sample size, even when the following global sysctl
tunables are set to a lower value:
hw.usb.uaudio.default_channels hw.usb.uaudio.default_bits
This improves utility and is closer to the meaning of default.
Also, do not create duplicate sample rate entries.
MFC after: 2 weeks
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D43679
(cherry picked from commit 42fdcd9fd917764d84edcc43e252a90cade78f80)
Adapt the length of the driver side audio buffer to the USB transfer
interval, which is adjustable through the buffer_ms tunable. This
eliminates unnecessary latency in USB audio playback.
To reduce power consumption caused by frequent CPU wakeups, increase the
default buffer_ms value to 4ms. In combination with adaptive buffer
length, this still results in less roundtrip latency compared to the
previous 2ms default.
Extend the buffer_ms value range to 1ms for low latency applications.
MFC after: 2 weeks
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D41942
(cherry picked from commit b2e97edffdab6ad1e9103a6bbe90300d78a961ed)
We have BASEPATH defined.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D43812
(cherry picked from commit 53c768e6836a32c8dcd0b0b422a169ef7a82a3ab)
If we use the -d option to change the default unit, close the current
mixer and open the one we set as the default to avoid printing and
applying changes (if any) to the old one.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D43809
(cherry picked from commit 5daa7cf42f4551cb2f4a452fd038807925320eac)
The input options of "dev.mute" (+, -, ^) and "dev.recsrc" (+, -, ^, =)
are quite cryptic. Allow the input to also be an actual description of
what these options do.
+ -> add (recsrc)
- -> remove (recsrc)
^ -> toggle (recsrc, mute)
= -> set (recsrc)
0 -> off (mute)
1 -> on (mute)
Also, deprecate the use of the symbol options in the EXAMPLES section of
the man page, by using the new descriptive options.
In the future, we might want to get rid of the symbol options
altogether, but preserve backwards compatibility for now.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, imp
Differential Revision: https://reviews.freebsd.org/D43796
(cherry picked from commit cc7479d7dc9b895c0a2f4d3805315437e03d0cf6)
246e0457d93071ffd901c78e3ee7badc5f51bd4c ("mixer.8: Add terse example
for increasing volume") mentions that the example changes the volume of
the "first mixer found", while the example shows how the change the
volume of the current mixer's "vol" device. Re-phrease sentence to
reflect the actual behavior of the command.
Also, improve the example by using the % operator, instead of hardcoding
0.05.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D43795
(cherry picked from commit 7bd14d09a92a63f217ccee92e7fc9a1d6d60b387)
The -d option is a wrapper around hw.snd.default_unit. Currently
mixer(8) expects the option argument to be just the unit's number (e.g
pcm0 -> 0). To avoid confusion, allow full device names of the form
"pcmN" as well.
While here, improve the -d option's description in the man page.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, imp
Differential Revision: https://reviews.freebsd.org/D43794
(cherry picked from commit 75be886e58dc237b633104fc9cf8d7d1285e4003)
In 922337e8d398 I added MOVED_LIBS into list-old-files, so that
delete-old-files would remove the old /usr/lib/libc++.so.1 as soon as
possible (after the library moved to /lib).
I left it in list-old-libs in case a user updated their src tree between
delete-old-files and delete-old-libs. Now that some time has passed,
tremove the redundant MOVED_LIBS entry.
PR: 272642
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f38bad0ab0fca9b1f665b2ba79098edf993c0854)
These days, the entries are the identical for GPT and MBR.
Reviewed by: manu, karels, imp
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43847
(cherry picked from commit 94b86c12f14e69ace1bffe23c15c77a7def23216)
When setting a permanent ARP entry, the route(4) would use
rtm->rtm_rmx.rmx_expire == 0 as a flag for installing a static entry, but
netlink(4) is looking for explicit NTF_STICKY flag in the request. The
arp(8) utility was adopted to use netlink(4) by default, but it has lots
of route-era guts internally. Specifically there is global variable 'opts'
that shares configuration for both protocols, and it is still initialized
with route(4) specific RTF_xxx flags. In set_nl() these flags are
translated to netlink(4) parameters. However, RTF_STATIC is a flag that is
never set by default, so attempt to use it as a proxy flag manifesting
-s/-S results in losing it. Use zero opts.expire_time as a manifest of
-s/-S operation. This is a minimal fix. A better one would be to fully
get rid of route(4) legacy.
The change also corrects the logic to set NUD_PERMANENT flag for
consistency. This flag is ignored by our kernel (now).
Reviewed by: melifaro, tuexen, emaste
PR: 277063
Fixes: 6ad73dbf65
Differential Revision: https://reviews.freebsd.org/D43983
(cherry picked from commit 6a3e87e1306d5058d63f7552a25ed6376422f658)