CI: install diffutils on the Alpine runner
ZTS calls cmp with skip offsets, and zfs_send_sparse does it against a
file whose hole doubles every round. GNU cmp seeks to the offset;
busybox cmp reads its way there, 512 bytes at a time. Timed per command
on the runner, the send stays flat while the compare doubles:
hole zfs send | zfs receive cmp
256MiB 0.07s 25.2s
512MiB 0.08s 51.7s
1GiB 0.07s 102.1s
so the test walks into its ten minute cap, and the group's cleanup fails
behind it and takes the next groups' setup with it.
The GNU cmp comes from diffutils, which is not in this list -- without
it the busybox applet answers to cmp instead. diffutils arrives on 3.24
only because something else happens to pull it in, so the runner works
by accident of the dependency graph rather than by asking for what it
[4 lines not shown]
libzfs: explain why a large-block stream mismatch happens
A receive fails with ZFS_ERR_STREAM_LARGE_BLOCK_MISMATCH when the
destination has large blocks and the stream does not carry them. The
error told the user to add -L, but -L cannot help when the sending
dataset has no large blocks of its own: setup_featureflags() sets
DMU_BACKUP_FEATURE_LARGE_BLOCKS only when the feature is active on the
sending dataset, so -L is silently a no-op there. That is the state a
dataset is left in by an earlier replication in the opposite direction
that ran without -L, which splits the large blocks and leaves the copy
without the feature. The two copies then have different block layouts,
and advising -L sends the user in a circle.
Reword the error to name both causes and the remedy, and document the
trap in zfs-send.8 and zfs-receive.8.
Add a test for the reverse direction, which was not covered: replicate
a dataset that has large blocks without -L, then send an incremental
back with -L and confirm it is rejected, that omitting -L fails the
[11 lines not shown]
ZTS: take the loop device name from losetup itself
mount_loopback attaches an image with "losetup -f" and then looks the
device up again with "losetup --associated". Alpine's udev populates a
/dev/loop directory with the devices the kernel pre-creates at init, and
util-linux resolves every device name to /dev/loop/N whenever that
directory exists. A device allocated beyond those, through
/dev/loop-control once the first eight are busy, has no node there and
is never found. mkfs.xfs then runs with an empty argument and the test
aborts.
That is also why it is intermittent: it depends on how many loop devices
earlier tests left attached.
Aborting leaves the loop device holding the image open, so the pool
underneath cannot be unmounted and every later test that destroys a pool
fails too.
Ask losetup to print the device it attached instead, and fail loudly if
[4 lines not shown]
CI: stop cloud-init stalling every Alpine boot
The Alpine runner takes over five minutes to answer after the build step
reboots it, and all of it is one service:
* cloud-init local ...Cloud-init v. 26.1 running 'init-local'
DataSourceLXD.py[WARNING]: /dev/lxd/sock does not exist.
<301 seconds>
[ ok ]
Everything after it takes two seconds. It is datasource detection
timing out on an LXD socket a libvirt guest will never have.
Three cloud-init services are already removed here, but the one that
stalls is cloud-init-local, which lives in the boot runlevel rather than
default and so was never touched. Remove it too. Cloud-init is still
needed on the first boot, where the ssh key arrives through it; this
runs after that.
[2 lines not shown]
ZTS: Change zpool_initialize_multiple_pools devsize
Change zpool_initialize_multiple_pools test vdev sizes from
5GB -> 1GB. This size reduction is important since the test creates
four vdevs of this size (20GB) and initializes them. This
space reduction is need for running 3 CI VMs in parallel.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #19134
ZTS: Make zpool_prefetch_001_pos faster
zpool_prefetch_001 creates 16 thousand files, and makes copies of a
fraction of them. This takes a long time, especially when run on the
slow CI VMs.
Make it faster by only creating 8k files, and do some of the creations
in parallel. Both optimizations help to bring down the test time
from 40sec -> 14sec, as measured on a local, 10-core, VM.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #19133
rpm: Add support for building akmod packages
Add akmod (Automatic Kernel Module) support to ZFS, providing a third
packaging option alongside the existing DKMS and kmod packages.
Akmod packages automatically build binary kmod RPMs when new kernels
are installed, enabling:
- Automatic kernel module rebuilds on kernel updates
- Distribution of binary kmod RPMs without recompilation
- Seamless minor version upgrades on RHEL/Fedora and clones
Key changes:
- rpm/generic/zfs-kmod.spec.in: Add conditional akmod support via
rpmbuild --define '_enable_akmod 1'. When enabled, sets
buildforkernels=akmod and repo=rpmfusion so kmodtool generates
an akmod-zfs package. Add -common subpackage for shared
license/doc files. Guard chmod and %files sections for empty
kernel_versions. Make kmod-devel packages opt-in via
%bcond_with devel to prevent akmods from installing unnecessary
[35 lines not shown]
[LowerTypeTests] Apply kill switch to CFI jump table reordering (#224782)
This is follow up to #221046, for which I failed to upload rebased
version.
* https://github.com/llvm/llvm-project/pull/221046
clntrdma.h: Add a field to rpcrdma_xprt
Add a maxsegs field to rpcrdma_xprt, which is used to set
the number of segments allowed for a chunk based on device
attributes.
This commit should not affect non-RDMA behaviour.
MFC after: 3 months
Fixes: 884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
clnt_bck.c: Fix the "glue" for the nfsrdma.ko module
Without this patch, the code failed to acquire the error
return for clnt_bck_rdma_send() and could use "error" uninitialized.
No semantics change for non-RDMA NFS service.
MFC after: 3 months
Fixes: 7144a1d58c5c ("nfsd: Add glue for the nfsrdma.ko module")
zdb: account pending DDT-log frees in leak detection
With fast dedup, the last decref of a block lands in the DDT log, and
the physical free happens only when the log entry is flushed back into
the DDT. ddt_phys_decref() only decrements the in-memory refcount, the
log append path issues no free, and ddt_phys_free() -- the only caller
of zio_free() on this path -- runs from ddt_sync_flush_entry(). A pool
examined inside that window contains blocks that no block pointer
references but that are still allocated. zdb's leak detection never
enumerates the log, so it misreports those blocks: as "leaked space"
and a block traversal size mismatch in the generic accounting
(print-only since d63f5d7e50), and as a fatal "obsolete indirect
mapping count mismatch" when such a block sits behind a removed vdev's
indirect mapping -- which is what intermittently fails the zloop CI
job.
Count the phys that the flush will free the same way as the
deferred-free bplist, under a new "DDT pending free" bucket:
reconstruct the BP, clear the dedup bit exactly as ddt_phys_free()
[40 lines not shown]
zdb: don't index an indirect vdev's metaslabs in the --class filter
zdb_count_block()'s --class filter resolves a block's allocation class
by indexing the top vdev's metaslab array. An indirect vdev, left
behind by a device removal, normally has no metaslabs; zdb synthesizes
them in zdb_leak_init_prepare_indirect_vdevs() so that zio_claim() has
somewhere to claim into. That only happens when leak tracking is
enabled, so under -L the array is NULL and any block whose first DVA
names a removed vdev dereferences it.
Classify an indirect vdev from its allocation bias instead. The bias
determines the vdev's primary metaslab group, and is available whether
or not the synthetic metaslabs exist.
For an indirect vdev with more than zfs_embedded_slog_min_ms metaslabs
this also changes what the filter reports. The synthetic metaslabs
carry no space maps, so they all look empty, and vdev_metaslab_init()
moves the emptiest into the embedded log group; blocks in that range
then classified as "other". Measured on a ztest pool with two removed
[16 lines not shown]
[LowerTypeTests] Reorder CFI jump table entries based on hotness (#221046)
Order CFI jump table entries by function hotness. We use `cfi.functions`
metadata in ThinLTO, or `BlockFrequencyInfo` / function entry counts in
full LTO.
We want the hottest function to be optimized by the last entry thing for
SHT_LLVM_CFI_JUMP_TABLE. The linker deletes the final branch in the jump
table and moves the table directly before that target function so it
falls through.
This also ensures the jump table lands in a hot section (.text.hot)
instead of a cold section (.text.unlikely). Type contiguity is
preserved.
This PR reliably improves the performance of our server binary by 0.2%,
and some smaller binaries up to 5%.
PR Stack:
[8 lines not shown]
[Clang][NFC] Move GH211943 test into existing builtin-dump-struct test file (#224421)
Follow-up to #212377 per post-commit review by @shafik.
Moves the regression test from a standalone GH211943.cpp into the
existing CodeGenCXX/builtin-dump-struct.cpp under a namespace GH211943
block, guarded by #ifdef TEST_WERROR with a second RUN line.
[NFC][LowerTypeTests] Add RUN line for -reorder-cfi-jump-tables-profiles=false (#224779)
Update CHECK lines to match the new jump table layout in
* https://github.com/llvm/llvm-project/pull/224779
Assisted-by: Gemini
Update to Ruby 4.0.7
This includes fixes for:
CVE-2026-80212: Memory exhaustion through malicious DNS responses
CVE-2026-80213: Hostname validation bypass