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
0bfc8c11
Commit
0bfc8c11
authored
Mar 04, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
30e48319
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+10
-12
No files found.
wcfs/client/wcfs.cpp
View file @
0bfc8c11
...
@@ -353,8 +353,8 @@ error _Conn::close() {
...
@@ -353,8 +353,8 @@ error _Conn::close() {
// _pinner receives pin messages from wcfs and adjusts wconn file mappings.
// _pinner receives pin messages from wcfs and adjusts wconn file mappings.
error
_Conn
::
_pinner
(
context
::
Context
ctx
)
{
error
_Conn
::
_pinner
(
context
::
Context
ctx
)
{
_Conn
&
wconn
=
*
this
;
Conn
wconn
=
newref
(
this
);
// newref for go
error
err
=
wconn
.
__pinner
(
ctx
);
error
err
=
wconn
->
__pinner
(
ctx
);
// if pinner fails, wcfs will kill us.
// if pinner fails, wcfs will kill us.
// log pinner error so that the error is not hidden.
// log pinner error so that the error is not hidden.
...
@@ -365,18 +365,16 @@ error _Conn::_pinner(context::Context ctx) {
...
@@ -365,18 +365,16 @@ error _Conn::_pinner(context::Context ctx) {
log
::
Fatalf
(
"CRITICAL: wcfs server will likely kill us soon."
);
log
::
Fatalf
(
"CRITICAL: wcfs server will likely kill us soon."
);
fprintf
(
stderr
,
"CRITICAL: %s
\n
"
,
v
(
err
));
fprintf
(
stderr
,
"CRITICAL: %s
\n
"
,
v
(
err
));
fprintf
(
stderr
,
"CRITICAL: wcfs server will likely kill us soon.
\n
"
);
fprintf
(
stderr
,
"CRITICAL: wcfs server will likely kill us soon.
\n
"
);
}
// mark the connection non-operational if the pinner fails
// mark the connection non-operational if the pinner fails.
// XXX deadlock wrt resync? (who read-locks wconn.filehMu)
//
// XXX -> mu -> downMu ?
// XXX go because wconn.close might deadlock wrt Conn.resync on
wconn
.
_filehMu
.
Lock
();
// XXX locking ok? -> merge into below where lock is held?
// wconn._filehMu, because Conn.resync sends "watch" updates under
if
(
wconn
.
_downErr
==
nil
)
{
// wconn._filehMu.
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %w"
,
go
([
wconn
]()
{
err
!=
nil
?
err
:
fmt
::
errorf
(
"pinner exit"
)
);
wconn
->
close
(
);
// XXX error -> wconn.down() = make all fileh and mapping invalid.
});
}
}
wconn
.
_filehMu
.
Unlock
();
return
err
;
return
err
;
}
}
...
...
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