Lines Matching refs:csum_size
125 u16 csum_size) in max_ordered_sum_bytes() argument
127 u32 ncsums = (PAGE_SIZE - sizeof(struct btrfs_ordered_sum)) / csum_size; in max_ordered_sum_bytes()
140 return sizeof(struct btrfs_ordered_sum) + num_sectors * fs_info->csum_size; in btrfs_ordered_sum_size()
198 const u32 csum_size = fs_info->csum_size; in btrfs_lookup_csum() local
220 csums_in_item /= csum_size; in btrfs_lookup_csum()
231 csum_offset * csum_size); in btrfs_lookup_csum()
272 const u32 csum_size = fs_info->csum_size; in search_csum_tree() local
289 csum_len = (itemsize / csum_size) * sectorsize; in search_csum_tree()
307 csum_len = (itemsize / csum_size) * sectorsize; in search_csum_tree()
314 ret * csum_size); in search_csum_tree()
382 const u32 csum_size = fs_info->csum_size; in btrfs_lookup_bio_sums() local
415 if (nblocks * csum_size > BTRFS_BIO_INLINE_CSUM_SIZE) { in btrfs_lookup_bio_sums()
416 bbio->csum = kmalloc_array(nblocks, csum_size, GFP_NOFS); in btrfs_lookup_bio_sums()
465 csum_dst = csum + sector_offset * csum_size; in btrfs_lookup_bio_sums()
487 memset(csum_dst, 0, csum_size); in btrfs_lookup_bio_sums()
528 const u32 csum_size = fs_info->csum_size; in btrfs_lookup_csums_range() local
557 if (offset * csum_size < in btrfs_lookup_csums_range()
584 csum_end = key.offset + (size / csum_size) * fs_info->sectorsize; in btrfs_lookup_csums_range()
595 max_ordered_sum_bytes(fs_info, csum_size)); in btrfs_lookup_csums_range()
607 offset *= csum_size; in btrfs_lookup_csums_range()
613 csum_size * size); in btrfs_lookup_csums_range()
735 index += fs_info->csum_size; in btrfs_csum_one_bio()
765 const u32 csum_size = fs_info->csum_size; in truncate_one_csum() local
771 csum_end = btrfs_item_size(leaf, path->slots[0]) / csum_size; in truncate_one_csum()
783 new_size *= csum_size; in truncate_one_csum()
794 new_size *= csum_size; in truncate_one_csum()
819 const u32 csum_size = fs_info->csum_size; in btrfs_del_csums() local
855 csum_end = btrfs_item_size(leaf, path->slots[0]) / csum_size; in btrfs_del_csums()
919 offset *= csum_size; in btrfs_del_csums()
921 shift_len = (len >> blocksize_bits) * csum_size; in btrfs_del_csums()
1003 const u32 csum_size = fs_info->csum_size; in btrfs_csum_file_blocks() local
1035 if ((item_size / csum_size) >= in btrfs_csum_file_blocks()
1036 MAX_CSUM_ITEMS(fs_info, csum_size)) { in btrfs_csum_file_blocks()
1059 if (btrfs_leaf_free_space(leaf) >= csum_size) { in btrfs_csum_file_blocks()
1069 csum_size, 1); in btrfs_csum_file_blocks()
1086 csum_offset >= MAX_CSUM_ITEMS(fs_info, csum_size)) { in btrfs_csum_file_blocks()
1092 csum_size) { in btrfs_csum_file_blocks()
1142 diff = (csum_offset + extend_nr) * csum_size; in btrfs_csum_file_blocks()
1144 MAX_CSUM_ITEMS(fs_info, csum_size) * csum_size); in btrfs_csum_file_blocks()
1148 diff /= csum_size; in btrfs_csum_file_blocks()
1149 diff *= csum_size; in btrfs_csum_file_blocks()
1168 tmp = min_t(u64, tmp, MAX_CSUM_ITEMS(fs_info, csum_size)); in btrfs_csum_file_blocks()
1169 ins_size = csum_size * tmp; in btrfs_csum_file_blocks()
1171 ins_size = csum_size; in btrfs_csum_file_blocks()
1185 csum_offset * csum_size); in btrfs_csum_file_blocks()
1188 ins_size *= csum_size; in btrfs_csum_file_blocks()
1195 ins_size /= csum_size; in btrfs_csum_file_blocks()