summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-12-01 03:43:18 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-12-01 03:43:18 +0000
commit66a900b4eafdab32da783f23c78294ccbd280364 (patch)
tree0feddc6f04915997f7700c054f5883df9b34a8ab /sys/scsi
parent4e2686172affb675337d24909f61d8ba3fbfc083 (diff)
Mark disk as dirty when starting a write to it. Restores issuing of
SYNCHRONIZE_CACHE commands on device close. ok dlg@ marco@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/sd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 62ca807d63c..56112eab8b0 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.166 2009/12/01 01:50:35 dlg Exp $ */
+/* $OpenBSD: sd.c,v 1.167 2009/12/01 03:43:17 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -748,6 +748,11 @@ sdstart(void *v)
/* Instrumentation. */
disk_busy(&sc->sc_dk);
+
+ /* Mark disk as dirty. */
+ if ((bp->b_flags & B_READ) == 0)
+ sc->flags |= SDF_DIRTY;
+
scsi_xs_exec(xs);
}
}