Commit 1dcbe2a4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent dfc65803
......@@ -1367,6 +1367,8 @@ void test_file_access_mmapbase(void)
CHECK_DIRTY (page0, page2);
// XXX fh vs fh2 vs fh.page3 dirty -> page3 appears mapped in fh2 too
// XXX read page0
// XXX read page3
......
......@@ -791,14 +791,14 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write)
/* (6) page data ready. Mmap it atomically into vma address space, or mprotect
* appropriately if it was already mmaped. */
int prot = PROT_READ;
PageState newstate = PAGE_LOADED;
if (write || page->state == PAGE_DIRTY) {
PageState newstate = PAGE_LOADED; // XXX vvv PAGE_LOADED_FOR_WRITE ok?
if (write || page->state == PAGE_DIRTY || page->state == PAGE_LOADED_FOR_WRITE) {
prot |= PROT_WRITE;
newstate = PAGE_DIRTY;
}
// XXX overlay: assert !vma->page_ismappedv[blk]
// XXX overlay: mmap page to all vma of this fileh.
// XXX overlay: assert !vma->page_ismappedv[blk] XXX not ok? (retrying after virt unlock/lock)
// XXX mmap page to all vma with .mmap_overlay=1 of this fileh.
if (!bitmap_test_bit(vma->page_ismappedv, page->f_pgoffset - vma->f_pgoffset)) {
// XXX err
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment