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
6c998ca4
Commit
6c998ca4
authored
Dec 23, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ffbaed36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
wcfs/internal/wcfs.h
wcfs/internal/wcfs.h
+1
-0
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+12
-14
No files found.
wcfs/internal/wcfs.h
View file @
6c998ca4
...
...
@@ -116,6 +116,7 @@ public:
private:
error
_pinner
(
context
::
Context
ctx
);
void
_pin1
(
PinReq
*
req
);
error
__pin1
(
PinReq
*
req
);
};
// FileH represent isolated file view under Conn.
...
...
wcfs/internal/wcfs_virtmem.cpp
View file @
6c998ca4
...
...
@@ -177,24 +177,20 @@ error _Conn::_pinner(context::Context ctx) { // XXX error -> where?
}
// pin1 handles one pin request received from wcfs.
// XXX return error?
void
_Conn
::
_pin1
(
PinReq
*
req
)
{
_Conn
&
wconn
=
*
this
;
error
err
=
wconn
.
__pin1
(
req
);
// XXX return error?
// XXX defer: reply either ack or nak on error
// reply either ack or nak on error
#if 0
defer([&]() {
ack = "ack"
exc = sys.exc_info()[1]
if exc is not None:
ack = "nak: %s" % exc
//req.reply(ack)
ctx = context.background() // XXX ok?
wconn._wlink.replyReq(ctx, req, ack)
});
#endif
string
ack
=
"ack"
;
if
(
err
!=
nil
)
ack
=
fmt
::
sprintf
(
"nak: %s"
,
err
->
Error
().
c_str
());
wconn
.
_wlink
->
replyReq
(
context
::
background
(),
req
,
ack
);
// XXX ctx ok?
}
error
_Conn
::
__pin1
(
PinReq
*
req
)
{
_Conn
&
wconn
=
*
this
;
FileH
f
;
bool
ok
;
...
...
@@ -203,6 +199,7 @@ void _Conn::_pin1(PinReq *req) {
if
(
!
ok
)
{
wconn
.
_filehmu
.
unlock
();
// XXX err = we are not watching the file - why wcfs sent us this update?
return
fmt
::
errorf
(
"err TODO"
);
}
...
...
@@ -244,6 +241,7 @@ void _Conn::_pin1(PinReq *req) {
}
wconn
.
_filehmu
.
unlock
();
return
nil
;
}
// open opens FileH corresponding to ZBigFile foid.
...
...
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