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
cb5c1ce6
Commit
cb5c1ce6
authored
Feb 17, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a1a06fea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
bigfile/file_zodb.cpp
bigfile/file_zodb.cpp
+2
-1
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+10
-5
wcfs/client/wcfs.h
wcfs/client/wcfs.h
+1
-1
No files found.
bigfile/file_zodb.cpp
View file @
cb5c1ce6
...
...
@@ -41,12 +41,13 @@ static void* zfile_mmap_setup_read(VMA *vma, BigFile *file, blk_t blk, size_t bl
if
(
err
!=
nil
)
panic
(
"TODO"
);
// XXX
#if 0 // done by wcfs.cpp
mmap->incref(); // vma->mmap_overlay_server is keeping ref to mmap
vma->mmap_overlay_server = mmap._ptr();
// XXX here? -> in fileh->mmap? don't set at all here?
vma->addr_start = (uintptr_t)mmap->mem_start;
vma->addr_stop = (uintptr_t)mmap->mem_stop;
#endif
return
(
void
*
)
vma
->
addr_start
;
// XXX kill if we set vma->addr_*
}
...
...
wcfs/client/wcfs.cpp
View file @
cb5c1ce6
...
...
@@ -450,14 +450,19 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
return
make_pair
(
nil
,
E
(
err
));
}
f
.
_mmaps
.
push_back
(
mmap
);
// TODO keep f._mmaps ↑blk_start
// XXX vvv kill from here completely?
// (zfile_mmap_setup_read does vma->mmap_overlay_server = mmap + incref itself)
if
(
vma
!=
NULL
)
{
vma
->
mmap_overlay_server
=
mmap
.
_ptr
();
// XXX +giveref
if
(
vma
->
mmap_overlay_server
!=
nil
)
panic
(
"vma is already associated with overlay server"
);
if
(
!
(
vma
->
addr_start
==
0
&&
vma
->
addr_stop
==
0
))
panic
(
"vma already covers !nil virtual memory area"
);
mmap
->
incref
();
// vma->mmap_overlay_server is keeping ref to mmap
vma
->
mmap_overlay_server
=
mmap
.
_ptr
();
vma
->
addr_start
=
(
uintptr_t
)
mmap
->
mem_start
;
vma
->
addr_stop
=
(
uintptr_t
)
mmap
->
mem_stop
;
}
f
.
_mmaps
.
push_back
(
mmap
);
// TODO keep f._mmaps ↑blk_start
retok
=
true
;
return
make_pair
(
mmap
,
nil
);
}
...
...
wcfs/client/wcfs.h
View file @
cb5c1ce6
...
...
@@ -33,7 +33,7 @@
// views are a bit outdated, but close to head, which means that in practice
// the kernel cache for /head/bigfile/* is being used almost 100% of the time.
//
// A mapping for bigfile X
@at is built from OS-level memory mappings of
// A mapping for bigfile X@at is built from OS-level memory mappings of
// on-WCFS files as follows:
//
// ___ /@revA/bigfile/X
...
...
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