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
Hide 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 {
...
@@ -73,8 +73,33 @@ struct bigfile_ops {
*/
*/
int
(
*
storeblk
)
(
BigFile
*
file
,
blk_t
blk
,
const
void
*
buf
);
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
// XXX link to wcfs/client/wcfs.h
// - mmap_setup_read(vma, file[blk +blklen)) -> addr setup initial read-only mmap to serve vma
// - mmap_setup_read(vma, file[blk +blklen)) -> addr setup initial read-only mmap to serve vma
...
@@ -97,9 +122,10 @@ struct bigfile_ops {
...
@@ -97,9 +122,10 @@ struct bigfile_ops {
* // backend detects that block is changed from outside
* // backend detects that block is changed from outside
* // fileh is vma->fileh - file handle with which the vma is associated
* // fileh is vma->fileh - file handle with which the vma is associated
* virt_lock()
* virt_lock()
* if (!fileh_blk_isdirty(fileh, blk)) { XXX -> __fileh_page_isdirty(fileh, pgoff)
* for (pgoff : page_offsets_covered_by(blk))
* // update mappings for all fileh's vma that cover blk
* if (!__fileh_page_isdirty(fileh, pgoff)) {
* }
* // update mappings for all fileh's vma that cover pgoff
* }
* virt_unlock()
* virt_unlock()
*
*
* XXX mention VMA.mmap_overlay_server?
* XXX mention VMA.mmap_overlay_server?
...
@@ -127,13 +153,6 @@ struct bigfile_ops {
...
@@ -127,13 +153,6 @@ struct bigfile_ops {
* Must not fail.
* Must not fail.
*/
*/
void
(
*
munmap
)
(
VMA
*
vma
,
BigFile
*
file
);
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
;
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