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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
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 @@
...
@@ -39,6 +39,12 @@
//
//
// RW -> Uptodate: Virtmem calls pinner to remmap the page RO after commit or
// RW -> Uptodate: Virtmem calls pinner to remmap the page RO after commit or
// abort.
// abort.
//
//
// VMA -> fileh -> file
// ↑↓ ↑↓ (XXX here ?)
// Mapping FileH
//
#include "wcfs_misc.h"
#include "wcfs_misc.h"
#include "wcfs.h"
#include "wcfs.h"
...
@@ -46,6 +52,7 @@
...
@@ -46,6 +52,7 @@
#include <wendelin/bigfile/virtmem.h>
#include <wendelin/bigfile/virtmem.h>
#include <wendelin/bigfile/ram.h>
#include <wendelin/bigfile/ram.h>
#include <wendelin/bug.h>
#include <golang/fmt.h>
#include <golang/fmt.h>
...
@@ -205,20 +212,22 @@ void _Conn::_pin1(PinReq *req) {
...
@@ -205,20 +212,22 @@ void _Conn::_pin1(PinReq *req) {
if
(
!
(
mmap
->
blk_start
<=
req
->
blk
&&
req
->
blk
<
mmap
->
blk_stop
()))
if
(
!
(
mmap
->
blk_start
<=
req
->
blk
&&
req
->
blk
<
mmap
->
blk_stop
()))
continue
;
// blk ∉ mmap
continue
;
// blk ∉ mmap
// XXX reenable
//trace("\tremmapblk %d @%s" % (req->blk, (h(req.at) if req.at else "head")))
//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
// pin if virtmem did not dirtied page corresponding to this block already
// XXX reenable (link to libbigfile dso)
bool
do_pin
=
true
;
virt_lock
();
if
(
mmap
->
vma
!=
NULL
)
{
#if 0
virt_lock
();
TODO (mmap->file->blksize != mmap->fileh->ramh->ram->pagesize);
BigFileH
*
virt_fileh
=
mmap
->
vma
->
fileh
;
if (!__fileh_page_isdirty(mmap->fileh, req->blk)) {
TODO
(
mmap
->
fileh
->
_blksize
!=
virt_fileh
->
ramh
->
ram
->
pagesize
);
#endif
do_pin
=
!
__fileh_page_isdirty
(
virt_fileh
,
req
->
blk
);
}
if
(
do_pin
)
mmap
->
_remmapblk
(
req
->
blk
,
req
->
at
);
// XXX err
mmap
->
_remmapblk
(
req
->
blk
,
req
->
at
);
// XXX err
#if 0
}
if
(
mmap
->
vma
!=
NULL
)
#endif
virt_unlock
();
virt_unlock
();
//trace("\t-> remmaped"); XXX
//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