Linux: rename zvols without making them read-only
zvol_os_rename_minor() makes udev fix the /dev/zvol links by flipping
the disk read-only and back, which sends a KOBJ_CHANGE uevent. While
the flag is set, blkdev_write_iter() fails writes with EPERM, so a write
that races with the rename of a volume, or of a dataset above it, can
fail.
kobject_uevent() is GPL-only, so write "change" to the uevent attribute
of the disk in sysfs instead, which is what "udevadm trigger
--action=change" does. The read-only state of the disk is not touched
any more. Failing to send the uevent is only logged, the rename itself
has already happened.
Nothing calls get_disk_ro() any more, so drop its configure check.
Add a test that renames a volume back and forth while writing to it with
O_DIRECT, checks that no write fails and that the /dev/zvol links
follow, and that renames a parent dataset.
[3 lines not shown]
ZTS: compare ctime_001_pos timestamps with the coarse clock
ctime requires each new file timestamp to be at least two seconds after
time() read before the sleep. File timestamps come from the kernel's
coarse clock, which only advances once per tick. glibc's time() reads
that clock, but musl's reads CLOCK_REALTIME, which can be up to a tick
ahead. When the sleep ends right after a second boundary, musl's time()
already returns the new second while the file still gets the old one, so
the timestamp falls a second short and the test fails on Alpine:
st_atime: BAD time change: t1(1792071880), t2(1792071882),
expected t2 within [1792071883, 1792071883]
Take the lower bound and the wait from CLOCK_REALTIME_COARSE where it
exists. The upper bound stays on time(), which is never behind the
coarse clock.
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #19450
ZTS: reject incomplete test selections
The runner drops tests and groups whose scripts or users fail
verification. A runfile with a missing test can therefore pass after
running only its remaining tests.
Apply tag and rerun filters before verification, then abort on an
invalid selected test, auxiliary script or execution user. Limit
directory discovery to executable files so support files do not become
test requirements. Resolve relative group failsafe paths correctly
before checking them.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Kamil Monicz <kamil at monicz.dev>
Closes #19436
deskutils/calibre: Add missing dependencies
Some runtime python dependencies are missing from the port, causing
plugin failures.
PR: 299452
MFH: 2026Q4
(cherry picked from commit af1be921a15f35afdde6eec7bb416f74295cd34f)
deskutils/calibre: Add missing dependencies
Some runtime python dependencies are missing from the port, causing
plugin failures.
PR: 299452
MFH: 2026Q4
ZTS: fail runs that execute no tests
The runner returns 2 when no tests execute, but zfs-tests.sh uses
zts-report to classify test outcomes and can report an empty run as
successful.
Reject this status after the initial run or an automatic retry.
Passing tests are omitted from quiet-mode reports, so an empty
report alone does not indicate an empty run.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Kamil Monicz <kamil at monicz.dev>
Closes #19435
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
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"All fixes in drivers (or the tape ULD) and one core fix to bsg (the
block ioctl equivalent of sg_io).
The biggest is the race in auth updates fix in iscsi configfs, but the
next biggest one is in bsg but the generic pieces of that are mostly
threading reply_len"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
scsi: libsas: Fix SMP IO deadlock during HA resume
scsi: libiscsi: Validate the task named by a management response
scsi: libiscsi: Validate the ITT reflected in a Reject PDU
scsi: libiscsi: Reject a negative task index from parse_pdu_itt
scsi: target: iscsi: Fix race in discovery auth updates
scsi: target: Disable interrupts while holding delayed_cmd_lock
scsi: st: Fix use-after-free race between st_remove() and st_open()
[2 lines not shown]
Merge tag 'spi-fix-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown:
"A small collection of driver specific fixes, all quite important if
you have the relevant hardware"
* tag 'spi-fix-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: spi-fsl-lpspi: directly return ret in fsl_lpspi_transfer_one()
spi: spi-fsl-lpspi: pass struct fsl_lpspi_data instead of struct spi_controller if possible
spi: imx: fix slab corruption from undersized DMA bounce buffers
spi: tegra114: assert CS GPIO for every transfer in a message
[LV,LLE] Add tests for checks with versioned strides (NFC) (#233276)
Add tests for trip counts rewritten using versioned strides and for the
stride check on a possibly poison stride.
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)
Merge tag 'regmap-fix-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap fixes from Mark Brown:
"The main thing here is a fix for lockdep warnings with MMIO regmaps
that use a raw spinlock and a cache, some other lockdep fixes we'd
done for the benefit of the maple tree on sleeping buses meant that we
were doing allocations for those MMIO regmaps under a raw spinlock.
While fixing that Michael Reeves also noticed that the debugfs files
were briefly available without the cache structures backing them.
There's also a fix for interrupt freeing on error in regmap-irq which
had been hanging around because it's not super urgent"
* tag 'regmap-fix-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: Drop map lock during cache init and exit
regmap: Remove debugfs before cache teardown
regmap: irq: Free the irqdomain we create
[ARM] Fix miscompile in MAC for 64b values (#231702)
AddCombineTo64BitSMLAL16 is invoked from PerformADDECombine where the
combined node N is AddeNode, but it returned SDValue(AddcNode, 0).
Because RV.getNode() != N, DAGCombiner::Run did not stop replacing and
called DAG.ReplaceAllUsesWith(AddeNode, AddcNode), replacing uses of
the high-word carry/overflow flag (AddeNode, 1) with the low-word
addition flag (AddcNode, 1).
Assisted-by: Gemini
Fixes: e9113618cba6 ("[ARM] Custom Lowering for SADDO_CARRY and
SSUBO_CARRY (#154419)")
(cherry picked from commit 28999cd08f23dd7baeb63b7ca4addef4214999e3)