mirror of
https://github.com/upa/mscp.git
synced 2026-02-14 17:24:42 +08:00
add checkpoint.c and .h
This commit is contained in:
@@ -20,8 +20,12 @@ struct path {
|
||||
#define FILE_STATE_INIT 0
|
||||
#define FILE_STATE_OPENED 1
|
||||
#define FILE_STATE_DONE 2
|
||||
|
||||
uint64_t data; /* used by other components, i.e., checkpoint */
|
||||
};
|
||||
|
||||
struct path *alloc_path(char *path, char *dst_path);
|
||||
|
||||
struct chunk {
|
||||
struct path *p;
|
||||
size_t off; /* offset of this chunk on the file on path p */
|
||||
@@ -32,6 +36,8 @@ struct chunk {
|
||||
#define CHUNK_STATE_DONE 2
|
||||
};
|
||||
|
||||
struct chunk *alloc_chunk(struct path *p, size_t off, size_t len);
|
||||
|
||||
struct path_resolve_args {
|
||||
size_t *total_bytes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user