Commit 2513bee7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 363674a9
......@@ -45,8 +45,11 @@ static void* zfile_mmap_setup_read(VMA *vma, BigFile *file, blk_t blk, size_t bl
}
static int zfile_remmap_blk_read(VMA *vma, BigFile *file, blk_t blk) {
wcfs::_Mapping *mmap = static_cast<wcfs::_Mapping*>(vma->mmap_overlay_server);
// XXX use file?
wcfs::_Mapping* mmap = static_cast<wcfs::_Mapping*>(vma->mmap_overlay_server);
_ZBigFile* _zfile = container_of(file, _ZBigFile, __pyx_base.file);
if (mmap->fileh != _zfile->wfileh)
panic("BUG: zfile_remmap_blk_read: vma and _zfile point to different wcfs::FileH");
error err;
err = mmap->remmap_blk(blk);
......@@ -57,8 +60,13 @@ static int zfile_remmap_blk_read(VMA *vma, BigFile *file, blk_t blk) {
static void zfile_munmap(VMA *vma, BigFile *file) {
wcfs::_Mapping* mmap = static_cast<wcfs::_Mapping*>(vma->mmap_overlay_server);
_ZBigFile* _zfile = container_of(file, _ZBigFile, __pyx_base.file);
if (mmap->fileh != _zfile->wfileh)
panic("BUG: zfile_remmap_blk_read: vma and _zfile point to different wcfs::FileH");
error err;
wcfs::_Mapping *mmap = static_cast<wcfs::_Mapping*>(vma->mmap_overlay_server);
err = mmap->unmap();
if (err != nil)
......
......@@ -46,6 +46,9 @@
//
// XXX locking -> explain atMu + slaves and refer to "Locking" in wcfs.go
//
// XXX link to bigfile/file_zodb.cpp to show how wcfs/client is used for
// ZBigFile on client side.
#include "wcfs_misc.h"
......
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