linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* filemap_nopage is broken!!
@ 1998-04-22 20:51 Eric W. Biederman
  1998-04-23 22:01 ` Stephen C. Tweedie
  0 siblings, 1 reply; 4+ messages in thread
From: Eric W. Biederman @ 1998-04-22 20:51 UTC (permalink / raw)
  To: linux-mm


While looking at what is needs to happen to get large file support
working on linux-intel, I discovered an interesting twist with
generic_file_mmap.

mmap being the most interesting case to port, because the generic
interface allows for non aligned mappings.  Making it the most
intersting case to handle.

generic_file_mmap allows filesystem block aligned mappings if the
mapping is private.  The way it implements this, after I finally
tracked it is broken.

For private mappings the same filemap_nopage function that is used for
shared mappings is used.  The filemap_nopage function alwasy make sure
it's pages are in the page cache before it uses them.

For a private mapping (not page aligned) this results in a non-aligned
page to be created in the page cache.

Now if the following sequence of actions occure.
a) A page is mapped privately with poor alignment.
b) That part of the file is written again.
c) The page is again mapped privately with poor alignment.

When the page cache page is not scavenged between a and c, the same
data is read, despite the fact it has changed on disk, and in the
aligned page cache page!

That is broken behavior.

Does anyone know where it comes from?

Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-04-24 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-22 20:51 filemap_nopage is broken!! Eric W. Biederman
1998-04-23 22:01 ` Stephen C. Tweedie
1998-04-24  0:51   ` Eric W. Biederman
1998-04-24 20:32     ` Stephen C. Tweedie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox