Commit e48a8eaf authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4b5633a3
......@@ -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,9 +122,10 @@ 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()
*
* XXX mention VMA.mmap_overlay_server?
......@@ -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;
......
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