Lines Matching full:csum
275 * Return 0 for the range [disk_bytenr, disk_bytenr + sectorsize) has no csum
296 /* Check if the current csum item covers disk_bytenr */ in search_csum_tree()
337 * Lookup the checksum for the read bio in csum tree.
363 * - All our csums should only be in csum tree in btrfs_lookup_bio_sums()
377 bbio->csum = kmalloc_array(nblocks, csum_size, GFP_NOFS); in btrfs_lookup_bio_sums()
378 if (!bbio->csum) { in btrfs_lookup_bio_sums()
383 bbio->csum = bbio->csum_inline; in btrfs_lookup_bio_sums()
388 * kick the readahead for csum tree. in btrfs_lookup_bio_sums()
397 * between reading the free space cache and updating the csum tree. in btrfs_lookup_bio_sums()
407 u8 *csum_dst = bbio->csum + in btrfs_lookup_bio_sums()
414 if (bbio->csum != bbio->csum_inline) in btrfs_lookup_bio_sums()
415 kfree(bbio->csum); in btrfs_lookup_bio_sums()
416 bbio->csum = NULL; in btrfs_lookup_bio_sums()
421 * We didn't find a csum for this range. We need to make sure in btrfs_lookup_bio_sums()
427 * copying is in fact NODATASUM. If we don't find a csum we in btrfs_lookup_bio_sums()
442 "csum hole found for disk bytenr range [%llu, %llu)", in btrfs_lookup_bio_sums()
500 * There are two cases we can hit here for the previous csum in btrfs_lookup_csums_list()
504 * |<- csum item ->| in btrfs_lookup_csums_list()
508 * |<- csum item ->| in btrfs_lookup_csums_list()
510 * Check if the previous csum item covers the leading part of in btrfs_lookup_csums_list()
511 * the search range. If so we have to start from previous csum in btrfs_lookup_csums_list()
607 * that there is a csum found.
656 * There are two cases we can hit here for the previous csum in btrfs_lookup_csums_bitmap()
660 * |<- csum item ->| in btrfs_lookup_csums_bitmap()
664 * |<- csum item ->| in btrfs_lookup_csums_bitmap()
666 * Check if the previous csum item covers the leading part of in btrfs_lookup_csums_bitmap()
667 * the search range. If so we have to start from previous csum in btrfs_lookup_csums_bitmap()
816 * This expects the key to describe the csum pointed to by the path, and it
817 * expects the csum to overlap the range [bytenr, len]
819 * The csum should not be entirely contained in the range and the range should
820 * not be entirely contained in the csum.
846 * [csum ] in truncate_one_csum()
857 * [csum ] in truncate_one_csum()
858 * we need to truncate from the beginning of the csum in truncate_one_csum()
873 * Delete the csum items from the csum tree for a given range of bytes.
925 /* this csum ends before we start, we're done */ in btrfs_del_csums()
934 * Check how many csum items preceding this one in this in btrfs_del_csums()
968 * [csum ] in btrfs_del_csums()
970 * Our bytes are in the middle of the csum, in btrfs_del_csums()
974 * csum could change, get removed, extended etc. in btrfs_del_csums()
976 * The trick here is the max size of a csum item leaves in btrfs_del_csums()
981 * a nicely formed csum item that we can neatly in btrfs_del_csums()
1107 /* We didn't find a csum item, insert one. */ in btrfs_csum_file_blocks()
1219 goto csum; in btrfs_csum_file_blocks()
1244 csum: in btrfs_csum_file_blocks()