Lines Matching refs:dupl_ptr
1783 struct file_info *dupl_ptr = dupl[DUP_HASH(file_size)]; in add_file() local
1790 for(; dupl_ptr; dupl_ptr = dupl_ptr->next) { in add_file()
1791 if(file_size != dupl_ptr->file_size) in add_file()
1793 if(blocks != 0 && start != dupl_ptr->start) in add_file()
1795 if(fragment != dupl_ptr->fragment->index) in add_file()
1798 dupl_ptr->fragment->offset || bytes != in add_file()
1799 dupl_ptr->fragment->size)) in add_file()
1830 struct file_info *dupl_ptr = dupl[DUP_HASH(file_size)]; in pre_duplicate() local
1832 for(; dupl_ptr; dupl_ptr = dupl_ptr->next) in pre_duplicate()
1833 if(dupl_ptr->file_size == file_size) in pre_duplicate()
1845 struct file_info *dupl_ptr = malloc(sizeof(struct file_info)); in add_non_dup() local
1847 if(dupl_ptr == NULL) in add_non_dup()
1850 dupl_ptr->file_size = file_size; in add_non_dup()
1851 dupl_ptr->bytes = bytes; in add_non_dup()
1852 dupl_ptr->block_list = block_list; in add_non_dup()
1853 dupl_ptr->start = start; in add_non_dup()
1854 dupl_ptr->fragment = fragment; in add_non_dup()
1855 dupl_ptr->checksum = checksum; in add_non_dup()
1856 dupl_ptr->fragment_checksum = fragment_checksum; in add_non_dup()
1857 dupl_ptr->have_frag_checksum = checksum_frag_flag; in add_non_dup()
1858 dupl_ptr->have_checksum = checksum_flag; in add_non_dup()
1862 dupl_ptr->next = dupl[DUP_HASH(file_size)]; in add_non_dup()
1863 dupl[DUP_HASH(file_size)] = dupl_ptr; in add_non_dup()
1867 return dupl_ptr; in add_non_dup()
1873 struct file_info *dupl_ptr; in frag_duplicate() local
1888 dupl_ptr = dupl[DUP_HASH(file_size)]; in frag_duplicate()
1891 for(; dupl_ptr && dupl_ptr != dupl_start; dupl_ptr = dupl_ptr->next) { in frag_duplicate()
1892 if(file_size == dupl_ptr->file_size && file_size == in frag_duplicate()
1893 dupl_ptr->fragment->size) { in frag_duplicate()
1894 if(get_fragment_checksum(dupl_ptr) == checksum) { in frag_duplicate()
1895 buffer = get_fragment(dupl_ptr->fragment); in frag_duplicate()
1897 dupl_ptr->fragment->offset, file_size); in frag_duplicate()
1905 if(!dupl_ptr || dupl_ptr == dupl_start) in frag_duplicate()
1909 "checksum 0x%x\n", dupl_ptr->fragment->index, file_size, in frag_duplicate()
1910 dupl_ptr->fragment->offset, checksum); in frag_duplicate()
1912 return dupl_ptr->fragment; in frag_duplicate()
1921 struct file_info *dupl_ptr = dupl[DUP_HASH(file_size)]; in duplicate() local
1926 for(; dupl_ptr; dupl_ptr = dupl_ptr->next) in duplicate()
1927 if(file_size == dupl_ptr->file_size && bytes == dupl_ptr->bytes in duplicate()
1928 && frag_bytes == dupl_ptr->fragment->size) { in duplicate()
1929 long long target_start, dup_start = dupl_ptr->start; in duplicate()
1932 if(memcmp(*block_list, dupl_ptr->block_list, blocks * in duplicate()
1942 if(!dupl_ptr->have_checksum) { in duplicate()
1943 dupl_ptr->checksum = in duplicate()
1944 get_checksum_disk(dupl_ptr->start, in duplicate()
1945 dupl_ptr->bytes, dupl_ptr->block_list); in duplicate()
1946 dupl_ptr->have_checksum = TRUE; in duplicate()
1949 if(checksum != dupl_ptr->checksum || in duplicate()
1951 get_fragment_checksum(dupl_ptr)) in duplicate()
2006 get_fragment(dupl_ptr->fragment); in duplicate()
2011 dupl_ptr->fragment->offset, in duplicate()
2017 dupl_ptr->start, in duplicate()
2018 dupl_ptr->bytes, in duplicate()
2019 dupl_ptr->checksum, in duplicate()
2020 dupl_ptr->fragment->index, in duplicate()
2022 dupl_ptr->fragment->offset, in duplicate()
2024 *block_list = dupl_ptr->block_list; in duplicate()
2025 *start = dupl_ptr->start; in duplicate()
2026 *fragment = dupl_ptr->fragment; in duplicate()
2600 struct file_info *dupl_ptr; in write_file_blocks_dup() local
2657 dupl_ptr = duplicate(read_size, file_bytes, &block_listp, &dup_start, in write_file_blocks_dup()
2660 if(dupl_ptr) { in write_file_blocks_dup()
2666 dupl_ptr->fragment = fragment; in write_file_blocks_dup()