Page MenuHomeFreeBSD

Multiple fixes to zfsd and its tests
ClosedPublic

Authored by asomers on Apr 5 2023, 5:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 17, 5:31 PM
Unknown Object (File)
Mon, Dec 30, 7:48 PM
Unknown Object (File)
Dec 11 2024, 10:33 PM
Unknown Object (File)
Dec 2 2024, 3:26 AM
Unknown Object (File)
Dec 2 2024, 3:26 AM
Unknown Object (File)
Dec 2 2024, 3:03 AM
Unknown Object (File)
Dec 2 2024, 2:41 AM
Unknown Object (File)
Nov 29 2024, 9:09 AM
Subscribers

Details

Summary

zfs tests: wait for gnop devices to disappear after "gnop destroy"

Apparently that process is asynchronous now, or maybe it's just slower
than it used to be.

MFC after: 2 weeks
Pull Request: Axcient

zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs

At some point the names of these devd events changed. Probably it
happened when importing OpenZFS. Before that, FreeBSD's sysevent_alloc
method didn't create a "class" nvpair in the event, which led to
log_sysevent using the event's ev_subclass field as its type.

MFC after: 2 weeks
Sponsored by: Axcient

The zfsd tests no longer require camcontrol

This was a harmless oversight from
11ed0a95bfa76791dc6428eb2d47a986c0c6f8a3

MFC after: 2 weeks
MFC with: 11ed0a95bfa76791dc6428eb2d47a986c0c6f8a3
Sponsored by: Axcient

Fix the zfsd_degrade_001_pos test for recent zfs versions.

It seems that ZFS now rate limits checksum errors to about 20 per
second. But zfsd's threshold for degrading a disk is 50 per minute. So
we must alternately corrupt and scrub the pool to ensure that checksum
errors are generated in multiple 1-second windows, so that zfsd will see
enough of them.

MFC after: 2 weeks
Sponsored by: Axcient

Fix the zfsd_fault_001_pos test in VMs

And, for that matter, when using NVME or SATA disks. As originally
written, the test used the da driver to inject errors. Rewrite it to
use gnop vdevs. gnop can also inject errors. It works on top of any
disk device, and it's also faster than using da.

MFC after: 2 weeks
Sponsored by: Axcient

Test Plan

the existing zfsd test suite

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

With these changes, the zfsd tests all pass again except for zfsd_degrade_001_pos. It's still broken by https://github.com/openzfs/zfs/issues/14717 . I don't have a permanent fix for that bug ready yet.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 10 2023, 10:41 PM
This revision was automatically updated to reflect the committed changes.