Commit c14872b1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ba1a7af4
...@@ -521,9 +521,10 @@ class _ZBigFile(BigFile): ...@@ -521,9 +521,10 @@ class _ZBigFile(BigFile):
obj.zself = zself obj.zself = zself
return obj return obj
# redirect load/store to main class # redirect load/store/mapper to main class
def loadblk(self, blk, buf): return self.zself.loadblk(blk, buf) def loadblk(self, blk, buf): return self.zself.loadblk(blk, buf)
def storeblk(self, blk, buf): return self.zself.storeblk(blk, buf) def storeblk(self, blk, buf): return self.zself.storeblk(blk, buf)
# XXX blkmapper()
...@@ -636,19 +637,20 @@ class ZBigFile(LivePersistent): ...@@ -636,19 +637,20 @@ class ZBigFile(LivePersistent):
zblk.bindzfile(self, blk) zblk.bindzfile(self, blk)
# blkmmapper complemnts loadblk/storeblk and returns object with pycapsule with .mmap*
# methods to be used by virtmem to mmap base overlay of the file data. XXX text
def blkmmapper(self):
# XXX return wcfileh (= zconn.wconn.open(self._p_oid))
1/0
# invalidate data .blktab[blk] invalidated -> invalidate page # invalidate data .blktab[blk] invalidated -> invalidate page
def invalidateblk(self, blk): def invalidateblk(self, blk):
for fileh in self._v_filehset: for fileh in self._v_filehset:
fileh.invalidate_page(blk) # XXX assumes blksize == pagesize fileh.invalidate_page(blk) # XXX assumes blksize == pagesize
# mmaper complemnts loadblk/storeblk and returns object with pycapsule with .mmap*
# methods to be used by virtmem to mmap base overlay of the file data. XXX text
def mmaper(self):
# XXX return wcfileh (= zconn.wconn.open(self._p_oid))
1/0
# fileh_open is bigfile-like method that creates new file-handle object # fileh_open is bigfile-like method that creates new file-handle object
# that is given to user for mmap. # that is given to user for mmap.
# #
...@@ -770,7 +772,7 @@ class _ZBigFileH(object): ...@@ -770,7 +772,7 @@ class _ZBigFileH(object):
self.zfile = zfile self.zfile = zfile
self.wcfileh = wcfileh self.wcfileh = wcfileh
#self.zfileh = zfile._v_file.fileh_open(wcfileh) # XXX pass wcfileh in #self.zfileh = zfile._v_file.fileh_open(wcfileh) # XXX pass wcfileh in
# XXX no - BigFile should fetch wcfileh itself from ZBigFile by calling ZBigFile.mmapper() # XXX no - BigFile should fetch wcfileh itself from ZBigFile by calling ZBigFile.blkmmapper()
self.zfileh = zfile._v_file.fileh_open() self.zfileh = zfile._v_file.fileh_open()
# FIXME zfile._p_jar could be None (ex. ZBigFile is newly created # FIXME zfile._p_jar could be None (ex. ZBigFile is newly created
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment