Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
260b1d29
Commit
260b1d29
authored
Dec 18, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c6c69c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
bigfile/file_zodb.cpp
bigfile/file_zodb.cpp
+13
-3
No files found.
bigfile/file_zodb.cpp
View file @
260b1d29
...
...
@@ -17,13 +17,15 @@
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
// File file_zodb.cpp provides blkmmapper functions for _ZBigFile.
#include "wcfs/internal/wcfs.h"
#include "wendelin/bigfile/file.h"
#include "wendelin/bigfile/virtmem.h"
#include "bigfile/_bigfile.h"
#include "bigfile/_file_zodb.h"
void
*
virt
_mmap_setup_read
(
VMA
*
vma
,
BigFile
*
file
,
blk_t
blk
,
size_t
blklen
)
{
void
*
zfile
_mmap_setup_read
(
VMA
*
vma
,
BigFile
*
file
,
blk_t
blk
,
size_t
blklen
)
{
//_ZBigFile* _zfile = static_cast<_ZBigFile*>(file);
_ZBigFile
*
_zfile
=
NULL
;
// XXX
...
...
@@ -45,7 +47,7 @@ void* virt_mmap_setup_read(VMA *vma, BigFile *file, blk_t blk, size_t blklen) {
return
(
void
*
)
vma
->
addr_start
;
// XXX kill if we set vma->addr_*
}
int
virt
_remmap_blk_read
(
VMA
*
vma
,
BigFile
*
file
,
blk_t
blk
)
{
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?
...
...
@@ -54,7 +56,7 @@ int virt_remmap_blk_read(VMA *vma, BigFile *file, blk_t blk) {
}
void
virt
_munmap
(
VMA
*
vma
,
BigFile
*
file
)
{
void
zfile
_munmap
(
VMA
*
vma
,
BigFile
*
file
)
{
// NOTE taking 1 ref back from vma->mmap_overlay_server
wcfs
::
Mapping
mmap
=
adoptref
(
static_cast
<
wcfs
::
_Mapping
*>
(
vma
->
mmap_overlay_server
));
vma
->
mmap_overlay_server
=
NULL
;
...
...
@@ -63,3 +65,11 @@ void virt_munmap(VMA *vma, BigFile *file) {
// XXX close mmap->fileh
}
//const VirtMMapper zfile_mmapper = {
const
bigfile_ops
zfile_mmap_ops
=
{
.
mmap_setup_read
=
zfile_mmap_setup_read
,
.
remmap_blk_read
=
zfile_remmap_blk_read
,
.
munmap
=
zfile_munmap
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment