On Sat, Feb 22, 2025 at 10:03:58PM -0500, James Boyle wrote:
> Hi again,
>
> I attempted to get the debug messages to print by doing:
> cd /usr/src/sys/arch/amd64/conf, copying GENERIC.MP to
> GENERIC.MP.BIODEBUG, and making this change:
> --- GENERIC.MP Wed Feb 5 23:54:35 2025
> +++ GENERIC.MP.BIODEBUG Wed Feb 5 15:38:10 2025
> @@ -6,4 +6,6 @@
> #option MP_LOCKDEBUG
> #option WITNESS
>
> +option SR_DEBUG
> +
> cpu* at mainbus?
>
> Then, I recompiled the kernel and rebooted. I didn't see any debug
> messages related to softraid, even though my system partitions are using
> a RAID 1C device.
You also need to set the sr_debug variable in sys/dev/softraid.c
to a non-zero value in order to trigger debug messages.
Setting it to SR_D_META should trigger the printf which shows
the current volume state:
diff /usr/src
path + /usr/src
commit - 2931bd70948bd145872e683c3bf5745751cfd4be
blob - c10ebeaaa93cb2bbe1350651f5f81bc76b773812
file + sys/dev/softraid.c
--- sys/dev/softraid.c
+++ sys/dev/softraid.c
@@ -61,19 +61,19 @@
#ifdef SR_DEBUG
#define SR_FANCY_STATS
uint32_t sr_debug = 0
/* | SR_D_CMD */
/* | SR_D_MISC */
/* | SR_D_INTR */
/* | SR_D_IOCTL */
/* | SR_D_CCB */
/* | SR_D_WU */
- /* | SR_D_META */
+ | SR_D_META
/* | SR_D_DIS */
/* | SR_D_STATE */
/* | SR_D_REBUILD */
;
#endif
struct sr_softc *softraid0;
struct sr_uuid sr_bootuuid;
u_int8_t sr_bootkey[SR_CRYPTO_MAXKEYBYTES];