Commit 01e57528 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a42dac90
...@@ -31,6 +31,7 @@ using namespace golang; ...@@ -31,6 +31,7 @@ using namespace golang;
#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 0 #define HAVE_BUILTIN_TYPES_COMPATIBLE_P 0
#include <wendelin/bigfile/virtmem.h> #include <wendelin/bigfile/virtmem.h>
#include <wendelin/bigfile/ram.h>
#include <wendelin/bug.h> #include <wendelin/bug.h>
#include <unordered_map> #include <unordered_map>
...@@ -87,7 +88,7 @@ private: ...@@ -87,7 +88,7 @@ private:
struct _File { struct _File {
Conn *wconn; Conn *wconn;
Oid foid; // hex of ZBigFile root object ID Oid foid; // hex of ZBigFile root object ID
int64_t blksize; // block size of this file size_t blksize; // block size of this file
// .headf file object of head/file // .headf file object of head/file
// .headfsize head/file size is known to be at least headfsize (size ↑=) // .headfsize head/file size is known to be at least headfsize (size ↑=)
dict<int64_t, Tid> pinned; // {} blk -> rev that wcfs already sent us for this file dict<int64_t, Tid> pinned; // {} blk -> rev that wcfs already sent us for this file
...@@ -192,7 +193,7 @@ void Conn::_pin1(SrvReq *req) { ...@@ -192,7 +193,7 @@ void Conn::_pin1(SrvReq *req) {
//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 // check if virtmem did not dirtied page corresponding to this block already
virt_lock(); virt_lock();
TODO (mmap->file->blksize != mmap->fileh->ramh->pagesize); TODO (mmap->file->blksize != mmap->fileh->ramh->ram->pagesize);
if (!__fileh_page_isdirty(mmap->fileh, req->blk)) if (!__fileh_page_isdirty(mmap->fileh, req->blk))
mmap->_remmapblk(req.blk, req.at); mmap->_remmapblk(req.blk, req.at);
virt_unlock(); virt_unlock();
......
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