Commit 09632ad8 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0f93dd0c
......@@ -171,7 +171,7 @@ def mmap(wconn, foid, offset, size): # -> Mapping XXX offset, size -> blko
with wconn._filemu:
f = wconn._filetab.get(foid)
if f is None:
headf = wconn._wc._open("head/%s" % (ashex(foid),), "rb")
headf = wconn._wc._open("head/bigfile/%s" % (ashex(foid),), "rb")
f = _File(headf)
wconn._filetab[foid] = f
......@@ -202,7 +202,7 @@ def _remmapblk(mmap, blk, at):
fsfile = f.headf
else:
# TODO share @rev fd until wconn is resynced?
fsfile = f.wconn._wc._open("@%s/%s" % (ashex(at), ashex(f.foid)), "rb")
fsfile = f.wconn._wc._open("@%s/bigfile/%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)
......
......@@ -1691,12 +1691,14 @@ def test_wcfspy_virtmem():
t = tDB(); zf = t.zfile
defer(t.close)
at1 = t.commit(zf, {2:'c1'})
at1 = t.commit(zf, {2:'c1', 3:'d1'})
at2 = t.commit(zf, {2:'c2'})
wconn = t.wc.connect(at1)
defer(wconn.close)
m1 = wconn.mmap(zf._p_oid, 2, 2)
# ---- misc ---
......
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