Commit c318ae0e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3f814c0b
...@@ -39,6 +39,12 @@ ...@@ -39,6 +39,12 @@
// //
// RW -> Uptodate: Virtmem calls pinner to remmap the page RO after commit or // RW -> Uptodate: Virtmem calls pinner to remmap the page RO after commit or
// abort. // abort.
//
//
// VMA -> fileh -> file
// ↑↓ ↑↓ (XXX here ?)
// Mapping FileH
//
#include "wcfs_misc.h" #include "wcfs_misc.h"
#include "wcfs.h" #include "wcfs.h"
...@@ -46,6 +52,7 @@ ...@@ -46,6 +52,7 @@
#include <wendelin/bigfile/virtmem.h> #include <wendelin/bigfile/virtmem.h>
#include <wendelin/bigfile/ram.h> #include <wendelin/bigfile/ram.h>
#include <wendelin/bug.h>
#include <golang/fmt.h> #include <golang/fmt.h>
...@@ -205,20 +212,22 @@ void _Conn::_pin1(PinReq *req) { ...@@ -205,20 +212,22 @@ void _Conn::_pin1(PinReq *req) {
if (!(mmap->blk_start <= req->blk && req->blk < mmap->blk_stop())) if (!(mmap->blk_start <= req->blk && req->blk < mmap->blk_stop()))
continue; // blk ∉ mmap continue; // blk ∉ mmap
// XXX reenable
//trace("\tremmapblk %d @%s" % (req->blk, (h(req.at) if req.at else "head"))) //trace("\tremmapblk %d @%s" % (req->blk, (h(req.at) if req.at else "head")))
// check if virtmem did not dirtied page corresponding to this block already // pin if virtmem did not dirtied page corresponding to this block already
// XXX reenable (link to libbigfile dso) bool do_pin= true;
virt_lock(); if (mmap->vma != NULL) {
#if 0 virt_lock();
TODO (mmap->file->blksize != mmap->fileh->ramh->ram->pagesize); BigFileH *virt_fileh = mmap->vma->fileh;
if (!__fileh_page_isdirty(mmap->fileh, req->blk)) { TODO (mmap->fileh->_blksize != virt_fileh->ramh->ram->pagesize);
#endif do_pin = !__fileh_page_isdirty(virt_fileh, req->blk);
}
if (do_pin)
mmap->_remmapblk(req->blk, req->at); // XXX err mmap->_remmapblk(req->blk, req->at); // XXX err
#if 0
} if (mmap->vma != NULL)
#endif virt_unlock();
virt_unlock();
//trace("\t-> remmaped"); XXX //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