freebsd-src/sys/geom
Mitchell Horne 4eb861d362 shutdown: audit shutdown_post_sync event callbacks
Ensure they are all panic/debugger safe.

Most handlers for this event are for disk drivers/geom modules. There
are a mix of checks being used here (or not), so let's standardize on
checking the presence of the RB_NOSYNC flag.

This flag is set whenever:
 1. The kernel has panicked and kern.sync_on_panic=0*
 2. We reboot from within the kernel debugger (the "reset" command)
 3. Userspace requested it, e.g. by 'reboot -n'

Name the functions consistently.

*This sysctl is tuned to zero by default, but its existence means that
these handlers can be executed after a panic, at the user's discretion.
IMO this use-case is implicitly understood to be risky, and we'd be
better off eliminating it altogether.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D42337
2023-11-23 12:07:42 -04:00
..
bde sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
cache sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
concat sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
eli sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gate sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
journal shutdown: audit shutdown_post_sync event callbacks 2023-11-23 12:07:42 -04:00
label sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
linux_lvm geom_linux_lvm: Avoid removing from vg_list before inserting 2023-10-17 11:19:05 -04:00
mirror shutdown: audit shutdown_post_sync event callbacks 2023-11-23 12:07:42 -04:00
mountver geom: sort includes for some files 2023-11-23 12:07:42 -04:00
multipath sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nop sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
part gpart: Be less picky about GPT Tables in some cases 2023-10-26 10:14:54 -06:00
raid shutdown: audit shutdown_post_sync event callbacks 2023-11-23 12:07:42 -04:00
raid3 shutdown: audit shutdown_post_sync event callbacks 2023-11-23 12:07:42 -04:00
shsec sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
stripe sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
union spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
uzip sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vinum sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
virstor sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
zero sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_bsd_enc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_ccd.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_ctl.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_ctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_dbg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_dev.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_disk.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_disk.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_dump.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_event.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_flashmap.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_flashmap.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_int.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_io.c Fix geom build with clang 17 and KTR enabled 2023-09-17 14:13:09 +02:00
geom_kern.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_map.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_redboot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_slice.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_slice.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
geom_subr.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_vfs.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom_vfs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
notes sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00