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
889ea1a2
Commit
889ea1a2
authored
Oct 25, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
16b19477
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+8
-10
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
889ea1a2
...
...
@@ -233,18 +233,18 @@ tuple<Conn*, error> WCFS::connect(Tid at) {
// _pinner receives pin messages from wcfs and adjusts wconn mappings.
void
Conn
::
_pinner
(
IContext
*
ctx
)
{
Conn
*
wconn
=
this
;
Conn
&
wconn
=
*
this
;
// XXX panic/exc -> log.CRITICAL
while
(
1
)
{
// XXX -> recv inplace into on-stack req ?
SrvReq
*
req
=
wconn
->
_wlink
->
recvReq
(
ctx
);
SrvReq
*
req
=
wconn
.
_wlink
->
recvReq
(
ctx
);
if
(
req
==
NULL
)
return
// XXX ok? (EOF - when wcfs closes wlink)
// we received request to pin/unpin file block. handle it
wconn
->
_pin1
(
req
);
wconn
.
_pin1
(
req
);
// XXX free req?
}
...
...
@@ -252,22 +252,20 @@ void Conn::_pinner(IContext *ctx) {
// pin1 handles one pin request received from wcfs.
void
Conn
::
_pin1
(
SrvReq
*
req
)
{
Conn
*
wconn
=
this
;
Conn
&
wconn
=
*
this
;
// XXX defer: reply either ack or nak on error
// XXX return error?
_File
*
f
;
bool
ok
;
wconn
->
_filemu
.
lock
();
tie
(
f
,
ok
)
=
wconn
->
_filetab
.
get
(
req
->
foid
);
//if (has(wconn->_filetab, req->foid)) {
wconn
.
_filemu
.
lock
();
tie
(
f
,
ok
)
=
wconn
.
_filetab
.
get
(
req
->
foid
);
if
(
!
ok
)
{
wconn
->
_filemu
.
unlock
();
wconn
.
_filemu
.
unlock
();
// XXX err = we are not watching the file - why wcfs sent us this update?
}
//_File *f = _->second;
// XXX relock wconn -> f
...
...
@@ -296,7 +294,7 @@ void Conn::_pin1(SrvReq *req) {
f
->
pinned
[
req
->
blk
]
=
req
->
at
;
}
wconn
->
_filemu
.
unlock
();
wconn
.
_filemu
.
unlock
();
}
// _remmapblk remmaps mapping memory for file[blk] to be viewing database as of @at state.
...
...
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