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
c318ae0e
Commit
c318ae0e
authored
Dec 09, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3f814c0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+21
-12
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
c318ae0e
...
...
@@ -39,6 +39,12 @@
//
// RW -> Uptodate: Virtmem calls pinner to remmap the page RO after commit or
// abort.
//
//
// VMA -> fileh -> file
// ↑↓ ↑↓ (XXX here ?)
// Mapping FileH
//
#include "wcfs_misc.h"
#include "wcfs.h"
...
...
@@ -46,6 +52,7 @@
#include <wendelin/bigfile/virtmem.h>
#include <wendelin/bigfile/ram.h>
#include <wendelin/bug.h>
#include <golang/fmt.h>
...
...
@@ -205,20 +212,22 @@ void _Conn::_pin1(PinReq *req) {
if
(
!
(
mmap
->
blk_start
<=
req
->
blk
&&
req
->
blk
<
mmap
->
blk_stop
()))
continue
;
// blk ∉ mmap
// XXX reenable
//trace("\tremmapblk %d @%s" % (req->blk, (h(req.at) if req.at else "head")))
// check if virtmem did not dirtied page corresponding to this block already
// XXX reenable (link to libbigfile dso)
virt_lock
();
#if 0
TODO (mmap->file->blksize != mmap->fileh->ramh->ram->pagesize);
if (!__fileh_page_isdirty(mmap->fileh, req->blk)) {
#endif
// pin if virtmem did not dirtied page corresponding to this block already
bool
do_pin
=
true
;
if
(
mmap
->
vma
!=
NULL
)
{
virt_lock
();
BigFileH
*
virt_fileh
=
mmap
->
vma
->
fileh
;
TODO
(
mmap
->
fileh
->
_blksize
!=
virt_fileh
->
ramh
->
ram
->
pagesize
);
do_pin
=
!
__fileh_page_isdirty
(
virt_fileh
,
req
->
blk
);
}
if
(
do_pin
)
mmap
->
_remmapblk
(
req
->
blk
,
req
->
at
);
// XXX err
#if 0
}
#endif
virt_unlock
();
if
(
mmap
->
vma
!=
NULL
)
virt_unlock
();
//trace("\t-> remmaped"); XXX
}
...
...
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