On Wed, 2009-03-04 at 01:02 +0900, hooanon05@xxxxxxxxxxx wrote: > Dave Kleikamp: > > No. I was saying the opposite. Nothing that happens to the upper > > address space would be visible to the lower address space. The upper > > file could read from the lower file system on-demand as pages are > > faulted. There is no need to copy everything at once. > > So you mean, > - you have two mmap for a single file Explain what you mean by a single file. If there are two mmaps to the upper file, they will see the same changes. If one is to the upper file, and one is to the lower file, they will NOT be mmap'ed to the same file. > - the first mapping is done, it may map the file on the lower rdonly > layer This mapping will only ever see the lower contents > - the other mapping modifies the contents The upper mapping will contain data pages with modified content. Only those pages accessed will be copied (if necessary) from the lower file. > - when a page in the first mapping accessed again, the page is read from > the upper layer. No. The first mapping is not even aware of the second mapping. It continues to see the read-only data > Right? No Shaggy -- David Kleikamp IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html