Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
1dcbe2a4
Commit
1dcbe2a4
authored
Jul 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
dfc65803
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+2
-0
bigfile/virtmem.c
bigfile/virtmem.c
+4
-4
No files found.
bigfile/tests/test_virtmem.c
View file @
1dcbe2a4
...
...
@@ -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
...
...
bigfile/virtmem.c
View file @
1dcbe2a4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment