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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
72eb63d0
Commit
72eb63d0
authored
Jul 09, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b20611b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+1
-1
bigfile/virtmem.c
bigfile/virtmem.c
+2
-1
include/wendelin/bigfile/file.h
include/wendelin/bigfile/file.h
+20
-10
No files found.
bigfile/tests/test_virtmem.c
View file @
72eb63d0
...
...
@@ -34,7 +34,7 @@
#include "../../t/t_utils.h"
#include "../../t/t_utils.c"
/* test_vmamap verifies addr -> VMA lookup. */
void
test_vmamap
()
{
VMA
vma1
,
vma2
,
vma3
;
...
...
bigfile/virtmem.c
View file @
72eb63d0
...
...
@@ -236,7 +236,7 @@ int fileh_mmap(VMA *vma, BigFileH *fileh, pgoff_t pgoffset, pgoff_t pglen)
goto
fail
;
/* allocate address space somewhere */
// XXX overlay: -> mmap(base, READ)
// XXX overlay: -> mmap(base, READ)
+ mmap(fileh->dirty_pages)
addr
=
mem_valloc
(
NULL
,
len
);
if
(
!
addr
)
goto
fail
;
...
...
@@ -290,6 +290,7 @@ void vma_unmap(VMA *vma)
/* unmap whole vma at once - the kernel unmaps each mapping in turn.
* NOTE error here would mean something is broken */
// XXX overlay: -> notify_unmap
xmunmap
((
void
*
)
vma
->
addr_start
,
len
);
/* scan through mapped-to-this-vma pages and release them */
...
...
include/wendelin/bigfile/file.h
View file @
72eb63d0
...
...
@@ -59,16 +59,6 @@ struct bigfile_ops {
*/
int
(
*
loadblk
)
(
BigFile
*
file
,
blk_t
blk
,
void
*
buf
);
/* mmap_read is called to mmap read-only file[offset +len) into @addr.
*
* XXX mmap_read -> !loadblk ?
* NOTE offset and len are in bytes, not pages.
*
* @addr NULL - mmap at anywhere, !NULL - mmap exactly at addr.
* @return !NULL - mapped there, NULL - error.
*/
void
*
(
*
mmap_read
)(
BigFile
*
file
,
void
*
addr
,
off_t
pgoffset
,
size_t
len
);
/* storeblk is called to store file block from memory.
*
* NOTE contrary to loadblk, storeblk is called from regular context.
...
...
@@ -78,6 +68,26 @@ struct bigfile_ops {
*/
int
(
*
storeblk
)
(
BigFile
*
file
,
blk_t
blk
,
const
void
*
buf
);
/* mmap_read is called to mmap read-only file[blk +blklen) into @addr.
*
* XXX mmap_read -> !loadblk ?
* NOTE blk and blklen are in blocks, not pages.
*
* @addr NULL - mmap at anywhere, !NULL - mmap exactly at addr.
* @return !NULL - mapped there, NULL - error.
*/
void
*
(
*
mmap_read
)
(
BigFile
*
file
,
void
*
addr
,
blk_t
blk
,
size_t
blklen
);
// - mmap_setup(vma) setup initial mmap
// - mresync(vma) resync mmap to updated DB view; forget RW
// - munmap(vma) before VMA is unmapped
// /* notify_munmap XXX
// */
// void (*notify_munmap) (BigFile *file
/* release is called to release resources associated with file.
*
* The file is not otherwise used at the time of and past release call.
...
...
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