Commit c318ae0e authored by Kirill Smelkov's avatar Kirill Smelkov

.

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