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
d18ded8e
Commit
d18ded8e
authored
Dec 04, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
594e0684
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
wcfs/__init__.py
wcfs/__init__.py
+0
-27
No files found.
wcfs/__init__.py
View file @
d18ded8e
...
@@ -88,33 +88,6 @@ class WCFS(_WCFS):
...
@@ -88,33 +88,6 @@ class WCFS(_WCFS):
pass
pass
"""
"""
# _remmapblk remmaps mapping memory for file[blk] to be viewing database as of @at state.
#
# at=None means unpin to head/ .
# NOTE this does not check wrt virtmem already mapped blk as RW XXX ok?
@func(_Mapping)
def _remmapblk(mmap, blk, at):
assert mmap.blk_start <= blk < mmap.blk_stop
f = mmap.file
blkmem = mmap.mem[(blk-mmap.blk_start)*f.blksize:][:f.blksize]
if at is None:
fsfile = f.headf
else:
# TODO share @rev fd until wconn is resynced?
fsfile = f.wconn._wc._open("@%s/bigfile/%s" % (h(at), h(f.foid)), "rb")
defer(fsfile.close)
_ = os.fstat(fsfile.fileno())
assert _.st_blksize == f.blksize # FIXME assert
# block is beyond file size - mmap with zeros (assumes head/f size ↑=)
if (blk+1)*f.blksize > _.st_size:
mm.map_zero_into_ro(blkmem)
# block is inside file - mmap file data
else:
mm.map_into_ro(blkmem, fsfile.fileno(), blk*f.blksize)
# remmap_blk remmaps file[blk] in its place again.
# remmap_blk remmaps file[blk] in its place again.
# virtmem calls this to remmap a block after RW dirty page was e.g. discarded.
# virtmem calls this to remmap a block after RW dirty page was e.g. discarded.
@func(_Mapping)
@func(_Mapping)
...
...
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