Commit b5211351 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f99178af
......@@ -136,6 +136,16 @@ def close(wconn):
# XXX stop/join pinner
wconn._wlink.close()
# close all files - both that have no mappings and that still have opened mappings.
# XXX after file is closed mappings continue to survive, but we can no
# longer maintin consisten view.
with wconn._filemu:
for f in wconn._filetab.values():
f.headf.close()
f.headf = None
wconn._filetab = None
# _pinner receives pin messages from wcfs and adjusts wconn mappings.
@func(Conn)
......@@ -240,7 +250,9 @@ def unmap(mmap):
mm.unmap(mmap.mem)
mmap.mem = None
mmap.file.mmaps.remove(mmap)
f = mmap.file
f.mmaps.remove(mmap)
# WatchLink represents /head/watch link opened on wcfs.
......
......@@ -1705,6 +1705,7 @@ def test_wcfspy_virtmem():
defer(wconn.close)
m1 = wconn.mmap(zf._p_oid, 2, 2)
defer(m1.unmap)
# ---- 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