Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 1998 07:54:31 -0700
From:      David Greenman <dg@root.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        current@FreeBSD.ORG, karl@mcs.net
Subject:   Re: Better VM patches (was Tentative fix for VM bug) 
Message-ID:  <199808161454.HAA02148@implode.root.com>
In-Reply-To: Your message of "Sun, 16 Aug 1998 14:14:05 -0000." <199808161414.HAA16245@usr08.primenet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808161454.HAA02148>