Date: Thu, 13 Aug 1998 17:40:01 -0700 (PDT) From: Luoqi Chen <luoqi@chen.ml.org> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/7422: FreeBSD-current VM systems do not properly remove mapped pages on truncate in some situations. -stable does. Message-ID: <199808140040.RAA11228@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/7422; it has been noted by GNATS.
From: Luoqi Chen <luoqi@chen.ml.org>
To: freebsd-gnats-submit@freebsd.org, dillon@backplane.com
Cc: luoqi@watermarkgroup.com
Subject: Re: kern/7422: FreeBSD-current VM systems do not properly remove mapped
pages on truncate in some situations. -stable does.
Date: Thu, 13 Aug 1998 20:35:13 -0400
This is a one-line bug in vnode_pager_setsize() function. Below is
the fix, note that the higher end of page index range in function
vm_object_page_remove() is not inclusive (I got rid of some auto
variables and unused calculation, so the fix is more than one line).
This bug should exist in -stable also, not sure why it behaved
correctly (I don't have a -stable machine to test with).
-lq
Index: sys/vm/vnode_pager.c
===================================================================
RCS file: /fun/cvs/src/sys/vm/vnode_pager.c,v
retrieving revision 1.94
diff -u -r1.94 vnode_pager.c
--- vnode_pager.c 1998/07/11 11:30:46 1.94
+++ vnode_pager.c 1998/08/14 00:23:36
@@ -271,12 +271,9 @@
vm_ooffset_t nsizerounded;
nsizerounded = IDX_TO_OFF(OFF_TO_IDX(nsize +
PAGE_MASK));
if (nsizerounded < object->un_pager.vnp.vnp_size) {
- vm_pindex_t st, end;
- st = OFF_TO_IDX(nsize + PAGE_MASK);
- end = OFF_TO_IDX(object->un_pager.vnp.vnp_size);
-
vm_freeze_copyopts(object, OFF_TO_IDX(nsize),
object->size);
- vm_object_page_remove(object, st, end, FALSE);
+ vm_object_page_remove(object, OFF_TO_IDX(nsize +
PAGE_MASK),
+ object->size, FALSE);
}
/*
* this gets rid of garbage at the end of a page that is
now
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808140040.RAA11228>
