Commit 81049e5d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6b6f096d
......@@ -109,7 +109,7 @@ static global<error> errConnClosed = errors::New("connection closed");
// close releases resources associated with wconn.
//
// opened fileh and mappings becomes invalid to use except close and unmap.
// opened fileh and mappings become invalid to use except close and unmap.
error _Conn::close() {
_Conn& wconn = *this;
xerr::Contextf E("wcfs %s: close conn @%s", v(wconn._wc->mountpoint), v(wconn.at));
......@@ -161,6 +161,8 @@ error _Conn::close() {
// _pinner receives pin messages from wcfs and adjusts wconn mappings.
error _Conn::_pinner(context::Context ctx) {
_Conn& wconn = *this;
xerr::Contextf E("pinner"); // NOTE pinner error goes to Conn::close who has its own context
error err = wconn.__pinner(ctx);
// mark the connection non-operational if the pinner fails
......@@ -171,13 +173,11 @@ error _Conn::_pinner(context::Context ctx) {
}
wconn._downMu.unlock();
return err;
return E(err);
}
error _Conn::__pinner(context::Context ctx) {
_Conn& wconn = *this;
xerr::Contextf E("pinner"); // NOTE pinner error goes to Conn::close who has its own context
// XXX panic/exc -> log.CRITICAL
#if 0
......@@ -207,13 +207,13 @@ error _Conn::__pinner(context::Context ctx) {
err = (wconn._downErr == errConnClosed) ? nil : io::ErrUnexpectedEOF;
wconn._downMu.unlock();
}
return E(err);
return err;
}
// we received request to pin/unpin file block. handle it
err = wconn._pin1(&req);
if (err != nil) {
return E(err);
return err;
}
}
}
......
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