summaryrefslogtreecommitdiff
path: root/sys/msdosfs
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2014-04-08 18:48:42 +0000
committerBob Beck <beck@cvs.openbsd.org>2014-04-08 18:48:42 +0000
commit02d836163d83b98646740e86de95f86529a4e3dc (patch)
treed03eeb9a87e82df4a62b89d50019f8ae504b81e0 /sys/msdosfs
parent7ca30df626e08a236325f4c383792994380cb841 (diff)
add IO_NOCACHE flag to vop_write arguments, which in turn sets B_NOCACHE
on the written buffers. Use the flag for writes from the page daemon to ensure that we free buffers written out by the page daemon rather than caching them. ok kettenis@
Diffstat (limited to 'sys/msdosfs')
-rw-r--r--sys/msdosfs/msdosfs_vnops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 581c4174741..ef78d3ec5ce 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.91 2013/12/14 02:57:25 guenther Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.92 2014/04/08 18:48:41 beck Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -743,6 +743,8 @@ msdosfs_write(void *v)
* without delay. Otherwise do a delayed write because we
* may want to write somemore into the block later.
*/
+ if (ioflag & IO_NOCACHE)
+ bp->b_flags |= B_NOCACHE;
if (ioflag & IO_SYNC)
(void) bwrite(bp);
else if (n + croffset == pmp->pm_bpcluster)