Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge FreeBSD 2024-03-08 #2176

Merged
merged 207 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
d3bafe4
ddt: modernise assertions
robn Feb 15, 2024
86e91c0
ddt: move entry compression into ddt_zap
robn Jun 30, 2023
5c4cc21
ddt_zap: standardise temp buffer allocations
robn Jan 17, 2024
0cb1ef6
ddt: compare keys, not entries
robn Jun 9, 2023
5973854
ddt: lift dedup stats out to separate file
robn May 16, 2023
9090060
ddt: remove DDE_GET_NDVAS macro
robn Jul 3, 2023
8e414fc
ddt: split internal DDT API into separate header
robn Jun 30, 2023
c8f694f
ddt: typedef ddt_type and ddt_class
robn Jul 3, 2023
3bad700
ddt: remove struct names and forward declarations
robn Jul 3, 2023
5ee0f9c
ddt: ensure ddt objects exist before trying to get stats from them
robn Jun 15, 2023
9029278
ddt: rework ops interface in terms of keys and values
robn Jul 3, 2023
2cffddd
ddt: remove ddt_node
robn Jul 31, 2023
406562c
ddt: simplify entry load and flags
robn Dec 5, 2023
d961954
ddt: only create tables for dedup-capable checksums
robn Feb 1, 2024
5720b00
ddt: document the theory and the key data structures
robn Nov 27, 2023
d6a3d3f
ZTS: Skip cross-fs bclone tests if FreeBSD < 14.0
tonyhutter Feb 16, 2024
af4da5c
Check for minimum partition size
behlendorf Feb 16, 2024
5600dff
Fixed parameter passing error when calling zfs_acl_chmod
yyhran Feb 26, 2024
c00c085
config: use -Wno-format-truncation globally
robn Feb 19, 2024
8f2f6cd
ddt: reduce DDT_NAMELEN
robn Feb 19, 2024
7e4ac11
getblkx(9): be more tolerant but also strict with the buffer size checks
kostikbel Mar 2, 2024
42b117a
gpioevents: Fix build with newer Clang
VoxSciurorum Mar 2, 2024
2496fb7
sys/mount.h: align values of MNTK_XXX flags
kostikbel Mar 3, 2024
2f5a315
linux: require vnet(9) context in ifname_bsd_to_linux_name()
glebius Mar 3, 2024
80ac36c
posix_spawnattr_setflags(3): validate argument
kostikbel Mar 3, 2024
822042f
posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP
kostikbel Mar 3, 2024
a725a7a
posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP
kostikbel Mar 3, 2024
d3befb5
LinuxKPI: Queue skbuffs at tail in __skb_queue_tail
Mar 2, 2024
84ed863
hostapd: Work around lack of MLME support
cschuber Feb 27, 2024
da48ddb
riscv: catch up with EARLY_PRINTF changes
mhorne Mar 4, 2024
83550d0
Add a missing space in a warning.
Mar 4, 2024
327ada0
imgact_elf: Add const to the header_supported callback arguments
arichardson Mar 4, 2024
a39b3aa
Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks):
DimitryAndric Mar 4, 2024
ec911a4
libc/locale: don't expose nonexistant __collate_load_error
brooksdavis Mar 5, 2024
7e8e73f
libc: actually build bsearch_b
brooksdavis Mar 5, 2024
7701b99
tcp_rack.4: Remove a mentioned paper
gbergling Mar 5, 2024
169641f
imgact_elf: Add const to a few struct image_params pointers
arichardson Mar 5, 2024
364d1b2
imgact_elf: Add const to the checknote parameter to __elfN(parse_notes)
bsdjhb Mar 5, 2024
332dbd3
pci_host_generic: Pass a valid end address in generic_pcie_translate_…
bsdjhb Mar 5, 2024
291079d
pci_host_generic: Simplify generic_pcie_translate_resource
bsdjhb Mar 5, 2024
b5d2165
kern: poll: tap out the pollfd array on successful return
kevans91 Mar 5, 2024
bd23e71
libsysdecode: add a decoder for pollfd events
kevans91 Mar 5, 2024
02c57f7
kdump: decode pollfd struct arrays coming from poll(2)
kevans91 Mar 5, 2024
47ad4f2
ktrace: log genio events on failed write
kevans91 Mar 5, 2024
e6dccf0
.github: Switch to v4 of actions/checkout
bsdjhb Mar 5, 2024
885590b
bsd-family-tree: add FreeBSD 13.3
osokin Mar 5, 2024
e333110
diskinfo(8): introduce new option -l
Mar 5, 2024
89f4f91
zfsd: Use vdev prop values for fault/degrade thresholds
asomers Mar 5, 2024
ebaf907
posix_spawn.c: fix typo in comment
kostikbel Mar 6, 2024
f8bbbce
libthr: remove explicit sys/cdefs.h includes
kostikbel Mar 6, 2024
2ce23b1
libc posix_spawn(): explain why rtld can be used after fork
kostikbel Mar 6, 2024
a446582
Revert "md5.1: Fix an example"
gbergling Mar 6, 2024
e436cb7
if_bnxt: Correcting the firmware package version parsing logic
Feb 23, 2024
d0168b3
vmm.4: Add verbiage about need to load module from loader.conf
michaelgalassi Mar 6, 2024
38b3683
tarfs: Fix two input validation issues.
dag-erling Mar 6, 2024
8427d94
tarfs: Improve validation of numeric fields.
dag-erling Mar 6, 2024
c291b79
tarfs: Avoid overflow in exthdr calculation.
dag-erling Mar 6, 2024
e212f0c
tarfs: Remove unnecessary hack and obsolete comment.
dag-erling Mar 6, 2024
0118b0c
tarfs: Fix checksum calculation.
dag-erling Mar 6, 2024
32b8aac
tarfs: Factor out common test code.
dag-erling Mar 6, 2024
cf742fa
timerfd_create: accept CLOCK_UPTIME/CLOCK_BOOTTIME
bapt Mar 6, 2024
0ecf0b2
timerfd_create: fix after cf742faa39a58a9b43b671c66097e6880459d4ae
bapt Mar 6, 2024
8c94ed9
bsearch_b: fix compilation with gcc
brooksdavis Mar 6, 2024
023fa55
liblzma: don't export lzma_lz_decoder_uncompressed
brooksdavis Mar 7, 2024
de4386d
heimdal: don't export nonexistant _wind_ucs2read
brooksdavis Mar 7, 2024
cec2adb
heimdal: don't try to expose nonexistant symbols
brooksdavis Mar 7, 2024
269593d
libsys/aarch64: end syscall stubs with newlines
brooksdavis Mar 7, 2024
e6ffc76
libsys/riscv: Remove pointless MD syscall(2)
brooksdavis Mar 7, 2024
0ee0ae2
libsys/arm: Remove pointless MD syscall(2)
brooksdavis Mar 7, 2024
7b3836c
libsys/aarch: Remove pointless MD syscall(2)
brooksdavis Mar 7, 2024
39a15d7
syscall(2): make i386 less of an outlier
brooksdavis Mar 7, 2024
cc4ffc9
libsys: don't try to expose yield
brooksdavis Mar 7, 2024
83392af
libsys: don't expose __init_elf_aux_vector
brooksdavis Mar 7, 2024
fc3afe9
nvme: split devctl out to its own function
bsdimp Mar 7, 2024
4f817fc
nvme: Change devctl events for the controller
bsdimp Mar 7, 2024
5cdedf6
nvme: Log reset success or failure to devd
bsdimp Mar 7, 2024
2a2682e
nvme: Add SMART WARNING for persistent memory region
bsdimp Mar 7, 2024
6a3877a
devd: Document the nvme devd events
bsdimp Mar 7, 2024
7c6af20
devd: Add directory information
bsdimp Mar 7, 2024
8a802df
bhyve/gdb: Avoid rebuilding target.xml for install targets
markjdb Mar 7, 2024
cbddb2f
tarfs: Fix checksum on 32-bit platforms.
dag-erling Mar 7, 2024
4fefe1b
zfs: merge openzfs/zfs@8f2f6cd2a
mmatuska Mar 7, 2024
c849eb8
nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default
altimeter-130ft Mar 4, 2024
7cbffbf
if_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot…
cp890582 Mar 6, 2024
fe52c33
nvme_sim: Add comment about the is_failed test
bsdimp Mar 6, 2024
c5108e3
if_bnxt: Incorrect Labeling of Supported Medium in `ifconfig -m <inf>…
cp890582 Mar 6, 2024
0f8d1a9
if_bnxt: Enabled support for 1G SX, CX, and LX forced speed settings
cp890582 Mar 6, 2024
8a3aab5
if_bnxt: Update Maximum Configurable MTU from 9000 to 9600
cp890582 Mar 6, 2024
25f38d0
if_bnxt: Update Firmware Header to Latest Version 1.10.2.136
cp890582 Mar 6, 2024
816abba
if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed
cp890582 Mar 6, 2024
d36b366
if_bnxt: Implementation of Extended Port Hardware Stats Support for T…
cp890582 Mar 6, 2024
3320f0f
if_bnxt: Pluggable Module Display Support
Mar 6, 2024
c63d67e
if_bnxt: 50G, 100G and 200G PAM4 support
cp890582 Mar 6, 2024
770e7ba
if_bnxt: Set 1G/10G baseT force speed as auto speeds
cp890582 Mar 6, 2024
72ecb16
amend! if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed
Mar 7, 2024
8c8882c
libc/iconv: don't export nonexistant symbols
brooksdavis Mar 7, 2024
6e6cd03
libc/quad: narrow list of symbols exposed on i386
brooksdavis Mar 7, 2024
32c7350
libc/i386: don't attempt to export alloca
brooksdavis Mar 7, 2024
ba7b7f9
awk: Fix the tests
bsdimp Mar 8, 2024
4f9fbde
ObsoleteFiles.inc: add the awk tests I just remvoed
bsdimp Mar 8, 2024
d1ce012
TCP LRO: disable mbuf queuing when packet filter hooks are in place
tuexen Mar 8, 2024
96ad640
TCP LRO: add dtrace probe points
tuexen Mar 8, 2024
999174b
Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi()
Mar 8, 2024
6e66bb9
clk_fixed: call clkdom_dump() for verbose boot
mhorne Mar 8, 2024
1cb9f6f
clk_fixed: quiet by default
mhorne Mar 8, 2024
08635c5
clkdom_dump(): improve output text
mhorne Mar 8, 2024
accda78
simple_mfd: don't attach children twice
mhorne Mar 8, 2024
0724293
nullfs_mount(): remove unneeded cast
kostikbel Mar 8, 2024
8921216
nullfs: add -o cache
kostikbel Mar 8, 2024
4a2a69c
mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes
kostikbel Mar 8, 2024
4e8d264
nullfs_mount(): fix whitespace
kostikbel Mar 8, 2024
a650ec0
lib{c,sys}: fix incremental builds
brooksdavis Mar 8, 2024
6e2cfb2
crunchgen: slap a dependency on the generated makefile for .lo
kevans91 Mar 9, 2024
1b9c3d2
getblkx(9): be more tolerant but also strict with the buffer size checks
kostikbel Mar 2, 2024
a8a6720
gpioevents: Fix build with newer Clang
VoxSciurorum Mar 2, 2024
e6729d8
sys/mount.h: align values of MNTK_XXX flags
kostikbel Mar 3, 2024
ac89a72
linux: require vnet(9) context in ifname_bsd_to_linux_name()
glebius Mar 3, 2024
1e95068
posix_spawnattr_setflags(3): validate argument
kostikbel Mar 3, 2024
86d527f
posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP
kostikbel Mar 3, 2024
e73a03c
posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP
kostikbel Mar 3, 2024
07f5ce4
LinuxKPI: Queue skbuffs at tail in __skb_queue_tail
Mar 2, 2024
c53b971
hostapd: Work around lack of MLME support
cschuber Feb 27, 2024
6cfc066
riscv: catch up with EARLY_PRINTF changes
mhorne Mar 4, 2024
ebb704f
Add a missing space in a warning.
Mar 4, 2024
d26464a
imgact_elf: Add const to the header_supported callback arguments
arichardson Mar 4, 2024
45c417c
Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks):
DimitryAndric Mar 4, 2024
da75980
libc/locale: don't expose nonexistant __collate_load_error
brooksdavis Mar 5, 2024
2d1a892
libc: actually build bsearch_b
brooksdavis Mar 5, 2024
f5316e8
tcp_rack.4: Remove a mentioned paper
gbergling Mar 5, 2024
c2902cc
imgact_elf: Add const to a few struct image_params pointers
arichardson Mar 5, 2024
b4554fb
imgact_elf: Add const to the checknote parameter to __elfN(parse_notes)
bsdjhb Mar 5, 2024
83a7a07
pci_host_generic: Pass a valid end address in generic_pcie_translate_…
bsdjhb Mar 5, 2024
d61d760
pci_host_generic: Simplify generic_pcie_translate_resource
bsdjhb Mar 5, 2024
bdb0bcd
kern: poll: tap out the pollfd array on successful return
kevans91 Mar 5, 2024
887c683
libsysdecode: add a decoder for pollfd events
kevans91 Mar 5, 2024
a797482
kdump: decode pollfd struct arrays coming from poll(2)
kevans91 Mar 5, 2024
e23e73e
ktrace: log genio events on failed write
kevans91 Mar 5, 2024
db46fad
.github: Switch to v4 of actions/checkout
bsdjhb Mar 5, 2024
beffe18
bsd-family-tree: add FreeBSD 13.3
osokin Mar 5, 2024
81a0963
diskinfo(8): introduce new option -l
Mar 5, 2024
625f919
zfsd: Use vdev prop values for fault/degrade thresholds
asomers Mar 5, 2024
8b41c9d
posix_spawn.c: fix typo in comment
kostikbel Mar 6, 2024
185d42e
libthr: remove explicit sys/cdefs.h includes
kostikbel Mar 6, 2024
0f5d498
libc posix_spawn(): explain why rtld can be used after fork
kostikbel Mar 6, 2024
ca3f096
Revert "md5.1: Fix an example"
gbergling Mar 6, 2024
f8eb29e
if_bnxt: Correcting the firmware package version parsing logic
Feb 23, 2024
11a7664
vmm.4: Add verbiage about need to load module from loader.conf
michaelgalassi Mar 6, 2024
4347703
tarfs: Fix two input validation issues.
dag-erling Mar 6, 2024
0a7d28c
tarfs: Improve validation of numeric fields.
dag-erling Mar 6, 2024
c4c3724
tarfs: Avoid overflow in exthdr calculation.
dag-erling Mar 6, 2024
87ccfeb
tarfs: Remove unnecessary hack and obsolete comment.
dag-erling Mar 6, 2024
88e6c75
tarfs: Fix checksum calculation.
dag-erling Mar 6, 2024
5d31a58
tarfs: Factor out common test code.
dag-erling Mar 6, 2024
bd48884
timerfd_create: accept CLOCK_UPTIME/CLOCK_BOOTTIME
bapt Mar 6, 2024
da328dd
timerfd_create: fix after cf742faa39a58a9b43b671c66097e6880459d4ae
bapt Mar 6, 2024
c36cbb2
bsearch_b: fix compilation with gcc
brooksdavis Mar 6, 2024
0fbaa40
liblzma: don't export lzma_lz_decoder_uncompressed
brooksdavis Mar 7, 2024
d97fe15
heimdal: don't export nonexistant _wind_ucs2read
brooksdavis Mar 7, 2024
fde8238
heimdal: don't try to expose nonexistant symbols
brooksdavis Mar 7, 2024
2d7c029
libsys/aarch64: end syscall stubs with newlines
brooksdavis Mar 7, 2024
5bc1046
Skipping merge of e6ffc7669a56bbacb276a107f2bd1146787e86d5
bsdjhb Aug 3, 2024
dc83bde
Skipping merge of 0ee0ae2373242a4d2283cd46563296dd1cd1ced3
bsdjhb Aug 3, 2024
dba7ed2
Skipping merge of 7b3836c28188efc1599cbbe6879616836341e426
bsdjhb Aug 3, 2024
8c6ae12
syscall(2): make i386 less of an outlier
brooksdavis Mar 7, 2024
1653a13
libsys: don't try to expose yield
brooksdavis Mar 7, 2024
f6e3c43
libsys: don't expose __init_elf_aux_vector
brooksdavis Mar 7, 2024
afa4908
nvme: split devctl out to its own function
bsdimp Mar 7, 2024
fd42d01
nvme: Change devctl events for the controller
bsdimp Mar 7, 2024
65cb85f
nvme: Log reset success or failure to devd
bsdimp Mar 7, 2024
57cd0a6
nvme: Add SMART WARNING for persistent memory region
bsdimp Mar 7, 2024
265c130
devd: Document the nvme devd events
bsdimp Mar 7, 2024
59df7aa
devd: Add directory information
bsdimp Mar 7, 2024
28215cc
bhyve/gdb: Avoid rebuilding target.xml for install targets
markjdb Mar 7, 2024
593aab3
tarfs: Fix checksum on 32-bit platforms.
dag-erling Mar 7, 2024
13c9839
zfs: merge openzfs/zfs@8f2f6cd2a
mmatuska Mar 7, 2024
fdf7f5f
git subrepo pull --force sys/contrib/subrepo-openzfs
bsdjhb Aug 3, 2024
b319a49
nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default
altimeter-130ft Mar 4, 2024
800add8
if_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot…
cp890582 Mar 6, 2024
b65bb91
nvme_sim: Add comment about the is_failed test
bsdimp Mar 6, 2024
94c2d34
if_bnxt: Incorrect Labeling of Supported Medium in `ifconfig -m <inf>…
cp890582 Mar 6, 2024
a0f11c1
if_bnxt: Enabled support for 1G SX, CX, and LX forced speed settings
cp890582 Mar 6, 2024
b1b39ad
if_bnxt: Update Maximum Configurable MTU from 9000 to 9600
cp890582 Mar 6, 2024
64dbeab
if_bnxt: Update Firmware Header to Latest Version 1.10.2.136
cp890582 Mar 6, 2024
0c63799
if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed
cp890582 Mar 6, 2024
433a3c9
if_bnxt: Implementation of Extended Port Hardware Stats Support for T…
cp890582 Mar 6, 2024
867811e
if_bnxt: Pluggable Module Display Support
Mar 6, 2024
a3ebf82
if_bnxt: 50G, 100G and 200G PAM4 support
cp890582 Mar 6, 2024
6c5c9f5
if_bnxt: Set 1G/10G baseT force speed as auto speeds
cp890582 Mar 6, 2024
8769ce4
amend! if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed
Mar 7, 2024
c052920
libc/iconv: don't export nonexistant symbols
brooksdavis Mar 7, 2024
5502aec
libc/quad: narrow list of symbols exposed on i386
brooksdavis Mar 7, 2024
84ad08d
libc/i386: don't attempt to export alloca
brooksdavis Mar 7, 2024
0698c2b
awk: Fix the tests
bsdimp Mar 8, 2024
fea8958
ObsoleteFiles.inc: add the awk tests I just remvoed
bsdimp Mar 8, 2024
fe62536
TCP LRO: disable mbuf queuing when packet filter hooks are in place
tuexen Mar 8, 2024
1decd43
TCP LRO: add dtrace probe points
tuexen Mar 8, 2024
a4a454f
Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi()
Mar 8, 2024
0e78d04
clk_fixed: call clkdom_dump() for verbose boot
mhorne Mar 8, 2024
c98a292
clk_fixed: quiet by default
mhorne Mar 8, 2024
7d751fc
clkdom_dump(): improve output text
mhorne Mar 8, 2024
2959879
simple_mfd: don't attach children twice
mhorne Mar 8, 2024
44a7e9a
nullfs_mount(): remove unneeded cast
kostikbel Mar 8, 2024
d8e148b
nullfs: add -o cache
kostikbel Mar 8, 2024
845e754
mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes
kostikbel Mar 8, 2024
06ae737
nullfs_mount(): fix whitespace
kostikbel Mar 8, 2024
3089cda
Skipping merge of a650ec0e55a9e0511321fd3e311bbd3aa46bcb12
bsdjhb Aug 3, 2024
cfb1786
crunchgen: slap a dependency on the generated makefile for .lo
kevans91 Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ObsoleteFiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
# xargs -n1 | sort | uniq -d;
# done

# 20240307: Improperly installed awk tests removed
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/missing-precision.ok
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/negative-nf.ok
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/pfile-overflow.ok
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/system-status.awk
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/system-status.bad
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/system-status.ok
OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/system-status.ok2
# 20240211: caroot bundle updated
OLD_FILES+=usr/share/certs/trusted/Security_Communication_Root_CA.pem

Expand Down
1 change: 1 addition & 0 deletions cddl/lib/libzpool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ KERNEL_C = \
dbuf.c \
dbuf_stats.c \
ddt.c \
ddt_stats.c \
ddt_zap.c \
dmu.c \
dmu_diff.c \
Expand Down
98 changes: 77 additions & 21 deletions cddl/usr.sbin/zfsd/case_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <syslog.h>
#include <unistd.h>

#include <libzutil.h>
#include <libzfs.h>

#include <list>
Expand Down Expand Up @@ -91,7 +92,6 @@ using DevdCtl::ParseException;

CaseFileList CaseFile::s_activeCases;
const string CaseFile::s_caseFilePath = "/var/db/zfsd/cases";
const timeval CaseFile::s_removeGracePeriod = { 60 /*sec*/, 0 /*usec*/};

//- CaseFile Static Public Methods ---------------------------------------------
CaseFile *
Expand Down Expand Up @@ -255,6 +255,7 @@ CaseFile::RefreshVdevState()

m_vdevState = vd.State();
m_vdevPhysPath = vd.PhysicalPath();
m_vdevName = vd.Name(casePool, false);
return (true);
}

Expand Down Expand Up @@ -610,15 +611,55 @@ CaseFile::ActivateSpare() {
return (Replace(vdev_type, devPath, /*isspare*/true));
}

/* Does the argument event refer to a checksum error? */
static bool
IsChecksumEvent(const Event* const event)
{
return ("ereport.fs.zfs.checksum" == event->Value("type"));
}

/* Does the argument event refer to an IO error? */
static bool
IsIOEvent(const Event* const event)
{
return ("ereport.fs.zfs.io" == event->Value("type"));
}

/* Does the argument event refer to an IO delay? */
static bool
IsDelayEvent(const Event* const event)
{
return ("ereport.fs.zfs.delay" == event->Value("type"));
}

void
CaseFile::RegisterCallout(const Event &event)
{
timeval now, countdown, elapsed, timestamp, zero, remaining;
/**
* The time ZFSD waits before promoting a tentative event
* into a permanent event.
*/
int sec = -1;
if (IsChecksumEvent(&event))
sec = CaseFile::GetVdevProp(VDEV_PROP_CHECKSUM_T);
else if (IsIOEvent(&event))
sec = CaseFile::GetVdevProp(VDEV_PROP_IO_T);
else if (IsDelayEvent(&event))
sec = CaseFile::GetVdevProp(VDEV_PROP_SLOW_IO_T);

if (sec == -1)
sec = 60; /* default */

timeval removeGracePeriod = {
sec, /*sec*/
0 /*usec*/
};

gettimeofday(&now, 0);
timestamp = event.GetTimestamp();
timersub(&now, &timestamp, &elapsed);
timersub(&s_removeGracePeriod, &elapsed, &countdown);
timersub(&removeGracePeriod, &elapsed, &countdown);
/*
* If countdown is <= zero, Reset the timer to the
* smallest positive time value instead
Expand Down Expand Up @@ -827,6 +868,10 @@ CaseFile::CaseFile(const Vdev &vdev)
guidString << m_poolGUID;
m_poolGUIDString = guidString.str();

ZpoolList zpl(ZpoolList::ZpoolByGUID, &m_poolGUID);
zpool_handle_t *zhp(zpl.empty() ? NULL : zpl.front());
m_vdevName = vdev.Name(zhp, false);

s_activeCases.push_back(this);

syslog(LOG_INFO, "Creating new CaseFile:\n");
Expand Down Expand Up @@ -1158,43 +1203,54 @@ CaseFile::Replace(const char* vdev_type, const char* path, bool isspare) {
return (retval);
}

/* Does the argument event refer to a checksum error? */
static bool
IsChecksumEvent(const Event* const event)
/* Lookup the vdev prop. Used for checksum, IO, or slow IO props */
int
CaseFile::GetVdevProp(vdev_prop_t vdev_prop) const
{
return ("ereport.fs.zfs.checksum" == event->Value("type"));
}
char val[ZFS_MAXPROPLEN];
zprop_source_t srctype;
DevdCtl::Guid poolGUID = PoolGUID();
ZpoolList zpl(ZpoolList::ZpoolByGUID, &poolGUID);
zpool_handle_t *zhp(zpl.empty() ? NULL : zpl.front());

/* Does the argument event refer to an IO error? */
static bool
IsIOEvent(const Event* const event)
{
return ("ereport.fs.zfs.io" == event->Value("type"));
}
char *prop_str = (char *) vdev_prop_to_name(vdev_prop);
if (zhp == NULL || zpool_get_vdev_prop(zhp, m_vdevName.c_str(),
vdev_prop, prop_str, val, sizeof (val), &srctype, B_FALSE) != 0)
return (-1);

/* Does the argument event refer to an IO delay? */
static bool
IsDelayEvent(const Event* const event)
{
return ("ereport.fs.zfs.delay" == event->Value("type"));
/* we'll get "-" from libzfs for a prop that is not set */
if (zfs_isnumber(val) == B_FALSE)
return (-1);

return (atoi(val));
}

bool
CaseFile::ShouldDegrade() const
{
int checksum_n = GetVdevProp(VDEV_PROP_CHECKSUM_N);
if (checksum_n == -1)
checksum_n = DEFAULT_ZFS_DEGRADE_IO_COUNT;
return (std::count_if(m_events.begin(), m_events.end(),
IsChecksumEvent) > ZFS_DEGRADE_IO_COUNT);
IsChecksumEvent) > checksum_n);
}

bool
CaseFile::ShouldFault() const
{
bool should_fault_for_io, should_fault_for_delay;
int io_n = GetVdevProp(VDEV_PROP_IO_N);
int slow_io_n = GetVdevProp(VDEV_PROP_SLOW_IO_N);

if (io_n == -1)
io_n = DEFAULT_ZFS_DEGRADE_IO_COUNT;
if (slow_io_n == -1)
slow_io_n = DEFAULT_ZFS_FAULT_SLOW_IO_COUNT;

should_fault_for_io = std::count_if(m_events.begin(), m_events.end(),
IsIOEvent) > ZFS_DEGRADE_IO_COUNT;
IsIOEvent) > io_n;
should_fault_for_delay = std::count_if(m_events.begin(), m_events.end(),
IsDelayEvent) > ZFS_FAULT_DELAY_COUNT;
IsDelayEvent) > slow_io_n;

return (should_fault_for_io || should_fault_for_delay);
}
Expand Down
22 changes: 13 additions & 9 deletions cddl/usr.sbin/zfsd/case_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,27 @@ class CaseFile
*/
int IsSpare();

/**
* \brief Get case vdev's specified property
*/
int GetVdevProp(vdev_prop_t) const;

protected:
enum {
/*
* Use these defaults if we can't get the corresponding vdev
* prop or if the prop is not set
*/
/**
* The number of soft errors on a vdev required
* to transition a vdev from healthy to degraded
* status.
* status
*/
ZFS_DEGRADE_IO_COUNT = 50,
DEFAULT_ZFS_DEGRADE_IO_COUNT = 50,
/**
* The number of delay errors on a vdev required to fault it
*/
ZFS_FAULT_DELAY_COUNT = 8,
DEFAULT_ZFS_FAULT_SLOW_IO_COUNT = 8,
};

static CalloutFunc_t OnGracePeriodEnded;
Expand Down Expand Up @@ -379,12 +388,6 @@ class CaseFile
*/
static const string s_caseFilePath;

/**
* \brief The time ZFSD waits before promoting a tentative event
* into a permanent event.
*/
static const timeval s_removeGracePeriod;

/**
* \brief A list of soft error events counted against the health of
* a vdev.
Expand All @@ -404,6 +407,7 @@ class CaseFile
string m_poolGUIDString;
string m_vdevGUIDString;
string m_vdevPhysPath;
string m_vdevName;
int m_is_spare;

/**
Expand Down
58 changes: 45 additions & 13 deletions cddl/usr.sbin/zfsd/zfsd.8
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd April 18, 2020
.Dd February 20, 2024
.Dt ZFSD 8
.Os
.Sh NAME
Expand Down Expand Up @@ -55,7 +55,7 @@ directly.
Instead, they control its behavior indirectly through zpool configuration.
There are two ways to influence
.Nm :
assigning hotspares and setting pool properties.
assigning hot spares and setting pool properties.
Currently, only the
.Em autoreplace
property has any effect.
Expand All @@ -69,48 +69,79 @@ will attempt to resolve the following types of fault:
.It device removal
When a leaf vdev disappears,
.Nm
will activate any available hotspare.
will activate any available hot spare.
.It device arrival
When a new GEOM device appears,
.Nm
will attempt to read its ZFS label, if any.
If it matches a previously removed vdev on an active pool,
.Nm
will online it.
Once resilvering completes, any active hotspare will detach automatically.
Once resilvering completes, any active hot spare will detach automatically.
.Pp
If the new device has no ZFS label but its physical path matches the
physical path of a previously removed vdev on an active pool, and that
pool has the autoreplace property set, then
.Nm
will replace the missing vdev with the newly arrived device.
Once resilvering completes, any active hotspare will detach automatically.
Once resilvering completes, any active hot spare will detach automatically.
.It vdev degrade or fault events
If a vdev becomes degraded or faulted,
.Nm
will activate any available hotspare.
will activate any available hot spare.
.It I/O errors
If a leaf vdev generates more than 50 I/O errors in a 60 second period, then
By default, if a leaf vdev generates more than 50 I/O errors in a 60 second
period, then
.Nm
will mark that vdev as
.Em FAULTED .
ZFS will no longer issue any I/Os to it.
.Nm
will activate a hot spare if one is available. The defaults can be changed by
setting the
.Em io_n
and/or
.Em io_t
vdev properties. See
.Xr vdevprops 7
for details.
.It I/O delays
By default, if a leaf vdev generates more than delayed 8 I/O events in a 60
second period, then
.Nm
will mark that vdev as
.Em FAULTED .
ZFS will no longer issue any I/Os to it.
.Nm
will activate a hotspare if one is available.
will activate a hot spare if one is available. The defaults can be changed by
setting the
.Em slow_io_n
and/or
.Em slow_io_t
vdev properties. See
.Xr vdevprops 7
for details.
.It Checksum errors
If a leaf vdev generates more than 50 checksum errors in a 60 second
period, then
By default, if a leaf vdev generates more than 50 checksum errors in a 60
second period, then
.Nm
will mark that vdev as
.Em DEGRADED .
ZFS will still use it, but zfsd will activate a spare anyway.
ZFS will still use it, but zfsd will also activate a hot spare if one is
available. The defaults can be changed by setting the
.Em checksum_n
and/or
.Em checksum_t
vdev properties. See
.Xr vdevprops 7
for details.
.It Spare addition
If the system administrator adds a hotspare to a pool that is already degraded,
If the system administrator adds a hot spare to a pool that is already degraded,
.Nm
will activate the spare.
.It Resilver complete
.Nm
will detach any hotspare once a permanent replacement finishes resilvering.
will detach any hot spare once a permanent replacement finishes resilvering.
.It Physical path change
If the physical path of an existing disk changes,
.Nm
Expand All @@ -134,6 +165,7 @@ then reads them back in when next it starts up.
.El
.Sh SEE ALSO
.Xr devctl 4 ,
.Xr vdevprops 7 ,
.Xr zpool 8
.Sh HISTORY
.Nm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,8 @@
continue;

MCRegister Reg = MO.getReg();
if (!Reg)

Check failure on line 1288 in contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp

View workflow job for this annotation

GitHub Actions / Style Checker

suspect code indent for conditional statements (8, 10)
continue;

// This picks up sibling registers (e.q. %al -> %ah).
for (MCRegUnit Unit : TRI.regunits(Reg))
Expand All @@ -1308,8 +1310,11 @@
if (!MO.isReg())
continue;

for (const MCPhysReg &Reg :
TRI.sub_and_superregs_inclusive(MO.getReg()))
MCRegister Reg = MO.getReg();
if (!Reg)

Check failure on line 1314 in contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp

View workflow job for this annotation

GitHub Actions / Style Checker

suspect code indent for conditional statements (8, 10)
continue;

for (const MCPhysReg Reg : TRI.sub_and_superregs_inclusive(Reg))

Check failure on line 1317 in contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp

View workflow job for this annotation

GitHub Actions / Style Checker

suspect code indent for conditional statements (8, 10)

Check failure on line 1317 in contrib/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp

View workflow job for this annotation

GitHub Actions / Style Checker

spaces prohibited around that ':' (ctx:WxW)
RegsToZero.reset(Reg);
}
}
Expand Down
2 changes: 0 additions & 2 deletions contrib/one-true-awk/bugs-fixed/missing-precision.ok

This file was deleted.

2 changes: 0 additions & 2 deletions contrib/one-true-awk/bugs-fixed/negative-nf.ok

This file was deleted.

4 changes: 0 additions & 4 deletions contrib/one-true-awk/bugs-fixed/pfile-overflow.ok

This file was deleted.

Loading
Loading