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
9637fdac
Commit
9637fdac
authored
Feb 17, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cb5c1ce6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+29
-29
No files found.
wcfs/client/wcfs.cpp
View file @
9637fdac
...
...
@@ -543,6 +543,35 @@ error _Conn::resync(zodb::Tid at) {
return
nil
;
}
// unmap releases mapping memory from address space.
//
// After call to unmap the mapping must no longer be used.
// virtmem calls unmap when VMA is unmapped.
error
_Mapping
::
unmap
()
{
Mapping
mmap
=
newref
(
this
);
// XXX newref for std::remove
FileH
f
=
mmap
->
fileh
;
xerr
::
Contextf
E
(
"wcfs %s: conn @%s: f<%s>: unmap"
,
v
(
f
->
wconn
->
_wc
->
mountpoint
),
v
(
f
->
wconn
->
at
),
v
(
f
->
foid
));
// XXX locking
// XXX make sure mmap cannot be XXX
error
err
=
mm
::
unmap
(
mmap
->
mem_start
,
mmap
->
mem_stop
-
mmap
->
mem_start
);
mmap
->
mem_start
=
NULL
;
mmap
->
mem_stop
=
NULL
;
// XXX clear other fields?
//f->_mmaps.remove(mmap);
// FIXME keep mmaps sorted
f
->
_mmaps
.
erase
(
std
::
remove
(
f
->
_mmaps
.
begin
(),
f
->
_mmaps
.
end
(),
mmap
),
f
->
_mmaps
.
end
());
return
E
(
err
);
}
// _remmapblk remmaps mapping memory for file[blk] to be viewing database as of @at state.
//
// at=TidHead means unpin to head/ .
...
...
@@ -622,35 +651,6 @@ error _Mapping::remmap_blk(int64_t blk) {
return
nil
;
}
// unmap releases mapping memory from address space.
//
// After call to unmap the mapping must no longer be used.
// virtmem calls unmap when VMA is unmapped.
error
_Mapping
::
unmap
()
{
Mapping
mmap
=
newref
(
this
);
// XXX newref for std::remove
FileH
f
=
mmap
->
fileh
;
xerr
::
Contextf
E
(
"wcfs %s: conn @%s: f<%s>: unmap"
,
v
(
f
->
wconn
->
_wc
->
mountpoint
),
v
(
f
->
wconn
->
at
),
v
(
f
->
foid
));
// XXX locking
// XXX make sure mmap cannot be XXX
error
err
=
mm
::
unmap
(
mmap
->
mem_start
,
mmap
->
mem_stop
-
mmap
->
mem_start
);
mmap
->
mem_start
=
NULL
;
mmap
->
mem_stop
=
NULL
;
// XXX clear other fields?
//f->_mmaps.remove(mmap);
// FIXME keep mmaps sorted
f
->
_mmaps
.
erase
(
std
::
remove
(
f
->
_mmaps
.
begin
(),
f
->
_mmaps
.
end
(),
mmap
),
f
->
_mmaps
.
end
());
return
E
(
err
);
}
// ---- WCFS raw file access ----
// _path returns path for object on wcfs.
...
...
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