Commit 7355cffc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8f62953d
......@@ -239,8 +239,7 @@ error _Conn::__pin1(PinReq *req) {
tie(f, ok) = wconn._filehtab.get_(req->foid);
if (!ok) {
wconn._filehmu.unlock();
// XXX err = we are not watching the file - why wcfs sent us this update?
return fmt::errorf("err TODO");
return fmt::errorf("unexpected pin: file not watched"); // why wcfs sent us this update?
}
......@@ -255,6 +254,7 @@ error _Conn::__pin1(PinReq *req) {
// pin only if virtmem did not dirtied page corresponding to this block already
// if virtmem dirtied the page - it will ask us to remmap it again after commit or abort.
bool do_pin= true;
error err;
if (mmap->vma != NULL) {
virt_lock();
BigFileH *virt_fileh = mmap->vma->fileh;
......@@ -263,11 +263,17 @@ error _Conn::__pin1(PinReq *req) {
}
if (do_pin)
mmap->_remmapblk(req->blk, req->at); // XXX err
err = mmap->_remmapblk(req->blk, req->at);
if (mmap->vma != NULL)
virt_unlock();
// on error don't need to continue with other mappings - all fileh and
// all mappings become marked invalid on pinner failure.
// XXX all call wconn._down from here under wconn._filehmu lock?
if (err != nil)
return err;
//trace("\t-> remmaped"); XXX
}
......
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