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