Commit 74d170c6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d18ded8e
...@@ -86,6 +86,7 @@ struct _Mapping { ...@@ -86,6 +86,7 @@ struct _Mapping {
} }
error _remmapblk(int64_t blk, zodb::Tid at); error _remmapblk(int64_t blk, zodb::Tid at);
void remmap_blk(int64_t blk);
}; };
...@@ -462,7 +463,23 @@ error _Mapping::_remmapblk(int64_t blk, zodb::Tid at) { ...@@ -462,7 +463,23 @@ error _Mapping::_remmapblk(int64_t blk, zodb::Tid at) {
return nil; return nil;
} }
// XXX _Mapping::remmap_blk // remmap_blk remmaps file[blk] in its place again.
// virtmem calls this to remmap a block after RW dirty page was e.g. discarded.
void _Mapping::remmap_blk(int64_t blk) {
_Mapping& mmap = *this;
// XXX locking
if (!(mmap.blk_start <= blk && blk < mmap.blk_stop()))
panic("remmap_blk: blk out of Mapping range");
// blkrev = rev | @head
zodb::Tid blkrev; bool ok;
tie(blkrev, ok) = mmap.file->pinned.get(blk);
if (!ok)
blkrev = TidHead;
mmap._remmapblk(blk, blkrev); // XXX err
}
// XXX _Mapping::unmap // XXX _Mapping::unmap
......
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