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
cdf82174
Commit
cdf82174
authored
Oct 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b7d7b8d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+12
-1
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
cdf82174
...
...
@@ -57,6 +57,10 @@ typedef uint64_t Oid; // XXX ok?
// TidHead is invalid Tid which is larged Tid value and means @head
const
Tid
TidHead
=
-
1ULL
;
string
h
(
uint64_t
v
);
// v -> 016x hex representation
#define h_(v) (h(v).c_str())
// XXX ok?
struct
IContext
{
virtual
chan
<
structZ
>
done
()
=
0
;
...
...
@@ -250,7 +254,7 @@ error _Mapping::_remmapblk(int64_t blk, Tid at) {
else
{
// TODO share @rev fd until wconn is resynced?
tie
(
fsfile
,
err
)
=
f
->
wconn
->
_wc
->
_open
(
fmt
::
sprintf
(
"@%s/bigfile/%s"
,
h
(
at
),
h
(
f
->
foid
),
"rb"
);
fmt
::
sprintf
(
"@%s/bigfile/%s"
,
h
_
(
at
),
h_
(
f
->
foid
)
),
"rb"
);
if
(
err
!=
nil
)
return
err
;
defer
(
fsfile
.
close
);
...
...
@@ -290,3 +294,10 @@ tuple<os::File, error> WCFS::_open(const string &path/*, XXX mode*/) {
string
path_
=
wc
->
_path
(
path
);
return
os
::
open
(
path_
/*, XXX mode*/
);
}
// ---- misc ----
string
h
(
uint64_t
v
)
{
return
fmt
::
sprintf
(
"%016x"
,
v
);
}
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