Commit 2586d0c1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 67094207
...@@ -431,17 +431,17 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma) ...@@ -431,17 +431,17 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
mmap->mem_stop = mem_stop; mmap->mem_stop = mem_stop;
mmap->vma = vma; mmap->vma = vma;
for (auto _ : f._pinned) { // XXX keep f._pinned ↑blk and use binary search? for (auto _ : f._pinned) { // TODO keep f._pinned ↑blk and use binary search
int64_t blk = _.first; int64_t blk = _.first;
zodb::Tid rev = _.second; zodb::Tid rev = _.second;
if (!(blk_start <= blk && blk < blk_stop)) if (!(blk_start <= blk && blk < blk_stop))
continue; // blk out of this mapping continue; // blk this mapping
err = mmap->_remmapblk(blk, rev); err = mmap->_remmapblk(blk, rev);
if (err != nil) if (err != nil)
return make_pair(nil, E(err)); return make_pair(nil, E(err));
} }
f._mmaps.push_back(mmap); // XXX keep f._mmaps ↑blk_start f._mmaps.push_back(mmap); // TODO keep f._mmaps ↑blk_start
if (vma != NULL) { if (vma != NULL) {
vma->mmap_overlay_server = mmap._ptr(); // XXX +giveref vma->mmap_overlay_server = mmap._ptr(); // XXX +giveref
......
...@@ -207,8 +207,8 @@ private: ...@@ -207,8 +207,8 @@ private:
typedef refptr<struct _FileH> FileH; typedef refptr<struct _FileH> FileH;
struct _FileH : object { struct _FileH : object {
Conn wconn; Conn wconn;
zodb::Oid foid; // ZBigFile root object ID zodb::Oid foid; // ZBigFile root object ID (does not change after fileh open)
size_t blksize; // block size of this file XXX -> off_t ? size_t blksize; // block size of this file (does not change after fileh open)
os::File _headf; // file object of head/file os::File _headf; // file object of head/file
off_t _headfsize; // head/file size is known to be at least headfsize (size ↑=) off_t _headfsize; // head/file size is known to be at least headfsize (size ↑=)
......
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