implement chunk fill

This commit is contained in:
Ryo Nakamura
2022-10-20 18:58:06 +09:00
parent def9cfeba7
commit 808069ab9d
3 changed files with 113 additions and 8 deletions

View File

@@ -14,6 +14,7 @@ struct file {
};
struct chunk {
struct list_head list; /* sscp->chunk_list */
struct file *f;
size_t off; /* offset of this chunk on the file f */
size_t len; /* length of this chunk */
@@ -25,8 +26,13 @@ int file_is_directory(char *path, sftp_session sftp);
int file_fill(sftp_session sftp, struct list_head *head, char **src_array, int count);
int chunk_fill(struct list_head *file_head, struct list_head *chunk_head,
int nr_conn, int min_chunk_sz, int max_chunk_sz);
#ifdef DEBUG
void file_dump(struct list_head *head);
void file_dump(struct list_head *file_head);
void chunk_dump(struct list_head *chunk_head);
#endif
#endif /* _FILE_H_ */