diff options
author | 2009-12-01 03:43:17 +0000 | |
---|---|---|
committer | 2009-12-01 03:43:17 +0000 | |
commit | 64b27efaf75c4907ec9d9beaac87613e645e450d (patch) | |
tree | d0829b3221005652f5acfb9de9aaea7aa843c579 | |
parent | properly handle all xs states that can be returned by an adapter in sd. (diff) | |
download | wireguard-openbsd-64b27efaf75c4907ec9d9beaac87613e645e450d.tar.xz wireguard-openbsd-64b27efaf75c4907ec9d9beaac87613e645e450d.zip |
Mark disk as dirty when starting a write to it. Restores issuing of
SYNCHRONIZE_CACHE commands on device close.
ok dlg@ marco@
-rw-r--r-- | sys/scsi/sd.c | 7 |
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); } } |