FreeBSD/src 7d98cf4 — usr.sbin/makefs/tests makefs_zfs_tests.sh, usr.sbin/makefs/zfs fs.c

makefs/zfs: count "." in the link count and size of dataset roots

The root directory of a dataset is populated from an fsnode that is the
"." entry of the staging directory, and its children are the siblings of
that node, so the loop that computes the link count and the size of the
directory (which expects "." among the children, as the nodes of the
other directories have) never counts it.  The link count of the root of
every dataset is one less than it should be (1 for an empty dataset
instead of 2, 19 instead of 20 for a root with 18 subdirectories), and
so is its size.

fts(3) trusts the link count of the directories of ZFS when called with
FTS_NOSTAT and FTS_PHYSICAL: it stops looking for subdirectories once it
has seen as many as the link count says, and does not descend into the
ones it did not look at.  As a result find(1), and rm(1) when it does
not need to stat the entries, silently skip directories of a pool made
by makefs.  On a root filesystem made by makefs, find / does not list
/etc at all.


    [13 lines not shown]
DeltaFile
+54-0usr.sbin/makefs/tests/makefs_zfs_tests.sh
+4-3usr.sbin/makefs/zfs/fs.c
+58-32 files

FreeBSD/src f190090 — sys/kern sched_ule.c sched_4bsd.c

sched: INVARIANTS: Check sched_preempt() is called on 'curthread'

sched_preempt() does not support operating on a remote thread.  If you
are looking to influence CPU allocation on another thread, see, e.g.,
cpuset_setthread(), which in the end calls sched_affinity().

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0sys/kern/sched_ule.c
+1-0sys/kern/sched_4bsd.c
+2-02 files

FreeBSD/src 79ca9f7 — sys/kern sched_ule.c

sched_ule: Use TDQ_CPU() macro instead of fiddling with DPCPU

No functional change (intended).

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/kern/sched_ule.c
+1-11 files

FreeBSD/src ea1da6a — sys/kern sched_ule.c

sched_ule: tdq_notify(): Fix a typo in a comment

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/kern/sched_ule.c
+1-11 files

FreeBSD/src a1fe7f0 — sys/kern sched_ule.c

sched_ule: sched_affinity(): Delineate steps

No functional change (intended).

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-2sys/kern/sched_ule.c
+4-21 files

FreeBSD/src d5e9c64 — sys/kern sched_ule.c

sched_ule: tdq_runq_add(): Scope variables, delineate the different steps

For better readability.

No functional change (intended).

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-3sys/kern/sched_ule.c
+5-31 files

FreeBSD/src d3aa926 — share/examples/sound oss.h

sound examples: trigger dsp devices via syncgroup

Triggering is only needed if device is in mmap mode, and in mmap example
the device is triggered as part of syncgroup. For non-mmap mode,
triggering is not needed at all. Triggering mmap'ed device too early
would start the IPTR/OPTR counters and that would cause those pointers
to be out of sync, so let syncgroup do the triggering once the device is
fully configured and ready for capture and playback.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D60839
DeltaFile
+15-26share/examples/sound/oss.h
+15-261 files

FreeBSD/src 041802b — tools/boot boot-test.json boot-test.sh

Add loongarch64 as an optional boot-test.sh arch

D59889 brings up a FreeBSD/loongarch64 EFI loader, none of it in
this tree yet. Add a disabled config entry (excluded from -A, usable
via -a once the port lands) using the confirmed QEMU virt/la464
recipe; hw/loongarch/virt.c defaults to virtio-blk/net, so the
existing generic EFI+GPT builder needs no arch-specific QEMU code.

loongarch64 has never had a FreeBSD release, so
install_minimal_userland's ISO extraction can never find one. Split
it into ISO and installworld-cross-build paths, selected by a new
no_release capability, so archs without a release can still get a
minimal userland.

Differential Revision:  https://reviews.freebsd.org/D59923
DeltaFile
+74-27tools/boot/boot-test.sh
+12-0tools/boot/boot-test.json
+86-272 files

FreeBSD/src bf37269 — sbin/nvmecontrol nvmecontrol.8 passthru.c

nvmecontrol: Use admin device for admin-passthru

When we're doing admin-passhtru, we need to use the admin device, not
the namespace device. So when we're passed in ndaX or nvdX, we need to
translate that to nvmeY for this command for the admin-passthru command,
but not the io-passthru command. Note namespace nuance in man page.

Differential Revision:  https://reviews.freebsd.org/D59878
DeltaFile
+25-8sbin/nvmecontrol/passthru.c
+2-2sbin/nvmecontrol/nvmecontrol.8
+27-102 files

FreeBSD/src 4623bbf — sbin/nvmecontrol nvmecontrol.8 format.c

nvmecontrol: select format by sector size

Add automatic selection of lbaf value based on a single sector size. The
lbas (the data sector size) is selected based on the power of 2 in the
sector size, and the metadata size is selected by the remainder. If an
lbaf matches these values is used, otherwise we exit with an error.
When there's a tie, we prefer the higher performance.

Manual selection of these values remains as well for times when we
select incorrectly.

Reviewed by:            seuros, chuck
Differential Revision:  https://reviews.freebsd.org/D59833
DeltaFile
+41-2sbin/nvmecontrol/format.c
+11-0sbin/nvmecontrol/nvmecontrol.8
+52-22 files

FreeBSD/src e65ccec — sys/dev/nvme nvme_ctrlr.c

nvme: Notify namespaces on reset sometimes

When we're resetting after a controller failure, and we fix the failure,
and we've not resetting as part of initialization, notify the all the
children devices of new namespaces. When we failed the controller
before, we removed all the namespaces.

Reviewed by:            seuros
Differential Revision:  https://reviews.freebsd.org/D59832
DeltaFile
+24-0sys/dev/nvme/nvme_ctrlr.c
+24-01 files

FreeBSD/src ee96770 — sbin/nvmecontrol format.c

nvmecontrol: Fix mixup between pi and pil

pi and pil were extracted from the incorrect place. Swap how we get/set
there to be correct. However, since these are always 0, this is a nop.
DeltaFile
+4-4sbin/nvmecontrol/format.c
+4-41 files

FreeBSD/src 3b66efc — sbin/nvmecontrol nvmecontrol.8 format.c

nvmecontrol: add format dry-run support

Add -n/--dry-run to resolve and print the Format NVM command without
submitting it. This lets users verify namespace selection and format
parameters before making destructive media changes.

Reviewed by:            seuros, chuck
Differential Revision:  https://reviews.freebsd.org/D59835
DeltaFile
+17-5sbin/nvmecontrol/format.c
+5-0sbin/nvmecontrol/nvmecontrol.8
+22-52 files

FreeBSD/src b991e2d — sbin/nvmecontrol nvmecontrol.8 format.c

nvmecontrol: support controller-wide sector sizes

Extend sector-size selection to controller-wide formats when every
namespace has one compatible format index and matching effective
metadata and protection settings. Reject ambiguous or inconsistent
layouts so heterogeneous fleets can request a sector size without
risking an unintended controller-wide format.

Reviewed by:            seuros, chuck
Differential Revision:  https://reviews.freebsd.org/D59834
DeltaFile
+102-24sbin/nvmecontrol/format.c
+11-3sbin/nvmecontrol/nvmecontrol.8
+113-272 files

FreeBSD/src 15cd852 — sys/dev/nvme nvme_ctrlr.c

nvme: honor Linux passthrough command timeouts

Now that we have per-command timeouts, allow linux-compat ioctls to have
a passed-in timeout.

Reviewed by:            seuros, chuck
Differential Revision:  https://reviews.freebsd.org/D59829
DeltaFile
+1-1sys/dev/nvme/nvme_ctrlr.c
+1-11 files

FreeBSD/src 66c24c9 — sys/dev/nvme nvme_ctrlr.c

nvme: Refactor namespace notifications for additions

When we add a namespace, we have the code inline to do the
notifications. Refactor ahead or reuse.

Reviewed by:            seuros
Differential Revision:  https://reviews.freebsd.org/D59831
DeltaFile
+17-11sys/dev/nvme/nvme_ctrlr.c
+17-111 files

FreeBSD/src 1c31ef4 — sys/dev/nvme nvme_ctrlr.c nvme_private.h

nvme: support per-request timeouts

Allow different timeouts per command.

Reviewed by:            seuros, chuck
Differential Revision:  https://reviews.freebsd.org/D59828
DeltaFile
+11-6sys/dev/nvme/nvme_qpair.c
+5-3sys/dev/nvme/nvme_private.h
+1-1sys/dev/nvme/nvme_ctrlr.c
+17-103 files

FreeBSD/src 5258b44 — sys/dev/nvme nvme_private.h nvme_ctrlr.c

nvme: add a timeout for Format NVM commands

Format commands need a longer timeout.

Reviewed by:            seuros, chuck
Differential Revision:  https://reviews.freebsd.org/D59827
DeltaFile
+21-0sys/dev/nvme/nvme_sysctl.c
+6-0sys/dev/nvme/nvme_ctrlr.c
+3-0sys/dev/nvme/nvme_private.h
+30-03 files

FreeBSD/src 894f70a — lib/libthr/thread thr_join.c

libthr: drop use of try_gc in the end of thr_join

thr_try_gc unlock and lock again to make sure the lock order. However,
there is no reason for such roundtrip if the caller holds the correct
oder. As a result, we create a new helper function to add the thread
to gc list without unlock + lock and wire the join_common to this new helper.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D60717
DeltaFile
+18-12lib/libthr/thread/thr_join.c
+18-121 files

FreeBSD/src 306d71f — share/termcap termcap

termcap: add missing capabilities to the xterm-ghostty entry

(cherry picked from commit 3ceb5f150bc121f5e6a3e0cc8b289279338405a1)
DeltaFile
+13-2share/termcap/termcap
+13-21 files

FreeBSD/src a57e6db — share/termcap termcap

termcap: add missing capabilities to the xterm-ghostty entry

(cherry picked from commit 3ceb5f150bc121f5e6a3e0cc8b289279338405a1)
DeltaFile
+13-2share/termcap/termcap
+13-21 files

FreeBSD/src bdaddb7 — sys/net iflib.c

iflib: Pass up the frames received before a descriptor error

When the driver's isc_rxd_pkt_get() fails part way through a receive
pass, iflib_rxeof() jumps straight to the reset request.  The frames it
already took off the ring and chained for if_input() are neither passed
up nor freed, so up to budget - 1 frames are lost and their mbufs and
clusters leak on every such error, and the frames queued to LRO in the
pass wait for the next one.  Leave the loop instead, pass the chain up
and flush LRO as on the normal exit, then request the reset as before,
without refilling.

The path is reachable from several drivers: igc, em, igb and ixgbe
return EBADMSG for frames received with errors, which the hardware
passes up only with store-bad-packets enabled; ixl, iavf and ice for
every descriptor flagged RXE; aq, enetc, mgb and enic for descriptors
they cannot use.

Reviewed by:            gallatin
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60805
DeltaFile
+16-11sys/net/iflib.c
+16-111 files

FreeBSD/src c78d702 — sys/dev/iwn if_iwn.c

iwn: fix TX QoS AC -> TID mapping for A-MPDU selection

Map the packet QoS value to a TID before looking it up in the
per node + TID AMPDU state array.

The TX A-MPDU state used to be per-AC, but I changed it to be
per-TID because it /is/ negotiated per-TID.  However this is
not aligned correctly and A-MPDU on eg the voice queue would
cause a mismatch and thus packets to get dropped.

(TIDs 8..15 are special and session based, not traffic QoS based.)

I noticed this because "ssh host" failed after a while, but
"telnet host 22" succeeded.  It turned out that frames weren't
making it to the driver transmit path and I traced it
back to being dropped here.  Traffic worked for a while until
A-MPDU TX was negotiated, and then all traffic on a TID
would fail until the 802.11 association was re-established.


    [7 lines not shown]
DeltaFile
+11-1sys/dev/iwn/if_iwn.c
+11-11 files

FreeBSD/src 5bf3e2a — sys/fs/nfsclient nfs_clvfsops.c

nfs_clvfsops.c: Set readahead to 15 for RDMA

MFC after:      1 month
Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
DeltaFile
+1-1sys/fs/nfsclient/nfs_clvfsops.c
+1-11 files

FreeBSD/src 49e3c25 — usr.sbin/bsdinstall/scripts zfsboot

bsdinstall: use the GPT label for swap in fstab

The GPT layout already labels the swap partition swapN, but fstab
named the disk device. That name changes when disks are added or
reordered, and swap does not come up until fstab is edited. Write
/dev/gpt/swapN instead, appending .eli when swap encryption is on.
Mirrored swap still uses /dev/mirror/swap, with the same suffix.

Submitted by:   Wanpeng Qian <wanpengqian at gmail.com>
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D32936
DeltaFile
+18-13usr.sbin/bsdinstall/scripts/zfsboot
+18-131 files

FreeBSD/src 976de60 — sys/arm64/arm64 pmap.c

arm64 pmap: optimize TLB management by pmap_update_entry()

To date, pmap_update_entry() has unconditionally passed false as
final_only to pmap_s1_invalidate_range().  Passing false means that we
invalidate the intermediate "page walk cache" entries in the TLB as well
as the leaf that is being replaced. However, invalidating intermediate
entries is only necessary when doing a superpage promotion that replaces
a pointer to a page table page by a large page mapping.

(cherry picked from commit b2e6b6545ee6377a1c8bc2b0a5bcc4cb605a8283)
DeltaFile
+17-13sys/arm64/arm64/pmap.c
+17-131 files

FreeBSD/src 3593be3 — lib/libsbuf/tests sbuf_string_test.c sbuf_stdio_test.c

sbuf(3): clean up tests

- Update the copyright dates and add "Joao Bonifacio" to the top of
  `sbuf_core_test.c`.
- Use `SPDX-Identifier` instead of longform copyright tort.
- Remove `sbuf_test_common.h`: the header was originally added to help
  with the 10.x/11.x split, but is no longer needed given that those
  releases have been EOLed for multiple years now.

MFC after:      1 week
DeltaFile
+4-37lib/libsbuf/tests/sbuf_core_test.c
+0-37lib/libsbuf/tests/sbuf_test_common.h
+2-23lib/libsbuf/tests/sbuf_string_test.c
+2-23lib/libsbuf/tests/sbuf_stdio_test.c
+8-1204 files

FreeBSD/src 642b3d9 — lib/libsbuf/tests sbuf_core_test.c

sbuf(3): increase test coverage

This change adds additional explicit test coverage for the following
sbuf(3) APIs:
- sbuf_clear_flags
- sbuf_get_flags
- sbuf_set_flags

While here, add a missing `sbuf_delete` to `sbuf_drain_ret0_test`: while
it isn't strictly required (the library's state is cleaned up shortly
after the test process ends), tools such as Coverity and LSAN flag
issues with leaked memory. Adding the sbuf_delete(3) call to the test
quells that issue.

MFC after:      1 week
Reviewed-by:    ngie
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2367
DeltaFile
+77-10lib/libsbuf/tests/sbuf_core_test.c
+77-101 files

FreeBSD/src 23ab9a9 — lib/libsbuf/tests sbuf_core_test.c

Revert "sbuf(3): increase test coverage"

ghpr doesn't seem to do a `git status` prior to allowing someone to push
changes (bug pending). Revert the change so the properly tested one can
be pushed into the tree.

This reverts commit 760efcc775c304d175a360dddf499a7b0d5e3935.
DeltaFile
+13-77lib/libsbuf/tests/sbuf_core_test.c
+13-771 files

FreeBSD/src 760efcc — lib/libsbuf/tests sbuf_core_test.c

sbuf(3): increase test coverage

This change adds additional explicit test coverage for the following
sbuf(3) APIs:
- sbuf_clear_flags
- sbuf_get_flags
- sbuf_set_flags

While here, add a missing `sbuf_delete` to `sbuf_drain_ret0_test`: while
it isn't strictly required (the library's state is cleaned up shortly
after the test process ends), tools such as Coverity and LSAN flag
issues with leaked memory. Adding the sbuf_delete(3) call to the test
quells that issue.

MFC after:      1 week
Reviewed-by:    ngie
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2367
DeltaFile
+77-13lib/libsbuf/tests/sbuf_core_test.c
+77-131 files