Page MenuHomeFreeBSD

livedump: add event handler hooks
ClosedPublic

Authored by mhorne on Jan 27 2022, 9:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 9:27 AM
Unknown Object (File)
Sun, Oct 27, 7:56 AM
Unknown Object (File)
Fri, Oct 11, 1:23 AM
Unknown Object (File)
Oct 4 2024, 4:27 AM
Unknown Object (File)
Oct 2 2024, 4:23 AM
Unknown Object (File)
Oct 1 2024, 12:35 PM
Unknown Object (File)
Oct 1 2024, 7:56 AM
Unknown Object (File)
Sep 30 2024, 12:08 PM

Details

Summary

Add three hooks to the livedump process: before, after, and for each
block of dumped data. This allows, for example, quiescing the system
before the dump begins or protecting data of interest to ensure its
consistency in the final output.

Diff Detail

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

Event Timeline

Change language grammar and spelling LGTM. I'll let others check consistency with source code.

share/man/man9/EVENTHANDLER.9
328

Since you're touching this section

debdrup added a subscriber: debdrup.

mdoc looks good, you can fix the nit Pau Amma pointed out

This revision is now accepted and ready to land.Jan 28 2022, 2:07 AM
sys/kern/kern_vnodedumper.c
60

How could this declaration used? It is only available in this .c file, so all users must be in this .c file as well. Then why not call them directly, instead of using the machinery of eventhandlers?

Move handler declarations to kerneldump.h.

This revision now requires review to proceed.Feb 2 2022, 3:06 PM
This revision is now accepted and ready to land.Feb 3 2022, 1:25 PM
sys/kern/kern_vnodedumper.c
121–123

Save the minidumpsys() error in a separate variable? Why is it useful to allow the _finish handlers to return an error?

Remove the error arg from the livedumper_finish event.

This revision now requires review to proceed.Mar 22 2022, 4:35 PM

English LGTM. Committable if others OK content.

This revision is now accepted and ready to land.Mar 22 2022, 8:14 PM
markj added inline comments.
share/man/man9/EVENTHANDLER.9
324

Might want to s/minidump/kernel dump/ per the discussion in the vnode dumper review.

This revision was automatically updated to reflect the committed changes.