summaryrefslogtreecommitdiff
path: root/sys/ufs/ext2fs/ext2fs_readwrite.c
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/ufs/ext2fs/ext2fs_readwrite.c
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/ufs/ext2fs/ext2fs_readwrite.c')
-rw-r--r--sys/ufs/ext2fs/ext2fs_readwrite.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_readwrite.c b/sys/ufs/ext2fs/ext2fs_readwrite.c
index 0f9b639c750..152674892e8 100644
--- a/sys/ufs/ext2fs/ext2fs_readwrite.c
+++ b/sys/ufs/ext2fs/ext2fs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_readwrite.c,v 1.27 2014/01/25 23:31:12 guenther Exp $ */
+/* $OpenBSD: ext2fs_readwrite.c,v 1.28 2014/04/08 18:48:41 beck Exp $ */
/* $NetBSD: ext2fs_readwrite.c,v 1.16 2001/02/27 04:37:47 chs Exp $ */
/*-
@@ -245,6 +245,8 @@ ext2fs_write(void *v)
error =
uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
+ if (ioflag & IO_NOCACHE)
+ bp->b_flags |= B_NOCACHE;
if (ioflag & IO_SYNC)
(void)bwrite(bp);
else if (xfersize + blkoffset == fs->e2fs_bsize) {