Module Name: src
Committed By: reinoud
Date: Thu Jun 27 09:38:08 UTC 2013
Modified Files:
src/sys/fs/udf: udf_vnops.c
Log Message:
Since UDF volumes are always mounted async, the simple UBC purging with
VOP_PUTPAGES() was never triggered resulting in far too much data in the UBC
that needed to be written out. This could result in instability on small
memory machines.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/fs/udf/udf_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.75 src/sys/fs/udf/udf_vnops.c:1.76
--- src/sys/fs/udf/udf_vnops.c:1.75 Mon Mar 18 19:35:41 2013
+++ src/sys/fs/udf/udf_vnops.c Thu Jun 27 09:38:08 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.75 2013/03/18 19:35:41 plunky Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.76 2013/06/27 09:38:08 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.75 2013/03/18 19:35:41 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.76 2013/06/27 09:38:08 reinoud Exp $");
#endif /* not lint */
@@ -276,7 +276,6 @@ udf_write(void *v)
struct extfile_entry *efe;
uint64_t file_size, old_size, old_offset;
vsize_t len;
- int async = vp->v_mount->mnt_flag & MNT_ASYNC;
int aflag = ioflag & IO_SYNC ? B_SYNC : 0;
int error;
int resid, extended;
@@ -364,7 +363,7 @@ udf_write(void *v)
* Directories are excluded since its file data that we want
* to purge.
*/
- if (!async && (vp->v_type != VDIR) &&
+ if ((vp->v_type != VDIR) &&
(old_offset >> 16 != uio->uio_offset >> 16)) {
mutex_enter(vp->v_interlock);
error = VOP_PUTPAGES(vp, (old_offset >> 16) << 16,