NAS-141786 / 26.0.0-RC.1 / Merge catalog update onto current config before persisting (by Qubad786) (#19318)
## Problem
`catalog.update` wrote the raw partial request straight to the datastore
and validated it directly. Because `CatalogUpdate` is a for-update
model, a call that omits `preferred_trains` left the field as the
`undefined` sentinel — so on ENTERPRISE systems
`OFFICIAL_ENTERPRISE_TRAIN not in data.preferred_trains` raised a
TypeError, and any partial write could drop the existing trains.
## Solution
Read the current config, merge the incoming update onto it, then
validate and persist the merged result so partial updates keep untouched
fields. Only `preferred_trains` is written back, since it's the sole
stored column.
Original PR: https://github.com/truenas/middleware/pull/19314
Co-authored-by: M. Rehan <mrehanlm93 at gmail.com>
[flang][OpenMP] Check the context of the declare_simd directive (#209318)
OpenMP 6.0, 9.8 "declare_simd Directive", restricts the placement of the
directive:
Any declare_simd directive must appear in the specification part of a
subroutine subprogram, function subprogram, or interface body to which
it applies.
Flang did not enforce this, and accepted the directive in the
specification part of a module, submodule, main program or block data.
Note: the restriction requiring the argument to name the procedure to
which the directive applies is not implemented here.
Fixes #205478
NAS-141780 / 26.0.0-BETA.3 / Use get_clones() for clone destruction during rollback (by anodos325) (#19316)
Use the built-in method for snapshot objects `get_clones()` rather than
trying to read and parse the libzfs dataset clones property.
Original PR: https://github.com/truenas/middleware/pull/19315
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-141780 / 26.0.0-RC.1 / Use get_clones() for clone destruction during rollback (by anodos325) (#19317)
Use the built-in method for snapshot objects `get_clones()` rather than
trying to read and parse the libzfs dataset clones property.
Original PR: https://github.com/truenas/middleware/pull/19315
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
snd_uaudio: Initialize mixer_lock with MTX_RECURSE
Fixes: fc9dc8482396 ("snd_uaudio: Lock usbd_transfer_start() in uaudio_mixer_ctl_set()")
PR: 296682
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fix a potential 1-byte buffer overflow in usbd_get_string_desc(). The code
allows for a transfer of up to 255 bytes but the struct behind the
usb_string_descriptor_t type is only 254 bytes. This is because USB
strings are UTF-16 and that leaves a single byte that can't be used in
a meaningful way. So truncating transfer to 254 bytes should not break
devices that are already broken. Found by Andrew Griffiths.
ok jsg@, deraadt@
18217 pseudo nexus children should not attach as instance -1
Reviewed by: Robert Mustacchi <rm at fingolfin.org>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
18211 Convert the posix_spawn man pages to mdoc(7)
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
Merge catalog update onto current config before persisting
## Problem
`catalog.update` wrote the raw partial request straight to the datastore and validated it directly. Because `CatalogUpdate` is a for-update model, a call that omits `preferred_trains` left the field as the `undefined` sentinel — so on ENTERPRISE systems `OFFICIAL_ENTERPRISE_TRAIN not in data.preferred_trains` raised a TypeError, and any partial write could drop the existing trains.
## Solution
Read the current config, merge the incoming update onto it, then validate and persist the merged result so partial updates keep untouched fields. Only `preferred_trains` is written back, since it's the sole stored column.
(cherry picked from commit 3c55f77854ef95e7fa521766ecc60cd5f14c859d)
NAS-141786 / 27.0.0-BETA.1 / Merge catalog update onto current config before persisting (#19314)
## Problem
`catalog.update` wrote the raw partial request straight to the datastore
and validated it directly. Because `CatalogUpdate` is a for-update
model, a call that omits `preferred_trains` left the field as the
`undefined` sentinel — so on ENTERPRISE systems
`OFFICIAL_ENTERPRISE_TRAIN not in data.preferred_trains` raised a
TypeError, and any partial write could drop the existing trains.
## Solution
Read the current config, merge the incoming update onto it, then
validate and persist the merged result so partial updates keep untouched
fields. Only `preferred_trains` is written back, since it's the sole
stored column.
Use get_clones() for clone destruction during rollback
_destroy_newer_snapshots() read the CLONES property via
get_properties(), which raises RuntimeError on a clone-less snapshot.
That is not a ZFSException, so it escaped the surrounding handler and
could abort the whole rollback. get_clones() returns an empty tuple
instead, and drops the comma-split parsing.
(cherry picked from commit 5222abbb1eaae678520efca1a4a33a81efb6958a)
Use get_clones() for clone destruction during rollback
_destroy_newer_snapshots() read the CLONES property via
get_properties(), which raises RuntimeError on a clone-less snapshot.
That is not a ZFSException, so it escaped the surrounding handler and
could abort the whole rollback. get_clones() returns an empty tuple
instead, and drops the comma-split parsing.
(cherry picked from commit 5222abbb1eaae678520efca1a4a33a81efb6958a)
NAS-141780 / 27.0.0-BETA.1 / Use get_clones() for clone destruction during rollback (#19315)
Use the built-in method for snapshot objects `get_clones()` rather than
trying to read and parse the libzfs dataset clones property.
[orc-rt] Make noDispatch test helper fail in -Asserts builds. (#209493)
noDispatch guards Sessions that must never dispatch a wrapper call, but
it did so with assert(false), which compiles out under NDEBUG.
Replace the assert with ADD_FAILURE(), which records a failure in every
build mode, and then complete the call via its Return continuation with
an out-of-band error. Completing the call means a caller awaiting the
result unblocks and fails too, rather than hanging, even when the
dispatch arrives on a non-test thread where ADD_FAILURE() alone may not
be observed.
Make ios_base::xalloc non-atomic with LIBCXX_ENABLE_THREADS=OFF. (#208356)
762b77a moved the definition of "xindex" out of the header, and in the
process dropped the _LIBCPP_HAS_THREADS check. Re-add the check to
maintain the status quo.
The discussion on https://github.com/llvm/llvm-project/pull/198994
indicates it's not clear whether LIBCXX_ENABLE_THREADS=OFF is actually
supposed to mean single-threaded. But it clearly does in practice:
atomic_support.h uses non-atomic ops when threads are disabled, and a
few other APIs have explicit non-atomic fallback paths.
My team ran into this trying to run libc++ tests for a RISC-V core
without the "a" extension.
[libc++] Compute a confidence interval in compare-benchmarks (#208090)
When comparing benchmark results with more than one sample per
benchmark, compute a confidence interval and flag rows that are
statistically significant. This should make the A/B comparison PR job
more robust to noise and easier to rely on. After this change, output
for a multi-sample run looks like:
```
Benchmark Baseline Candidate Difference % Difference Significant? 95% C.I. of %diff
------------------------------ ---------- ----------- ------------ -------------- -------------- -------------------
std::any_of(list<int>)/32 39.92 39.22 -0.70 -1.75% [-6.5%, +1.6%]
std::any_of(list<int>)/32768 54071.34 65395.51 11324.17 20.94% [-2.8%, +34.5%]
std::any_of(list<int>)/50 67.39 69.08 1.69 2.51% x [+0.2%, +4.7%]
std::any_of(list<int>)/8 7.21 6.46 -0.75 -10.40% x [-25.0%, -0.7%]
std::any_of(list<int>)/8192 21745.58 22299.32 553.74 2.55% [-20.3%, +38.4%]
std::any_of(vector<int>)/32 24.21 14.61 -9.60 -39.65% x [-41.2%, -38.4%]
std::any_of(vector<int>)/32768 24365.14 12498.21 -11866.93 -48.70% x [-48.9%, -48.6%]
Geomean 324.15 247.83 -76.32 -23.54%
[16 lines not shown]
[SSAF] Add EntitySourceLocationsSummary and JSON format (#208841)
Adds a per-entity TU-level summary recording the canonical (file, line,
column) of each declaration registered against an entity. The data feeds
a follow-on whole-program analysis that groups entities sharing a
declaration source-location into equivalence classes.
Assisted-By: Claude Opus 4.7
libzfs: don't abort receiving a raw encrypted send that carries holds
A raw send that gathers holds but not properties (zfs send -w -h,
without -p or -R) produces a compound stream whose per-filesystem
nvlist has no "props" entry. recv_fix_encryption_hierarchy() looked
that entry up with fnvlist_lookup_nvlist(), which aborts the process
when the key is missing, so receiving such a stream of an encrypted
dataset crashed with a failed VERIFY0() after the data had already
been received. Release builds abort the same way, since the VERIFY
family is always compiled in.
Look "props" up tolerantly and skip the keylocation fixup when it is
absent: a holds-only raw send sends no properties, and the raw
receive has already established a usable keylocation. The
FORCE_NEW_KEY and FORCE_INHERIT fixups, which do not need
properties, still run.
A new rsend test sends an encrypted dataset with -w -h, both a full
and an incremental stream, and confirms the receive succeeds with
[6 lines not shown]