OpenZFS/src f79c81d — .github/workflows smatch.yml

CI: apt-get update before installing smatch dependencies (#19237)

The smatch job installs packages without refreshing the runner's
package lists.  Since 2026-09-30 the lists in the runner image point
at a libdbi-perl security update that the mirrors no longer carry, so
the install fails with "404 Not Found" and every smatch run fails
before smatch is built.  Run apt-get update first, as #18609 did for
the purge step of the other workflows.

Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
DeltaFile
+1-0.github/workflows/smatch.yml
+1-01 files

OpenZFS/src 86b3fb1 — include/sys spa_impl.h, module/zfs spa_misc.c spa.c

Build the pool stats config without the namespace lock

The spa_open_common() function built the full config with vdev stats
while it held the namespace lock. Every pool lookup in the system waits
on that lock, so polling stats on a pool with many vdevs slowed down
unrelated pool operations. The config is now built after the lock is
dropped. spa_config_generate() takes the config locks it needs. The
recovery load info is copied while the lock is still held.

A stats caller now holds the pool for as long as the build takes, which
can be hundreds of milliseconds on a pool with many vdevs. Export fails
with "pool is busy" when it sees such a hold, so running zpool iostat or
zpool status in a loop would break zpool export, zpool destroy and
zpool split. To avoid this, stats callers count their hold, and export
waits for that count to drop to zero before it sets spa_export_thread.
New stats callers wait while the pool is being exported, so the wait
always ends. The hold and its count are taken and dropped together
under the namespace lock. As before, export holds the namespace lock
from setting spa_export_thread until it checks the pool references.

    [8 lines not shown]
DeltaFile
+71-12module/zfs/spa.c
+62-0tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_stats_pos.ksh
+2-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+1-0module/zfs/spa_misc.c
+1-0include/sys/spa_impl.h
+138-136 files

OpenZFS/src ce44791 — module/os/linux/zfs zfs_file_os.c

Linux: don't fail send/recv on job control stop

Suspending a zfs send or receive that writes to or reads from a pipe
with ^Z kills it: "cannot send: signal received" for send, and
"internal error: Bad file descriptor" plus an abort for receive.

On Linux the stream is written in the ioctl thread itself.  A pending
SIGTSTP makes a blocking pipe_write()/pipe_read() return -ERESTARTSYS
or a short count, and the send/recv path treats that as a fatal error.
issig() already knows how to stop the thread on SIGSTOP/SIGTSTP (commit
414f7249d), but it is only reached after the I/O error has been
recorded.

Retry the interrupted kernel_write()/kernel_read() in zfs_file_write()
and zfs_file_read() when issig() reports that the pending signal was
only a stop signal: the thread stops there, and the I/O continues from
where it stopped once it is resumed.  Any other signal still aborts the
operation as before.


    [3 lines not shown]
DeltaFile
+29-5module/os/linux/zfs/zfs_file_os.c
+29-51 files

OpenZFS/src 146d0ec — contrib/debian openzfs-zfsutils.examples not-installed, etc/zfs vdev_id.conf.sas_expander.example

vdev_id: add sas_expander topology

Certain external JBODs present multiple internal expanders (front and
backside slots, for example), which each have respective bay and phy 0,
and so on.  This results in none of the current topologies being able 
to sensibly map such a setup.  Disks will inevitably overlap, since 
the same port has multiple disks in bay or phy 0.

This adds a new topology, sas_expander, which assigns disks to channels
based on the address of the rightmost expander in their path.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>
Closes #19070
DeltaFile
+40-9udev/vdev_id
+18-1man/man5/vdev_id.conf.5
+6-2man/man8/vdev_id.8
+7-0etc/zfs/vdev_id.conf.sas_expander.example
+1-0contrib/debian/openzfs-zfsutils.examples
+1-0contrib/debian/not-installed
+73-121 files not shown
+74-127 files

OpenZFS/src f239ea9 — include/sys dsl_dataset.h, module/zfs dmu_objset.c zfs_ioctl.c

Walk snapshot names without holding the objset in list-next ioctl

ZFS_IOC_SNAPSHOT_LIST_NEXT walks the snapnames ZAP, which lives in the
MOS, so it only needs the dataset.  It held the objset instead, and for
an unmounted filesystem or an idle volume that means building a complete
objset_t and tearing it down again on every call, once per snapshot
returned.

Hold the pool and the dataset, and move the ZAP walk into
dsl_dataset_snapshot_list_next(), which dmu_snapshot_list_next() now
wraps for its remaining callers.  Listing a dataset's snapshots no
longer fails when the dataset's own objset block cannot be read.

Reviewed-by: Rob Norris <rob.norris at truenas.com>
Reviewed-by: Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Ameer Hamza <ameer.hamza at truenas.com>
Closes #19208
DeltaFile
+48-0module/zfs/dsl_dataset.c
+30-17module/zfs/zfs_ioctl.c
+2-37module/zfs/dmu_objset.c
+2-0include/sys/dsl_dataset.h
+82-544 files

OpenZFS/src 79b0e21 — cmd/zpool zpool_main.c

zpool: don't print a huge duration when a scan ends before it started

secs_to_dhms() took an unsigned number of seconds, so when the end time
of a scrub, resilver, expansion or condense was earlier than its start
time, for example because the system clock was set back while it ran,
the negative difference wrapped around and zpool status reported
something like "scrub repaired 0B in 213503982334601 days 06:57:38".

Take a signed value and report a negative duration as zero.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: George Melikov <mail at gmelikov.ru>
Closes #11597
Closes #19212
DeltaFile
+4-2cmd/zpool/zpool_main.c
+4-21 files

OpenZFS/src d72c454 — lib/libzutil/os/linux zutil_import_os.c

libzutil: fix the udev_device_get_is_initialized() config check

Since f040a7b0f ("Fix up FIND_SYSTEM_LIBRARY to work with
cross-compiling") configure detects udev_device_get_is_initialized()
with AC_CHECK_FUNCS, which defines HAVE_UDEV_DEVICE_GET_IS_INITIALIZED,
but udev_device_is_ready() still tested the old
HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED name.  So the fallback that
waits for a DEVLINKS property was always used, and a device which udev
gives no links at all was never considered ready: zpool_disk_wait()
ran into its 30 second timeout for every such device, e.g. importing
a pool on brd ramdisks took ~37s instead of ~0.6s.

Use the name configure actually defines.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: George Melikov <mail at gmelikov.ru>
Closes #19213
Related to #10753
DeltaFile
+1-1lib/libzutil/os/linux/zutil_import_os.c
+1-11 files

OpenZFS/src 7e556b3 — module/zfs dmu_send.c, tests/runfiles common.run

dmu_send: don't send uncompressed ARC data as compressed

issue_data_read() first tries to satisfy compressed (-c) and raw (-w)
sends from the ARC with ARC_FLAG_CACHED_ONLY and ZIO_FLAG_RAW_COMPRESS.
The ARC only honors a request for a compressed buffer when the header
itself is compressed, which is never the case for cached blocks with
zfs_compressed_arc_enabled=0.  The returned buffer then holds the
logical data, but the WRITE record is still emitted with the block's
compression type and psize, so the stream carries the first psize
bytes of uncompressed data labeled as compressed.  The receiver writes
that payload verbatim with a matching checksum, so scrub reports the
pool as healthy while reading the file fails with EIO.

If the cached buffer is not compressed as the block pointer says,
release it and read the block from disk instead.

Add a ZTS test that sends cached lz4 data with -c and -w while the
compressed ARC is disabled and verifies the received files.


    [3 lines not shown]
DeltaFile
+68-0tests/zfs-tests/tests/functional/rsend/send-c_compressed_arc_disabled.ksh
+13-0module/zfs/dmu_send.c
+2-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+84-14 files

OpenZFS/src ccc1303 — scripts zloop.sh

zloop.sh: don't treat every file as a core when unprivileged

When kernel.core_pattern starts with a pipe or a format specifier,
zloop.sh replaces it with "core". An unprivileged user can't write
core_pattern, so the glob stays "*" and core_file() returns the
first file in the current directory. Every iteration is then
archived as a crash and zloop.sh exits 1.

If core_pattern can't be set, say so and skip core file detection.
Crashes are still caught through the ztest exit status. Only
restore core_pattern at exit if it was changed.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: HongseokChoi <xjx061277 at gmail.com>
Closes #19210
DeltaFile
+16-4scripts/zloop.sh
+16-41 files

OpenZFS/src 428e68c — tests/test-runner/bin zts-report.py.in

ZTS: drop the FreeBSD inherit_001_pos expected-failure mask

inheritance/inherit_001_pos was added to the FreeBSD 'maybe' list in
583e32054 (#11830) for flaky unmount failures tracked in #11829.  The
test itself was fixed later in 8792dd24c (#13686), and #11829 is closed,
but the mask stayed and would hide a real regression.

In the last 40 zfs-qemu CI runs (2026-09-27..29) the test passed all
493 times across every builder, including 139 of 139 runs on FreeBSD
14.4-RELEASE, 15.1-RELEASE, 15.1-STABLE and 16.0-CURRENT, with no
failure, kill or skip.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: George Melikov <mail at gmelikov.ru>
Closes #19214
DeltaFile
+0-1tests/test-runner/bin/zts-report.py.in
+0-11 files

OpenZFS/src 69cd028 — contrib/dracut/90zfs module-setup.sh.in

contrib: dracut: install zfs-load-key hook only with systemd

The zfs-load-key.sh pre-mount hook is only meant for systemd-based
initramfs; without systemd, keys are loaded by mount-zfs.sh in the
mount hook. The script decides this at runtime by checking whether
systemctl exists.

However, the dracut shutdown module installs tools like reboot, halt
and poweroff, which on systemd hosts are symlinks to systemctl, so
systemctl ends up in the initramfs even when the boot is not driven
by systemd. The hook then waits for zfs-import.target forever, and
the boot hangs repeatedly printing:

  System has not been booted with systemd as init system (PID 1).
  Can't operate.
  Failed to connect to bus: Host is down

Install the hook only when the systemd dracut module is included, the
same condition used for the other systemd-specific files.

    [4 lines not shown]
DeltaFile
+3-1contrib/dracut/90zfs/module-setup.sh.in
+3-11 files

OpenZFS/src 7f22110 — scripts make-testdb.sh zfs-tests.sh, tests/zfs-tests/tests/functional/fadvise fadvise_willneed_limit.ksh

CI: Split up tests evenly on runner VMs

Our CI spawns two VMs on each github runner, and runs half the
test suite on each.  It naively splits up the tests by count, and
doesn't take into account how long the individual tests groups take
to run.  This leads to one VM finishing the test suite before
the other.  For example, one recent run on Fedora 44:

vm1 03:16:28
vm2 02:50:54

This commit attempts to balance the tests on the VMs by runtime.
It does this by adding a test completion time database to
zfs-tests.sh which is use to portion out the test groups
equally.  The database is just a big associative array that
is generated by the new 'make-testdb.sh' helper script.
Just point make-testdb.sh at a test results tarball and
it will generate the new test times database.


    [9 lines not shown]
DeltaFile
+149-13scripts/zfs-tests.sh
+127-0scripts/make-testdb.sh
+6-0tests/zfs-tests/tests/functional/fadvise/fadvise_willneed_limit.ksh
+282-133 files

OpenZFS/src 7470d20 — tests/zfs-tests/tests/functional/redundancy redundancy_raidz.ksh redundancy_draid_degraded2.ksh

ZTS: Make redundancy tests faster

The redundancy tests can take a very long time.  I was able to reduce
the redundancy tests from 7min 10sec to 4min on a local VM with
these changes:

- Reduce zfs_txg_timeout from 5 -> 1 for all redundancy tests.  This
speeds up `zpool replace` operations.

- Reduce the vdev sizes in many of the tests.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #19140
DeltaFile
+5-5tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh
+5-5tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded2.ksh
+5-5tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded1.ksh
+5-5tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged2.ksh
+5-5tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged1.ksh
+5-5tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh
+30-302 files not shown
+35-308 files

OpenZFS/src cf1bc78 — .github/workflows/scripts qemu-4-build-vm.sh

CI: Enable configure caching by default

Enable configure caching by default in the CI. This doesn't 
significantly speed up the build but it does ensure this
functionality is always tested.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Glenn Washburn <development at efficientek.com>
Closes #19173
DeltaFile
+16-4.github/workflows/scripts/qemu-4-build-vm.sh
+16-41 files

OpenZFS/src b7879cd — tests/zfs-tests/tests/functional/rsend send_realloc_dnode_interior.ksh

ZTS: increase send_realloc_dnode_interior attempts

The send_realloc_dnode_interior test depends on being able to
reallocate and interior slot of a freed dnode.  The test doesn't
have direct control over the object id assignment so there's a
retry loop which attempts to set this up 5 times then gives up.
Increase that threshhold to 10 times and add some diagnostic
information to log what ranges are being checked on each attempt.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #19112
DeltaFile
+5-1tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_interior.ksh
+5-11 files

OpenZFS/src e3831a6 — include/os/linux/spl/sys trace_spl.h, scripts spdxcheck.pl

spl: remote sys/trace_spl.h

Linux kernel only, not included from anywhere since 801d9b4f96.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-21include/os/linux/spl/sys/trace_spl.h
+0-1scripts/spdxcheck.pl
+0-222 files

OpenZFS/src 8c12098 — lib/libefi rdwr_efi.c, lib/libspl/include Makefile.am

spl: remove sys/mhd.h

Only in libspl, only included from libefi, and nothing from it gets used.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-149lib/libspl/include/sys/mhd.h
+0-1lib/libspl/include/Makefile.am
+0-1lib/libefi/rdwr_efi.c
+0-1513 files

OpenZFS/src 78adacc — lib/libspl/include Makefile.am, lib/libspl/include/sys priv.h

spl: remove sys/priv.h

Empty and unused in userspace.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-20lib/libspl/include/sys/priv.h
+0-1lib/libspl/include/Makefile.am
+0-212 files

OpenZFS/src a66614a — include/os/freebsd Makefile.am, include/os/freebsd/spl/sys uuid.h

spl: remove sys/uuid.h

Only on FreeBSD, and almost identical to include/sys/uuid.h. However,
only used by sys/efi_partition.h, which is specific to libefi, which is
not used on FreeBSD, and especially not in the kernel. Remove stray
includes of sys/efi_partition.h too and there's no more to see.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-89include/os/freebsd/spl/sys/uuid.h
+0-1lib/libzutil/os/freebsd/zutil_import_os.c
+0-1lib/libzfs/libzfs_pool.c
+0-1include/os/freebsd/Makefile.am
+0-924 files

OpenZFS/src 7646bb3 — include/os/linux Makefile.am, include/os/linux/spl/sys taskq.h condvar.h

spl: remove sys/wait.h

Only on Linux, just includes a couple of platform includes that don't
appear to be needed directly anyway.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-31include/os/linux/spl/sys/wait.h
+0-1module/os/linux/spl/spl-kmem-cache.c
+0-1include/os/linux/spl/sys/taskq.h
+0-1include/os/linux/spl/sys/condvar.h
+0-1include/os/linux/Makefile.am
+0-355 files

OpenZFS/src 961739e — include/os/freebsd Makefile.am, include/os/freebsd/spl/sys mode.h

spl: remove sys/mode.h

Only on FreeBSD, empty, and never included.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-1scripts/spdxcheck.pl
+0-1include/os/freebsd/spl/sys/mode.h
+0-1include/os/freebsd/Makefile.am
+0-33 files

OpenZFS/src 0ab3757 — cmd ztest.c, lib/libspl/include Makefile.am

spl: remove sys/poll.h

Only in userspace, as a workaround to get poll.h correctly. However,
there's only one place we include it, in ztest, so its more sensible to
just include poll.h directly there, which is what we want anyway.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-31lib/libspl/include/sys/poll.h
+1-1cmd/ztest.c
+0-1lib/libspl/include/Makefile.am
+1-333 files

OpenZFS/src 8dbb6e3 — lib/libspl/include Makefile.am, lib/libspl/include/sys stack.h

spl: remove sys/stack.h

Only for userspace, and never included.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-65lib/libspl/include/sys/stack.h
+0-1lib/libspl/include/Makefile.am
+0-662 files

OpenZFS/src 6597fd0 — include/os/linux Makefile.am, include/os/linux/spl/sys condvar.h callo.h

spl: remove sys/callo.h

Only on Linux. CALLOUT_FLAG_ABSOLUTE is the only thing we need from
here, for cv_timedwait_idle_hires(). FreeBSD and userspace have it in
condvar.h, move it there for Linux.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-52include/os/linux/spl/sys/callo.h
+2-2include/os/linux/spl/sys/condvar.h
+0-1include/os/linux/Makefile.am
+2-553 files

OpenZFS/src 1ceb518 — include/os/freebsd Makefile.am, include/os/linux/spl/sys inttypes.h

spl: remove sys/inttypes.h

Empty on Linux & FreeBSD. In userspace, only included inttypes.h to get
the "core" types, and then unconditionally defined _INT64_TYPE, which
only gates the 64-bit atomics.

So, remove all versions, and the _INT64_TYPE gate. Finally, move the
inttypes.h include up in sys/types.h, since it is now the only source of
the "core" types, and wasn't included early enough to get them.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+2-31lib/libspl/include/atomic.h
+0-28include/os/linux/spl/sys/inttypes.h
+0-24lib/libspl/include/sys/inttypes.h
+4-4lib/libspl/include/sys/types.h
+0-2lib/libspl/include/sys/types32.h
+0-1include/os/freebsd/Makefile.am
+6-9013 files not shown
+6-10319 files

OpenZFS/src 5259714 — include/os/linux Makefile.am, include/os/linux/spl/sys vnode.h user.h

spl: remove sys/user.h

Only on Linux. Left over from before zfs_file_*, should have been
removed in da92d5cbb3.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-42include/os/linux/spl/sys/user.h
+0-1include/os/linux/spl/sys/vnode.h
+0-1include/os/linux/Makefile.am
+0-443 files

OpenZFS/src 95b1942 — include/os/freebsd Makefile.am, include/os/freebsd/spl/sys lock.h

spl: remove sys/lock.h

Only for FreeBSD, shadowing a system header. The two additional defines
are not used anywhere in OpenZFS.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #19206
DeltaFile
+0-41include/os/freebsd/spl/sys/lock.h
+0-1include/os/freebsd/Makefile.am
+0-422 files

OpenZFS/src 6d5d3f6 — module/zfs spa.c

Wait for the txg-time database write before setting spa_final_txg

spa_export_common() writes the TXG timestamp database into the MOS via
spa_unload_sync_time_logger(), which assigns the write to whatever txg
is open at the time and returns without waiting for it to sync.  The
shutdown fence is then computed as spa_last_synced_txg() +
TXG_DEFER_SIZE + 1, so spa_final_dirty_txg() is spa_last_synced_txg + 1,
on the assumption that nothing is dirty beyond that point.

That assumption only holds while the sync pipeline is idle.  With
spa_last_synced_txg at L, txg L+1 syncing and L+2 open, the write lands
in L+2 while the fence permits only L+1.  When L+2 syncs, the MOS write
allocates space, the metaslab is dirty for L+2, and metaslab_sync()
trips its own check by exactly one txg:

  VERIFY3U(txg, <=, spa_final_dirty_txg(spa)) failed (2751 <= 2750)

That VERIFY3U is compiled into production builds, so a real
'zpool export' can panic the same way ztest does.

    [19 lines not shown]
DeltaFile
+6-0module/zfs/spa.c
+6-01 files

OpenZFS/src 5f1957a — include/sys spa_impl.h, module/zfs vdev_label.c spa.c

spa: number new txgs above every uberblock on disk

After a successful import of an explicitly requested txg the new txgs
were numbered from that txg onwards, while the uberblocks of the
timeline the import discarded were still in the label ring with higher
txg numbers.  If the pool was exported before the new timeline overtook
them, the next plain import selected one of theirs, quietly returning to
the discarded state, or failed with an I/O error once the new timeline
had reused its blocks.

The rewind path does not have this problem: a load that follows a failed
one sets spa_last_ubsync_txg to the txg of the newest uberblock, and
spa_first_txg is taken from it.  A load of an explicitly requested txg
succeeds on the first attempt, so that value is zero and the first new
txg comes from spa_last_synced_txg() instead.

Record the newest uberblock seen while loading, whatever txg was asked
for, and start the new timeline above it.


    [9 lines not shown]
DeltaFile
+10-0module/zfs/spa.c
+8-0module/zfs/vdev_label.c
+1-0include/sys/spa_impl.h
+19-03 files

OpenZFS/src 81b19c6 — config rpm.am

rpm: Generate initial rpm configure cache file from existing cache

The rpmbuild can not use the existing configure cache generated by the
initial configure run because the build/host/target is likely different.
More generally configure's "precious" variables have different values
or states. However, the rest of the initial cache file can be reused.
This is the bulk of the processing in configure anyway. Also, for the
same reason, caches can not be shared between rpmbuilds either.

Generate the initial rpm configure cache file by taking the initial
configure cache and excluding the precious variables. If the rpm
configure already exists, reuse it but remove the undesired variables.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Glenn Washburn <development at efficientek.com>
Closes #19168
DeltaFile
+15-1config/rpm.am
+15-11 files