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
439dcf16
Commit
439dcf16
authored
Mar 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
46e7a7bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+9
-9
No files found.
wcfs/client/wcfs.cpp
View file @
439dcf16
...
@@ -876,11 +876,11 @@ retry:
...
@@ -876,11 +876,11 @@ retry:
// - wconn.filehMu not locked
// - wconn.filehMu not locked
// - f.mmapMu not locked
// - f.mmapMu not locked
error
_FileH
::
_open
()
{
error
_FileH
::
_open
()
{
_FileH
*
f
=
this
;
_FileH
&
f
=
*
this
;
Conn
wconn
=
f
->
wconn
;
Conn
wconn
=
f
.
wconn
;
error
err
;
error
err
;
tie
(
f
->
_headf
,
err
)
tie
(
f
.
_headf
,
err
)
=
wconn
->
_wc
->
_open
(
fmt
::
sprintf
(
"head/bigfile/%s"
,
v
(
foid
)));
=
wconn
->
_wc
->
_open
(
fmt
::
sprintf
(
"head/bigfile/%s"
,
v
(
foid
)));
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
err
;
return
err
;
...
@@ -888,18 +888,18 @@ error _FileH::_open() {
...
@@ -888,18 +888,18 @@ error _FileH::_open() {
bool
retok
=
false
;
bool
retok
=
false
;
defer
([
&
]()
{
defer
([
&
]()
{
if
(
!
retok
)
if
(
!
retok
)
f
->
_headf
->
close
();
f
.
_headf
->
close
();
});
});
struct
stat
st
;
struct
stat
st
;
err
=
f
->
_headf
->
stat
(
&
st
);
err
=
f
.
_headf
->
stat
(
&
st
);
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
err
;
return
err
;
f
->
blksize
=
st
.
st_blksize
;
f
.
blksize
=
st
.
st_blksize
;
f
->
_headfsize
=
st
.
st_size
;
f
.
_headfsize
=
st
.
st_size
;
if
(
!
(
f
->
_headfsize
%
f
->
blksize
==
0
))
if
(
!
(
f
.
_headfsize
%
f
.
blksize
==
0
))
return
fmt
::
errorf
(
"wcfs bug: %s size (%d) %% blksize (%d) != 0"
,
return
fmt
::
errorf
(
"wcfs bug: %s size (%d) %% blksize (%d) != 0"
,
v
(
f
->
_headf
->
name
()),
f
->
_headfsize
,
f
->
blksize
);
v
(
f
.
_headf
->
name
()),
f
.
_headfsize
,
f
.
blksize
);
// start watching f
// start watching f
// NOTE we are _not_ holding wconn.filehMu nor f.mmapMu - only wconn.atMu to rely on wconn.at being stable.
// NOTE we are _not_ holding wconn.filehMu nor f.mmapMu - only wconn.atMu to rely on wconn.at being stable.
...
...
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