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
07700777
Commit
07700777
authored
Jan 15, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a4a66607
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
wcfs/internal/wcfs.cpp
wcfs/internal/wcfs.cpp
+10
-4
No files found.
wcfs/internal/wcfs.cpp
View file @
07700777
...
...
@@ -165,8 +165,10 @@ error _Conn::_pinner(context::Context ctx) {
// mark the connection non-operational if the pinner fails
wconn
.
_downMu
.
lock
();
if
(
wconn
.
_downErr
==
nil
)
if
(
wconn
.
_downErr
==
nil
)
{
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %s"
,
v
(
err
));
// XXX make all fileh and mapping invalid.
}
wconn
.
_downMu
.
unlock
();
return
err
;
...
...
@@ -424,9 +426,13 @@ error _Conn::resync(zodb::Tid at) {
xerr
::
Contextf
E
(
"conn @%s: resync -> @%s"
,
v
(
wconn
.
at
),
v
(
at
));
// XXX +wcfs path?
// XXX locking
error
err
;
if
(
wconn
.
_downErr
!=
nil
)
// XXX lock with _filehmu
return
E
(
wconn
.
_downErr
);
wconn
.
_downMu
.
lock
();
err
=
wconn
.
_downErr
;
wconn
.
_downMu
.
unlock
();
if
(
err
!=
nil
)
return
E
(
err
);
for
(
auto
fit
:
wconn
.
_filehtab
)
{
zodb
::
Oid
foid
=
fit
.
first
;
...
...
@@ -437,7 +443,7 @@ error _Conn::resync(zodb::Tid at) {
// update f._headfsize and remmap to head/f zero regions that are now covered by head/f
struct
stat
st
;
err
or
err
=
f
->
_headf
->
stat
(
&
st
);
err
=
f
->
_headf
->
stat
(
&
st
);
if
(
err
!=
nil
)
return
E
(
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