summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-05-06 05:45:57 +0000
committeralc <alc@FreeBSD.org>2002-05-06 05:45:57 +0000
commitd60a525036422ccbba23ce156a0a31a69aa7ebbb (patch)
tree8750eed2fb1169b9dac9c1c7e15f630aca3a5177 /sys/vm/vm_object.c
parentbfe0870a5677e80b9c46e2321657e424a6a20614 (diff)
downloadFreeBSD-src-d60a525036422ccbba23ce156a0a31a69aa7ebbb.zip
FreeBSD-src-d60a525036422ccbba23ce156a0a31a69aa7ebbb.tar.gz
o Condition the compilation and use of vm_freeze_copyopts()
on ENABLE_VFS_IOOPT.
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index e6da475..352ad2f 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -401,7 +401,9 @@ vm_object_vndeallocate(vm_object_t object)
object->ref_count--;
if (object->ref_count == 0) {
vp->v_flag &= ~VTEXT;
+#ifdef ENABLE_VFS_IOOPT
vm_object_clear_flag(object, OBJ_OPT);
+#endif
}
/*
* vrele may need a vop lock
@@ -496,8 +498,10 @@ doterm:
if (temp) {
TAILQ_REMOVE(&temp->shadow_head, object, shadow_list);
temp->shadow_count--;
+#ifdef ENABLE_VFS_IOOPT
if (temp->ref_count == 0)
vm_object_clear_flag(temp, OBJ_OPT);
+#endif
temp->generation++;
object->backing_object = NULL;
}
@@ -547,11 +551,12 @@ vm_object_terminate(vm_object_t object)
if (object->type == OBJT_VNODE) {
struct vnode *vp;
+#ifdef ENABLE_VFS_IOOPT
/*
* Freeze optimized copies.
*/
vm_freeze_copyopts(object, 0, object->size);
-
+#endif
/*
* Clean pages and flush buffers.
*/
@@ -1783,7 +1788,10 @@ vm_object_set_writeable_dirty(vm_object_t object)
}
}
+#ifdef ENABLE_VFS_IOOPT
/*
+ * Experimental support for zero-copy I/O
+ *
* Performs the copy_on_write operations necessary to allow the virtual copies
* into user space to work. This has to be called for write(2) system calls
* from other processes, file unlinking, and file size shrinkage.
@@ -1859,6 +1867,7 @@ vm_freeze_copyopts(vm_object_t object, vm_pindex_t froma, vm_pindex_t toa)
vm_object_clear_flag(object, OBJ_OPT);
}
+#endif
#include "opt_ddb.h"
#ifdef DDB
OpenPOWER on IntegriCloud