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
62a2fddc
Commit
62a2fddc
authored
Jan 08, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
72311505
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
47 deletions
+0
-47
wcfs/__init__.py
wcfs/__init__.py
+0
-47
No files found.
wcfs/__init__.py
View file @
62a2fddc
...
...
@@ -125,53 +125,6 @@ def _open(wc, obj, mode='rb', at=None):
return
open
(
path
,
mode
,
0
)
# unbuffered
"""
# open creates wcfs file handle, which can be mmaped to give data of ZBigFile.
#
# XXX more text
#
# All mmapings of one FileH share changes.
# There can be several different FileH for the same (at, oid), and those
# FileH do not share changes.
def open(self, zfile): # -> FileH
#assert isinstance(zfile, ZBigFile) # XXX import cycle
zconn = zfile._p_jar
# XXX ._start is probably ZODB5 only -> check ZODB4 and ZODB3
zat = p64(u64(zconn._storage._start)-1) # before -> at
# XXX pinned to @revX/... for now -> TODO /head/bigfile/...
path = '%s/@%s/bigfile/%s' % (self.mountpoint, h(zat), h(zfile._p_oid))
fd = os.open(path, os.O_RDONLY)
return FileH(fd)
"""
"""
# FileH is handle to opened bigfile/X.
#
# XXX it mimics BigFileH and should be integrated into virtmem (see fileh_open_overlay)
#
# XXX it should implement wcfs invalidation protocol and remmap head/... parts
# to pinned as requested.
import mmap
from bigarray import pagesize # XXX hack
from bigarray.array_ram import _VMA # XXX hack
class FileH(object):
# .fd
def __init__(self, fd):
self.fd = fd
def __del__(self):
os.close(self.fd)
def mmap(self, pgoffset, pglen):
return _VMA(self.fd, pgoffset, pglen, pagesize, mmap.PROT_READ)
"""
# ---- join/run 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