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
ded803b0
Commit
ded803b0
authored
Feb 17, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cfe546ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+8
-5
wcfs/client/wcfs_misc.cpp
wcfs/client/wcfs_misc.cpp
+1
-1
No files found.
wcfs/client/wcfs.cpp
View file @
ded803b0
...
@@ -258,7 +258,7 @@ error _Conn::__pin1(PinReq *req) {
...
@@ -258,7 +258,7 @@ error _Conn::__pin1(PinReq *req) {
// if virtmem dirtied the page - it will ask us to remmap it again after commit or abort.
// if virtmem dirtied the page - it will ask us to remmap it again after commit or abort.
bool
do_pin
=
true
;
bool
do_pin
=
true
;
error
err
;
error
err
;
if
(
mmap
->
vma
!=
NULL
)
{
if
(
mmap
->
vma
!=
nil
)
{
virt_lock
();
virt_lock
();
BigFileH
*
virt_fileh
=
mmap
->
vma
->
fileh
;
BigFileH
*
virt_fileh
=
mmap
->
vma
->
fileh
;
TODO
(
mmap
->
fileh
->
blksize
!=
virt_fileh
->
ramh
->
ram
->
pagesize
);
TODO
(
mmap
->
fileh
->
blksize
!=
virt_fileh
->
ramh
->
ram
->
pagesize
);
...
@@ -268,7 +268,7 @@ error _Conn::__pin1(PinReq *req) {
...
@@ -268,7 +268,7 @@ error _Conn::__pin1(PinReq *req) {
if
(
do_pin
)
if
(
do_pin
)
err
=
mmap
->
_remmapblk
(
req
->
blk
,
req
->
at
);
err
=
mmap
->
_remmapblk
(
req
->
blk
,
req
->
at
);
if
(
mmap
->
vma
!=
NULL
)
if
(
mmap
->
vma
!=
nil
)
virt_unlock
();
virt_unlock
();
// on error don't need to continue with other mappings - all fileh and
// on error don't need to continue with other mappings - all fileh and
...
@@ -450,7 +450,7 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
...
@@ -450,7 +450,7 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
return
make_pair
(
nil
,
E
(
err
));
return
make_pair
(
nil
,
E
(
err
));
}
}
if
(
vma
!=
NULL
)
{
if
(
vma
!=
nil
)
{
if
(
vma
->
mmap_overlay_server
!=
nil
)
if
(
vma
->
mmap_overlay_server
!=
nil
)
panic
(
"vma is already associated with overlay server"
);
panic
(
"vma is already associated with overlay server"
);
if
(
!
(
vma
->
addr_start
==
0
&&
vma
->
addr_stop
==
0
))
if
(
!
(
vma
->
addr_start
==
0
&&
vma
->
addr_stop
==
0
))
...
@@ -480,9 +480,12 @@ error _Mapping::unmap() {
...
@@ -480,9 +480,12 @@ error _Mapping::unmap() {
// XXX locking
// XXX locking
// XXX make sure mmap cannot be XXX
// XXX make sure mmap cannot be XXX
if
(
mmap
->
vma
!=
nil
)
{
}
error
err
=
mm
::
unmap
(
mmap
->
mem_start
,
mmap
->
mem_stop
-
mmap
->
mem_start
);
error
err
=
mm
::
unmap
(
mmap
->
mem_start
,
mmap
->
mem_stop
-
mmap
->
mem_start
);
mmap
->
mem_start
=
NULL
;
mmap
->
mem_start
=
nil
;
mmap
->
mem_stop
=
NULL
;
mmap
->
mem_stop
=
nil
;
// XXX clear other fields?
// XXX clear other fields?
//f->_mmaps.remove(mmap);
//f->_mmaps.remove(mmap);
...
...
wcfs/client/wcfs_misc.cpp
View file @
ded803b0
...
@@ -145,7 +145,7 @@ tuple<uint8_t*, error> map(int prot, int flags, os::File f, off_t offset, size_t
...
@@ -145,7 +145,7 @@ tuple<uint8_t*, error> map(int prot, int flags, os::File f, off_t offset, size_t
if
(
flags
&
MAP_FIXED
)
if
(
flags
&
MAP_FIXED
)
panic
(
"MAP_FIXED not allowed for map - use map_into"
);
panic
(
"MAP_FIXED not allowed for map - use map_into"
);
addr
=
::
mmap
(
NULL
,
size
,
prot
,
flags
,
f
->
fd
(),
offset
);
addr
=
::
mmap
(
nil
,
size
,
prot
,
flags
,
f
->
fd
(),
offset
);
if
(
addr
==
MAP_FAILED
)
if
(
addr
==
MAP_FAILED
)
return
make_tuple
(
nil
,
os
::
_pathError
(
"mmap"
,
f
->
name
(),
errno
));
return
make_tuple
(
nil
,
os
::
_pathError
(
"mmap"
,
f
->
name
(),
errno
));
...
...
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