From owner-freebsd-current Wed Sep 30 12:55:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA09020 for freebsd-current-outgoing; Wed, 30 Sep 1998 12:55:59 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA09011 for ; Wed, 30 Sep 1998 12:55:56 -0700 (PDT) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id MAA12663; Wed, 30 Sep 1998 12:47:06 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpdr12652; Wed Sep 30 19:46:59 1998 Date: Wed, 30 Sep 1998 12:46:52 -0700 (PDT) From: Julian Elischer To: David Greenman cc: Terry Lambert , current@FreeBSD.ORG Subject: Re: VM mmap file extension bug still exists? In-Reply-To: <199809300920.CAA04277@implode.root.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG well, yes, I considered doing that. but couldn't convince myself that there was no case where the user is mapping only PART of a file, and that 'size' might represent the mapped region size (in pages) where "size_in_bytes" is the filesize. In many cases these are the same, but I wasn't confident enough in my understanding of this code to state publically that one value could always be derived from the other. In fact I managed to0 convince myself that it was likely that this was not always the case, and took the safe route. julian On Wed, 30 Sep 1998, David Greenman wrote: > >> It's definitely a workaround. The real fix is to add a parementer to > >> the mapping function. > > > >Ok here's the patch done the 'correct way' > >I have looked at the problem with terry and he has convinced me that > >there IS a problem there. > > Well, as I said in previous email, I'm not convinced that adding another > argument to the pager_alloc functions is "correct", and I think your patches > pretty well demonstrate that. It appears to me that in every case, the > "size_in_bytes" is just the non-rounded/indexed version of the original > "size" parameter, so why don't we simply change the definition of "size" to > be an off_t number of bytes and then do the OFF_TO_IDX translation in the > pager(s) as necessary, instead of at the caller? > > -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