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
fff59cb0
Commit
fff59cb0
authored
Mar 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cc88c535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+5
-3
No files found.
wcfs/client/wcfs.cpp
View file @
fff59cb0
...
@@ -301,7 +301,8 @@ error _Conn::close() {
...
@@ -301,7 +301,8 @@ error _Conn::close() {
// XXX f locking
// XXX f locking
for
(
auto
_
:
wconn
.
_filehTab
)
{
for
(
auto
_
:
wconn
.
_filehTab
)
{
auto
f
=
_
.
second
;
//zodb::Oid fid = _.first;
FileH
f
=
_
.
second
;
err
=
f
->
_headf
->
close
();
// XXX mark fileh as down so that fileh.close does not say "bad fd"
err
=
f
->
_headf
->
close
();
// XXX mark fileh as down so that fileh.close does not say "bad fd"
if
(
err
!=
nil
)
if
(
err
!=
nil
)
reterr1
(
err
);
reterr1
(
err
);
...
@@ -338,7 +339,7 @@ error _Conn::_pinner(context::Context ctx) {
...
@@ -338,7 +339,7 @@ error _Conn::_pinner(context::Context ctx) {
if
(
wconn
.
_downErr
==
nil
)
{
if
(
wconn
.
_downErr
==
nil
)
{
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %w"
,
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %w"
,
err
!=
nil
?
err
:
fmt
::
errorf
(
"pinner exit"
));
err
!=
nil
?
err
:
fmt
::
errorf
(
"pinner exit"
));
// XXX error -> make all fileh and mapping invalid.
// XXX error ->
wconn.down() =
make all fileh and mapping invalid.
}
}
wconn
.
_filehMu
.
Unlock
();
wconn
.
_filehMu
.
Unlock
();
...
@@ -488,6 +489,7 @@ error _Conn::__pin1(PinReq *req) {
...
@@ -488,6 +489,7 @@ error _Conn::__pin1(PinReq *req) {
// on error don't need to continue with other mappings - all fileh and
// on error don't need to continue with other mappings - all fileh and
// all mappings become marked invalid on pinner failure.
// all mappings become marked invalid on pinner failure.
//
// XXX all call wconn._down from here under wconn._filehMu lock?
// XXX all call wconn._down from here under wconn._filehMu lock?
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
err
;
return
err
;
...
@@ -526,7 +528,7 @@ error _Conn::resync(zodb::Tid at) {
...
@@ -526,7 +528,7 @@ error _Conn::resync(zodb::Tid at) {
// we need this e.g. to be sure that head/f.size is at least as big that it will be @at state.
// we need this e.g. to be sure that head/f.size is at least as big that it will be @at state.
err
=
wconn
.
_headWait
(
at
);
err
=
wconn
.
_headWait
(
at
);
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
err
;
// XXX -> wconn down on err
?
return
err
;
// XXX -> wconn down on err
XXX + all return vvv
// lock wconn._atMu.W . This excludes everything else, and in
// lock wconn._atMu.W . This excludes everything else, and in
...
...
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