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
fa59e4c9
Commit
fa59e4c9
authored
Feb 13, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5dfff338
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+12
-4
No files found.
wcfs/client/wcfs.cpp
View file @
fa59e4c9
...
...
@@ -467,11 +467,18 @@ error _Conn::resync(zodb::Tid at) {
if
(
err
!=
nil
)
return
E
(
err
);
bool
retok
=
false
;
defer
([
&
]()
{
if
(
!
retok
)
;
// XXX bring wconn + fileh + mmaps down on errror
});
for
(
auto
fit
:
wconn
.
_filehtab
)
{
zodb
::
Oid
foid
=
fit
.
first
;
FileH
f
=
fit
.
second
;
//
XXX
if file has no mappings and was not used during whole prev
//
TODO
if file has no mappings and was not used during whole prev
// cycle - forget and stop watching it
// update f._headfsize and remmap to head/f zero regions that are now covered by head/f
...
...
@@ -510,12 +517,13 @@ error _Conn::resync(zodb::Tid at) {
if
(
err
!=
nil
)
return
E
(
err
);
if
(
ack
!=
"ok"
)
{
// XXX unregister f from _filehtab
// XXX unregister f from _filehtab
?
return
E
(
fmt
::
errorf
(
"%s"
,
v
(
ack
)));
}
}
wconn
.
at
=
at
;
retok
=
true
;
return
nil
;
}
...
...
@@ -566,7 +574,7 @@ error _Mapping::_remmapblk(int64_t blk, zodb::Tid at) {
if
(
err
!=
nil
)
return
E
(
err
);
}
// block is inside file - mmap file data
// block is inside file - mmap
in
file data
else
{
err
=
mmap_into_ro
(
blkmem
,
1
*
f
->
blksize
,
fsfile
,
blk
*
f
->
blksize
);
if
(
err
!=
nil
)
...
...
@@ -605,7 +613,7 @@ void _Mapping::unmap() {
error
err
=
mm
::
unmap
(
mmap
->
mem_start
,
mmap
->
mem_stop
-
mmap
->
mem_start
);
if
(
err
!=
nil
)
panic
(
"TODO"
);
// XXX
panic
(
v
(
err
)
);
// XXX
mmap
->
mem_start
=
NULL
;
mmap
->
mem_stop
=
NULL
;
// XXX clear other fields?
...
...
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