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
4fca6260
Commit
4fca6260
authored
Jul 16, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0e8a1ecb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
wcfs/__init__.py
wcfs/__init__.py
+5
-3
No files found.
wcfs/__init__.py
View file @
4fca6260
...
...
@@ -143,7 +143,7 @@ def _pinner(wconn, ctx):
for
mmap
in
f
.
mmaps
:
# XXX use ↑blk_start for binary search
if
not
(
mmap
.
blk_start
<=
req
.
blk
&&
req
.
blk
<
mmap
.
blk_stop
):
continue
continue
# blk ∉ mmap
# FIXME check if virtmem did not mapped RW page into this block already
mmap
.
_mmapblk
(
req
.
blk
,
req
.
at
)
...
...
@@ -166,14 +166,14 @@ def _mmapblk(mmap, blk, at):
if
at
is
None
:
fsfile
=
f
.
headf
else
:
# TODO share @rev fd until wconn is re
c
ynced?
# TODO share @rev fd until wconn is re
s
ynced?
fsfile
=
f
.
wconn
.
_wc
.
_open
(
"@%s/%s"
%
(
ashex
(
at
),
ashex
(
f
.
foid
)),
"rb"
)
defer
(
fsfile
.
close
)
mm
.
mmap_into_ro
(
mmap
.
mem
[(
blk
-
mmap
.
blk_start
)
*
blksize
:][:
blksize
],
fsfile
.
fileno
(),
blk
*
blksize
)
# mmap creats file mapping representing file data as of wconn.at database state.
# mmap creat
e
s file mapping representing file data as of wconn.at database state.
@
func
(
Conn
)
def
mmap
(
wconn
,
foid
,
offset
,
size
):
# -> Mapping XXX offset, size -> blkoff, blksize ?
with
wconn
.
_filemu
:
...
...
@@ -215,6 +215,8 @@ def unmap(mmap):
mm
.
unmap
(
mmap
.
mem
)
mmap
.
mem
=
None
mmap
.
file
.
mmaps
.
remove
(
mmap
)
# WatchLink represents /head/watch link opened on wcfs.
#
...
...
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