summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-07-20 12:23:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-07-20 12:23:03 +0000
commit7c54930736fb5d12651e9b204e8afb8123bf074d (patch)
tree8134b6717f7a1b0b0eda30112159c2d4ac669a32 /sys/arch/i386
parent6ae6938e07ea5887d5cef37a5c0c2513f7c4504d (diff)
also use bufq_quiesce() when suspending, and bufq_restart() when resuming,
which will result in more stable filesystems during suspend ok kettenis
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/apm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index 5203799650d..22243f7f573 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.86 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: apm.c,v 1.87 2010/07/20 12:23:00 deraadt Exp $ */
/*-
* Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
@@ -48,6 +48,7 @@
#include <sys/device.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
+#include <sys/buf.h>
#include <sys/event.h>
#include <sys/mount.h> /* for vfs_syncwait() proto */
@@ -322,6 +323,8 @@ apm_suspend()
#if NWSDISPLAY > 0
wsdisplay_suspend();
#endif /* NWSDISPLAY > 0 */
+ bufq_quiesce();
+
dopowerhooks(PWR_SUSPEND);
if (cold)
@@ -336,6 +339,8 @@ apm_standby()
#if NWSDISPLAY > 0
wsdisplay_suspend();
#endif /* NWSDISPLAY > 0 */
+ bufq_quiesce();
+
dopowerhooks(PWR_STANDBY);
if (cold)
@@ -365,6 +370,7 @@ apm_resume(struct apm_softc *sc, struct apmregs *regs)
/* restore hw.setperf */
if (cpu_setperf != NULL)
cpu_setperf(perflevel);
+ bufq_restart();
#if NWSDISPLAY > 0
wsdisplay_resume();
#endif /* NWSDISPLAY > 0 */