Commit c6da1a38 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 868f88cd
...@@ -255,13 +255,12 @@ tuple<Conn*, error> WCFS::connect(Tid at) { ...@@ -255,13 +255,12 @@ tuple<Conn*, error> WCFS::connect(Tid at) {
return make_tuple(wconn, nil); return make_tuple(wconn, nil);
} }
// XXX Conn::close // close releases resources associated with wconn.
#if 0 // XXX what happens to file mmappings?
# close releases resources associated with wconn. error Conn::close(wconn) {
# XXX what happens to file mmappings? Conn &wconn = *this;
@func(Conn)
def close(wconn): wconn._wlink.close();
wconn._wlink.close()
wconn._pinCancel() wconn._pinCancel()
try: try:
wconn._pinWG.wait() wconn._pinWG.wait()
...@@ -269,9 +268,9 @@ def close(wconn): ...@@ -269,9 +268,9 @@ def close(wconn):
if e is not context.canceled: if e is not context.canceled:
raise raise
# close all files - both that have no mappings and that still have opened mappings. // 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 // XXX after file is closed mappings continue to survive, but we can no
# longer maintain consistent view. // longer maintain consistent view.
with wconn._filemu: with wconn._filemu:
for f in wconn._filetab.values(): for f in wconn._filetab.values():
f.headf.close() f.headf.close()
...@@ -280,7 +279,7 @@ def close(wconn): ...@@ -280,7 +279,7 @@ def close(wconn):
# XXX stop watching f # XXX stop watching f
wconn._filetab = None wconn._filetab = None
#endif }
// _pinner receives pin messages from wcfs and adjusts wconn mappings. // _pinner receives pin messages from wcfs and adjusts wconn mappings.
void Conn::_pinner(IContext *ctx) { void Conn::_pinner(IContext *ctx) {
......
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