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
22c89e0e
Commit
22c89e0e
authored
Mar 05, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
563e6927
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+22
-22
No files found.
wcfs/client/wcfs.cpp
View file @
22c89e0e
...
...
@@ -1084,6 +1084,28 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
return
make_pair
(
mmap
,
nil
);
}
// __remmapEfault remmaps Mapping memory to cause SIGSEGV on access.
//
// It is used on FileH shutdown to turn all fileh mappings into incorrect ones,
// because after fileh is down, it is not possible to continue to provide
// correct f@at data view.
//
// Must be called with the following locks held by caller:
// - virt_lock
// - fileh.mmapMu
error
_Mapping
::
__remmapAsEfault
()
{
_Mapping
&
mmap
=
*
this
;
FileH
f
=
mmap
.
fileh
;
// errctx: no need for wconn and f: __remmapAsEfault is called only from
// FileH._closeLocked who adds them.
xerr
::
Contextf
E
(
"%s: remmap as efault"
,
v
(
mmap
));
etrace
(
""
);
error
err
=
mmap_efault_into
(
mmap
.
mem_start
,
mmap
.
mem_stop
-
mmap
.
mem_start
);
return
E
(
err
);
}
// unmap releases mapping memory from address space.
//
// After call to unmap the mapping must no longer be used.
...
...
@@ -1227,28 +1249,6 @@ error _Mapping::remmap_blk(int64_t blk) {
return
nil
;
}
// __remmapEfault remmaps Mapping memory to cause SIGSEGV on access.
//
// It is used on FileH shutdown to turn all fileh mappings into incorrect ones,
// because after fileh is down, it is not possible to continue to provide
// correct f@at data view.
//
// Must be called with the following locks held by caller:
// - virt_lock
// - fileh.mmapMu
error
_Mapping
::
__remmapAsEfault
()
{
_Mapping
&
mmap
=
*
this
;
FileH
f
=
mmap
.
fileh
;
// errctx: no need for wconn and f: __remmapAsEfault is called only from
// FileH._closeLocked who adds them.
xerr
::
Contextf
E
(
"%s: remmap as efault"
,
v
(
mmap
));
etrace
(
""
);
error
err
=
mmap_efault_into
(
mmap
.
mem_start
,
mmap
.
mem_stop
-
mmap
.
mem_start
);
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