Lines Matching refs:file_buffer

60 static int checksum_sparse(struct file_buffer *file_buffer)  in checksum_sparse()  argument
62 unsigned char *b = (unsigned char *) file_buffer->data; in checksum_sparse()
64 int bytes = file_buffer->size, sparse = TRUE, value; in checksum_sparse()
75 file_buffer->checksum = chksum; in checksum_sparse()
100 static struct file_buffer *get_fragment(struct fragment *fragment, in get_fragment()
104 struct file_buffer *buffer, *compressed_buffer; in get_fragment()
219 struct file_buffer *get_fragment_cksum(struct file_info *file, in get_fragment_cksum()
222 struct file_buffer *frag_buffer; in get_fragment_cksum()
274 struct file_buffer *file_buffer = queue_get(to_process_frag); in frag_thrd() local
275 struct file_buffer *buffer; in frag_thrd()
276 int sparse = checksum_sparse(file_buffer); in frag_thrd()
284 file_buffer->c_byte = 0; in frag_thrd()
285 file_buffer->fragment = FALSE; in frag_thrd()
287 file_buffer->c_byte = file_buffer->size; in frag_thrd()
304 if(file_buffer->file_size != file_buffer->size) { in frag_thrd()
305 seq_queue_put(to_main, file_buffer); in frag_thrd()
309 file_size = file_buffer->file_size; in frag_thrd()
315 file_buffer->dupl_start = dupl_ptr; in frag_thrd()
316 file_buffer->duplicate = FALSE; in frag_thrd()
340 if(checksum != file_buffer->checksum) { in frag_thrd()
344 } else if(checksum == file_buffer->checksum) in frag_thrd()
350 res = memcmp(file_buffer->data, buffer->data + in frag_thrd()
354 struct file_buffer *dup = malloc(sizeof(*dup)); in frag_thrd()
357 memcpy(dup, file_buffer, sizeof(*dup)); in frag_thrd()
358 cache_block_put(file_buffer); in frag_thrd()
361 file_buffer = dup; in frag_thrd()
366 seq_queue_put(to_main, file_buffer); in frag_thrd()