1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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.
This commit is contained in:
Dag-Erling Smørgrav 2004-05-25 18:40:53 +00:00
parent b103b94801
commit c53f7ace3a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129729

View File

@ -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);
}