mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 16:51:37 +00:00
This one is a little bit more tricky that dump. On restore we should open the chain of pagemap-s (by "parent" links). Then for every pagemap with in_parent set we should go to parent and ask for the page. Parent, in turn, should properly determine where the respective page is in his pagemap and position the page.img's position respectively. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
21 lines
499 B
C
21 lines
499 B
C
#ifndef __CR_PAGE_READ_H__
|
|
#define __CR_PAGE_READ_H__
|
|
#include "protobuf/pagemap.pb-c.h"
|
|
|
|
struct page_read {
|
|
int (*get_pagemap)(struct page_read *, struct iovec *iov);
|
|
int (*read_page)(struct page_read *, unsigned long vaddr, void *);
|
|
void (*put_pagemap)(struct page_read *);
|
|
void (*close)(struct page_read *);
|
|
|
|
int fd;
|
|
int fd_pg;
|
|
|
|
PagemapEntry *pe;
|
|
struct page_read *parent;
|
|
unsigned long cvaddr;
|
|
unsigned id; /* for logging */
|
|
};
|
|
|
|
int open_page_read(int pid, struct page_read *);
|
|
#endif
|