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
67094207
Commit
67094207
authored
Feb 13, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
eaa5832c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+10
-1
No files found.
wcfs/client/wcfs.cpp
View file @
67094207
...
...
@@ -411,6 +411,12 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
return
make_pair
(
nil
,
E
(
err
));
mem_stop
=
mem_start
+
blk_len
*
f
.
blksize
;
bool
retok
=
false
;
defer
([
&
]()
{
if
(
!
retok
)
mm
::
unmap
(
mem_start
,
mem_stop
-
mem_start
);
// ignore error
});
if
(
stop
>
f
.
_headfsize
)
{
uint8_t
*
zmem_start
=
mem_start
+
(
max
(
f
.
_headfsize
/*XXX -1 ?*/
,
start
)
-
start
);
err
=
mmap_zero_into_ro
(
zmem_start
,
mem_stop
-
zmem_start
);
...
...
@@ -430,7 +436,9 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
zodb
::
Tid
rev
=
_
.
second
;
if
(
!
(
blk_start
<=
blk
&&
blk
<
blk_stop
))
continue
;
// blk out of this mapping
mmap
->
_remmapblk
(
blk
,
rev
);
// XXX err?
err
=
mmap
->
_remmapblk
(
blk
,
rev
);
if
(
err
!=
nil
)
return
make_pair
(
nil
,
E
(
err
));
}
f
.
_mmaps
.
push_back
(
mmap
);
// XXX keep f._mmaps ↑blk_start
...
...
@@ -439,6 +447,7 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
vma
->
mmap_overlay_server
=
mmap
.
_ptr
();
// XXX +giveref
}
retok
=
true
;
return
make_pair
(
mmap
,
nil
);
}
...
...
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