diff options
author | des <des@FreeBSD.org> | 2004-05-25 18:40:53 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-05-25 18:40:53 +0000 |
commit | c1e01a1433dcc516a2b5aa21a7ca233eac3c545d (patch) | |
tree | c47e7c0989c2490bf9ff71e5049cb6ba6524eb11 /sys/vm | |
parent | 9b7c776aa5c6aa30a05e3bd39901e169f4fb0d15 (diff) | |
download | FreeBSD-src-c1e01a1433dcc516a2b5aa21a7ca233eac3c545d.zip FreeBSD-src-c1e01a1433dcc516a2b5aa21a7ca233eac3c545d.tar.gz |
MFS: vm_map.c rev 1.187.2.27 through 1.187.2.29, fix MS_INVALIDATE
semantics but provide a sysctl knob for reverting to old ones.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index f1c53de..e7b297b 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -104,6 +104,10 @@ static int msync_flush_flags = MSYNC_FLUSH_HARDSEQ | MSYNC_FLUSH_SOFTSEQ; SYSCTL_INT(_vm, OID_AUTO, msync_flush_flags, CTLFLAG_RW, &msync_flush_flags, 0, ""); +static int old_msync; +SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0, + "Use old (insecure) msync behavior"); + static void vm_object_qcollapse(vm_object_t object); static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags); @@ -1034,7 +1038,7 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, vm_object_page_remove(object, OFF_TO_IDX(offset), OFF_TO_IDX(offset + size + PAGE_MASK), - FALSE); + old_msync ? FALSE : TRUE); } VM_OBJECT_UNLOCK(object); } |