From owner-freebsd-current Sun Aug 16 07:55:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA18500 for freebsd-current-outgoing; Sun, 16 Aug 1998 07:55:17 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA18495 for ; Sun, 16 Aug 1998 07:55:16 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id HAA02148; Sun, 16 Aug 1998 07:54:32 -0700 (PDT) Message-Id: <199808161454.HAA02148@implode.root.com> To: Terry Lambert cc: current@FreeBSD.ORG, karl@mcs.net Subject: Re: Better VM patches (was Tentative fix for VM bug) In-reply-to: Your message of "Sun, 16 Aug 1998 14:14:05 -0000." <199808161414.HAA16245@usr08.primenet.com> From: David Greenman Reply-To: dg@root.com Date: Sun, 16 Aug 1998 07:54:31 -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >OK, consider the boundry cases: > >1) The page is less than the boundary, but is extended to less > than the boundary. This is seen as a truncation by setsize. > >2) The page is less than the boundary, but is extended to the > boundary. This is seen as a NOP by the first compare in the > setsize code. I assume you mean "old size" rather than "page" above. I'm probably not correctly parsing what you are trying to communicate. In any case, I just read the vnode_pager_setsize code again (third reading), and don't see any of the bugs you are describing. Are we reading the same source code? >3) The mapped page is written (an implicit extend without a write > fault -- this is, I believe, Karl Denniger's case when the > code provided failed -- between the mapping and the actual size). That will need some further looks. There could be a problem with writing an mmaped file in the last page, beyond the original EOF, without first extending the file to a page boundry. Changes beyond the original EOF might be lost in some cases. I would consider this an application bug, however. >> > object->un_pager.vnp.vnp_size = (vm_ooffset_t) size * PAGE_SIZE; >> >> I think the above change is wrong. > >It's only a comment. The actual change is: No, That was the change to the vnode_pager_setsize function and as I said previously, such a change would break partial page reads. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message