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
e48a8eaf
Commit
e48a8eaf
authored
Feb 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4b5633a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
include/wendelin/bigfile/file.h
include/wendelin/bigfile/file.h
+30
-11
No files found.
include/wendelin/bigfile/file.h
View file @
e48a8eaf
...
...
@@ -73,8 +73,33 @@ struct bigfile_ops {
*/
int
(
*
storeblk
)
(
BigFile
*
file
,
blk_t
blk
,
const
void
*
buf
);
/* release is called to release resources associated with file.
*
* The file is not otherwise used at the time of and past release call.
*/
void
(
*
release
)
(
BigFile
*
file
);
// XXX picture of base layer + RW pages
// Overlaying
//
// XXX text
// wc mmap =
//
// ┌──┐ ┌──┐
// │RW│ │RW│ ← dirty
// └──┘ └──┘
// +
// ───────────────────────────────────────────── ← base
//
// base = file view @ zconn.at =>
// base =
// ___ /@revA/bigfile/X
// __ /@revB/bigfile/X
// _ /@revC/bigfile/X
// + ...
// ─── ───── ────────────────────────── ───── /head/bigfile/X
//
// XXX link to wcfs/client/wcfs.h
// - mmap_setup_read(vma, file[blk +blklen)) -> addr setup initial read-only mmap to serve vma
...
...
@@ -97,8 +122,9 @@ struct bigfile_ops {
* // backend detects that block is changed from outside
* // fileh is vma->fileh - file handle with which the vma is associated
* virt_lock()
* if (!fileh_blk_isdirty(fileh, blk)) { XXX -> __fileh_page_isdirty(fileh, pgoff)
* // update mappings for all fileh's vma that cover blk
* for (pgoff : page_offsets_covered_by(blk))
* if (!__fileh_page_isdirty(fileh, pgoff)) {
* // update mappings for all fileh's vma that cover pgoff
* }
* virt_unlock()
*
...
...
@@ -127,13 +153,6 @@ struct bigfile_ops {
* Must not fail.
*/
void
(
*
munmap
)
(
VMA
*
vma
,
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.
*/
void
(
*
release
)
(
BigFile
*
file
);
};
typedef
struct
bigfile_ops
bigfile_ops
;
...
...
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