From 16a011f9731d62c11f5791c27539da9ec143473e Mon Sep 17 00:00:00 2001 From: Paul Saab Date: Fri, 13 Oct 2000 21:49:19 +0000 Subject: [PATCH] Do not allocate a callout for all crashdumps, not just when you panic. --- sys/dev/ata/ata-disk.c | 2 +- sys/kern/kern_shutdown.c | 3 ++- sys/sys/systm.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index fcfe377751d9..f53eca06e292 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -388,7 +388,7 @@ ad_transfer(struct ad_request *request) if (request->donecount == 0) { /* start timeout for this transfer */ - if (panicstr) + if (dumping) request->timeout_handle.callout = NULL; else request->timeout_handle = diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 01e99ead945f..eda262042094 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -109,6 +109,8 @@ watchdog_tickle_fn wdog_tickler = NULL; */ const char *panicstr; +int dumping; /* system is dumping */ + static void boot(int) __dead2; static void dumpsys(void); static void poweroff_wait(void *, int); @@ -469,7 +471,6 @@ static void dumpsys(void) { int error; - static int dumping; savectx(&dumppcb); #ifdef __i386__ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index d5f3eb39668a..a5836f33a185 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -50,6 +50,7 @@ extern int securelevel; /* system security level (see init(8)) */ extern int cold; /* nonzero if we are doing a cold boot */ extern const char *panicstr; /* panic message */ +extern int dumping; /* system is dumping */ extern int safepri; /* safe ipl when cold or panicing */ extern char version[]; /* system version */ extern char copyright[]; /* system copyright */