Lines Matching refs:csum_size

87 	u16 csum_size = btrfs_super_csum_size(fs_info->super_copy);  in btrfs_lookup_csum()  local
109 csums_in_item /= csum_size; in btrfs_lookup_csum()
120 csum_offset * csum_size); in btrfs_lookup_csum()
169 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in __btrfs_lookup_bio_sums() local
177 if (nblocks * csum_size > BTRFS_BIO_INLINE_CSUM_SIZE) { in __btrfs_lookup_bio_sums()
179 csum_size, GFP_NOFS); in __btrfs_lookup_bio_sums()
235 memset(csum, 0, csum_size); in __btrfs_lookup_bio_sums()
257 (item_size / csum_size) * in __btrfs_lookup_bio_sums()
268 diff = diff * csum_size; in __btrfs_lookup_bio_sums()
273 csum_size * count); in __btrfs_lookup_bio_sums()
275 csum += count * csum_size; in __btrfs_lookup_bio_sums()
317 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in btrfs_lookup_csums_range() local
346 if (offset * csum_size < in btrfs_lookup_csums_range()
373 csum_end = key.offset + (size / csum_size) * fs_info->sectorsize; in btrfs_lookup_csums_range()
397 offset *= csum_size; in btrfs_lookup_csums_range()
403 csum_size * size); in btrfs_lookup_csums_range()
536 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in truncate_one_csum() local
542 csum_end = btrfs_item_size_nr(leaf, path->slots[0]) / csum_size; in truncate_one_csum()
554 new_size *= csum_size; in truncate_one_csum()
565 new_size *= csum_size; in truncate_one_csum()
590 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in btrfs_del_csums() local
627 csum_end = btrfs_item_size_nr(leaf, path->slots[0]) / csum_size; in btrfs_del_csums()
691 offset *= csum_size; in btrfs_del_csums()
693 shift_len = (len >> blocksize_bits) * csum_size; in btrfs_del_csums()
745 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in btrfs_csum_file_blocks() local
777 if ((item_size / csum_size) >= in btrfs_csum_file_blocks()
778 MAX_CSUM_ITEMS(fs_info, csum_size)) { in btrfs_csum_file_blocks()
813 csum_size, 1); in btrfs_csum_file_blocks()
830 csum_offset >= MAX_CSUM_ITEMS(fs_info, csum_size)) { in btrfs_csum_file_blocks()
835 csum_size) { in btrfs_csum_file_blocks()
842 sizeof(struct btrfs_item) + csum_size * 2) in btrfs_csum_file_blocks()
846 sizeof(struct btrfs_item) - csum_size; in btrfs_csum_file_blocks()
852 diff = (csum_offset + extend_nr) * csum_size; in btrfs_csum_file_blocks()
854 MAX_CSUM_ITEMS(fs_info, csum_size) * csum_size); in btrfs_csum_file_blocks()
858 diff /= csum_size; in btrfs_csum_file_blocks()
859 diff *= csum_size; in btrfs_csum_file_blocks()
878 tmp = min_t(u64, tmp, MAX_CSUM_ITEMS(fs_info, csum_size)); in btrfs_csum_file_blocks()
879 ins_size = csum_size * tmp; in btrfs_csum_file_blocks()
881 ins_size = csum_size; in btrfs_csum_file_blocks()
897 csum_offset * csum_size); in btrfs_csum_file_blocks()
901 ins_size *= csum_size; in btrfs_csum_file_blocks()
907 ins_size /= csum_size; in btrfs_csum_file_blocks()