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
116d5481
Commit
116d5481
authored
Dec 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
76cf581c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
bigfile/.gitignore
bigfile/.gitignore
+1
-0
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+9
-5
No files found.
bigfile/.gitignore
View file @
116d5481
/_file_zodb.cpp
/_file_zodb.h
bigfile/_file_zodb.pyx
View file @
116d5481
...
...
@@ -50,10 +50,13 @@ cdef extern from *:
ctypedef
extern
class
wendelin
.
bigfile
.
_bigfile
.
BigFile
[
object
cxxPyBigFile
]:
pass
import
wcfs
as
pywcfs
from
wcfs.internal
cimport
_wcfs
as
wcfs
from
golang
cimport
nil
from
ZODB.Connection
import
Connection
as
ZConnection
from
ZODB.utils
import
u64
from
wendelin.lib.zodb
import
zconn_at
# _ZBigFile is helper for ZBigFile - just redirect loadblk/storeblk back
...
...
@@ -61,7 +64,7 @@ from ZODB.utils import u64
# the same time - see below)
#
# XXX + wcfs
cdef
class
_ZBigFile
(
BigFile
)
:
cdef
public
class
_ZBigFile
(
BigFile
)
[
object
_ZBigFile
,
type
_ZBigFile_Type
]
:
cdef
object
zself
# reference to ZBigFile
cdef
wcfs
.
Oid
foid
# = .zself._p_oid
cdef
wcfs
.
Conn
wconn
# WCFS connection XXX -> zconn instead ? XXX wconn is shared between files
...
...
@@ -101,6 +104,7 @@ cdef class _ZBigFile(BigFile):
# functions that we give to virtmem bigfile_ops .mmap*
"""
cdef nogil:
void* virt_mmap_setup_read(VMA *vma, BigFile *file, blk_t blk, size_t blklen) {
...
...
@@ -139,7 +143,7 @@ cdef nogil:
// XXX close mmap->fileh
}
"""
...
...
@@ -148,7 +152,7 @@ cdef nogil:
# XXX simultaneous call?
# XXX move -> .py ?
cdef
pywconnOf
(
zconn
):
assert
isinstance
(
zconn
,
zodb
Connection
)
assert
isinstance
(
zconn
,
Z
Connection
)
assert
zconn
.
opened
# XXX needed
# XXX locking
...
...
@@ -158,8 +162,8 @@ cdef pywconnOf(zconn):
# zconn is not yet associated with wconn
zstor
=
zconn
.
db
().
storage
zurl
=
wcfs
.
zstor_2zurl
(
zstor
)
wc
=
wcfs
.
join
(
zurl
)
zurl
=
py
wcfs
.
zstor_2zurl
(
zstor
)
wc
=
py
wcfs
.
join
(
zurl
)
wconn
=
wc
.
connect
(
zconn_at
(
zconn
))
zconn
.
_wcfs_wconn
=
wconn
...
...
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