Home
last modified time | relevance | path

Searched refs:csum (Results 1 – 24 of 24) sorted by relevance

/fs/ext4/
Dbitmap.c45 __u32 csum; in ext4_inode_bitmap_csum_set() local
51 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_inode_bitmap_csum_set()
52 gdp->bg_inode_bitmap_csum_lo = cpu_to_le16(csum & 0xFFFF); in ext4_inode_bitmap_csum_set()
54 gdp->bg_inode_bitmap_csum_hi = cpu_to_le16(csum >> 16); in ext4_inode_bitmap_csum_set()
88 __u32 csum; in ext4_block_bitmap_csum_set() local
94 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_block_bitmap_csum_set()
95 gdp->bg_block_bitmap_csum_lo = cpu_to_le16(csum & 0xFFFF); in ext4_block_bitmap_csum_set()
97 gdp->bg_block_bitmap_csum_hi = cpu_to_le16(csum >> 16); in ext4_block_bitmap_csum_set()
Dmmp.c15 __u32 csum; in ext4_mmp_csum() local
17 csum = ext4_chksum(sbi, sbi->s_csum_seed, (char *)mmp, offset); in ext4_mmp_csum()
19 return cpu_to_le32(csum); in ext4_mmp_csum()
Dinode.c56 __u32 csum; in ext4_inode_csum() local
61 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)raw, offset); in ext4_inode_csum()
62 csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, csum_size); in ext4_inode_csum()
64 csum = ext4_chksum(sbi, csum, (__u8 *)raw + offset, in ext4_inode_csum()
69 csum = ext4_chksum(sbi, csum, (__u8 *)raw + in ext4_inode_csum()
73 csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, in ext4_inode_csum()
77 csum = ext4_chksum(sbi, csum, (__u8 *)raw + offset, in ext4_inode_csum()
81 return csum; in ext4_inode_csum()
108 __u32 csum; in ext4_inode_csum_set() local
115 csum = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_set()
[all …]
Dxattr.c139 __u32 csum; in ext4_xattr_block_csum() local
144 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)&dsk_block_nr, in ext4_xattr_block_csum()
146 csum = ext4_chksum(sbi, csum, (__u8 *)hdr, offset); in ext4_xattr_block_csum()
147 csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, sizeof(dummy_csum)); in ext4_xattr_block_csum()
149 csum = ext4_chksum(sbi, csum, (__u8 *)hdr + offset, in ext4_xattr_block_csum()
152 return cpu_to_le32(csum); in ext4_xattr_block_csum()
Dnamei.c378 __u32 csum; in ext4_dirblock_csum() local
380 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)dirent, size); in ext4_dirblock_csum()
381 return cpu_to_le32(csum); in ext4_dirblock_csum()
474 __u32 csum; in ext4_dx_csum() local
480 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)dirent, size); in ext4_dx_csum()
481 csum = ext4_chksum(sbi, csum, (__u8 *)t, offset); in ext4_dx_csum()
482 csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, sizeof(dummy_csum)); in ext4_dx_csum()
484 return cpu_to_le32(csum); in ext4_dx_csum()
1058 int csum = ext4_has_metadata_csum(dir->i_sb); in htree_dirblock_to_tree() local
1071 csum ? NULL : dir)); in htree_dirblock_to_tree()
Dioctl.c95 __u32 csum; in ext4_reset_inode_seed() local
100 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)&inum, sizeof(inum)); in ext4_reset_inode_seed()
101 ei->i_csum_seed = ext4_chksum(sbi, csum, (__u8 *)&gen, sizeof(gen)); in ext4_reset_inode_seed()
Dialloc.c1285 __u32 csum; in __ext4_new_inode() local
1288 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)&inum, in __ext4_new_inode()
1290 ei->i_csum_seed = ext4_chksum(sbi, csum, (__u8 *)&gen, in __ext4_new_inode()
Dextents.c54 __u32 csum; in ext4_extent_block_csum() local
56 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)eh, in ext4_extent_block_csum()
58 return cpu_to_le32(csum); in ext4_extent_block_csum()
Dsuper.c263 __u32 csum; in ext4_superblock_csum() local
265 csum = ext4_chksum(sbi, ~0, (char *)es, offset); in ext4_superblock_csum()
267 return cpu_to_le32(csum); in ext4_superblock_csum()
/fs/nfsd/
Dnfscache.c94 nfsd_reply_cache_alloc(struct svc_rqst *rqstp, __wsum csum, in nfsd_reply_cache_alloc() argument
114 rp->c_key.k_csum = csum; in nfsd_reply_cache_alloc()
296 __wsum csum; in nfsd_cache_csum() local
304 csum = csum_partial(p, len, 0); in nfsd_cache_csum()
313 csum = csum_partial(p, len, csum); in nfsd_cache_csum()
318 return csum; in nfsd_cache_csum()
402 __wsum csum; in nfsd_cache_lookup() local
414 csum = nfsd_cache_csum(rqstp); in nfsd_cache_lookup()
420 rp = nfsd_reply_cache_alloc(rqstp, csum, nn); in nfsd_cache_lookup()
/fs/cachefiles/
Dkey.c35 unsigned char csum, ch; in cachefiles_cook_key() local
44 csum = raw[0] + raw[1]; in cachefiles_cook_key()
48 csum += ch; in cachefiles_cook_key()
84 sprintf(key, "@%02x%c+", (unsigned) csum, 0); in cachefiles_cook_key()
/fs/btrfs/
Dfile-item.c265 u8 *csum; in btrfs_lookup_bio_sums() local
284 btrfs_bio->csum = kmalloc_array(nblocks, csum_size, in btrfs_lookup_bio_sums()
286 if (!btrfs_bio->csum) { in btrfs_lookup_bio_sums()
291 btrfs_bio->csum = btrfs_bio->csum_inline; in btrfs_lookup_bio_sums()
293 csum = btrfs_bio->csum; in btrfs_lookup_bio_sums()
295 csum = dst; in btrfs_lookup_bio_sums()
322 disk_bytenr, csum, nblocks); in btrfs_lookup_bio_sums()
337 memset(csum, 0, csum_size); in btrfs_lookup_bio_sums()
373 read_extent_buffer(path->nodes[0], csum, in btrfs_lookup_bio_sums()
377 csum += count * csum_size; in btrfs_lookup_bio_sums()
[all …]
Dbtrfs_inode.h372 u64 logical_start, u8 *csum, u8 *csum_expected, int mirror_num) in btrfs_print_data_csum_error() argument
384 CSUM_FMT_VALUE(csum_size, csum), in btrfs_print_data_csum_error()
392 CSUM_FMT_VALUE(csum_size, csum), in btrfs_print_data_csum_error()
Dvolumes.h294 u8 *csum; member
311 if (io_bio->csum != io_bio->csum_inline) { in btrfs_io_bio_free_csum()
312 kfree(io_bio->csum); in btrfs_io_bio_free_csum()
313 io_bio->csum = NULL; in btrfs_io_bio_free_csum()
Dscrub.c79 u8 csum[BTRFS_CSUM_SIZE]; member
240 u64 gen, int mirror_num, u8 *csum, int force,
1350 memcpy(page->csum, in scrub_setup_recheck_block()
1351 original_sblock->pagev[0]->csum, in scrub_setup_recheck_block()
1788 u8 csum[BTRFS_CSUM_SIZE]; in scrub_checksum_data() local
1801 crypto_shash_digest(shash, kaddr, PAGE_SIZE, csum); in scrub_checksum_data()
1803 if (memcmp(csum, spage->csum, sctx->csum_size)) in scrub_checksum_data()
1826 memcpy(on_disk_csum, h->csum, sctx->csum_size); in scrub_checksum_tree_block()
1896 if (memcmp(calculated_csum, s->csum, sctx->csum_size)) in scrub_checksum_super()
2155 u64 gen, int mirror_num, u8 *csum, int force, in scrub_pages() argument
[all …]
Dcompression.c154 u8 csum[BTRFS_CSUM_SIZE]; in check_compressed_csum() local
167 crypto_shash_digest(shash, kaddr, PAGE_SIZE, csum); in check_compressed_csum()
170 if (memcmp(&csum, cb_sum, csum_size)) { in check_compressed_csum()
172 csum, cb_sum, cb->mirror_num); in check_compressed_csum()
Dcheck-integrity.c1704 u8 csum[BTRFS_CSUM_SIZE]; in btrfsic_test_for_metadata() local
1725 crypto_shash_final(shash, csum); in btrfsic_test_for_metadata()
1726 if (memcmp(csum, h->csum, state->csum_size)) in btrfsic_test_for_metadata()
Dinode.c2864 u8 csum[BTRFS_CSUM_SIZE]; in check_data_csum() local
2866 csum_expected = ((u8 *)io_bio->csum) + icsum * csum_size; in check_data_csum()
2871 crypto_shash_digest(shash, kaddr + pgoff, len, csum); in check_data_csum()
2873 if (memcmp(csum, csum_expected, csum_size)) in check_data_csum()
2879 btrfs_print_data_csum_error(BTRFS_I(inode), start, csum, csum_expected, in check_data_csum()
7659 const bool csum = !(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM); in btrfs_check_read_dio_bio() local
7674 (!csum || !check_data_csum(inode, io_bio, icsum, in btrfs_check_read_dio_bio()
7819 btrfs_io_bio(bio)->csum = dip->csums + csum_offset; in btrfs_submit_dio_bio()
7836 const bool csum = !(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM); in btrfs_create_dio_private() local
7841 if (!write && csum) { in btrfs_create_dio_private()
[all …]
Dextent_io.c2685 if (failed_io_bio->csum) { in btrfs_submit_read_repair()
2688 repair_io_bio->csum = repair_io_bio->csum_inline; in btrfs_submit_read_repair()
2689 memcpy(repair_io_bio->csum, in btrfs_submit_read_repair()
2690 failed_io_bio->csum + csum_size * icsum, csum_size); in btrfs_submit_read_repair()
Dctree.h164 u8 csum[BTRFS_CSUM_SIZE]; member
230 u8 csum[BTRFS_CSUM_SIZE]; member
Ddisk-io.c322 if (memcmp(disk_sb->csum, result, btrfs_super_csum_size(disk_sb))) in btrfs_check_super_csum()
3626 sb->csum); in write_dev_supers()
/fs/efs/
Dsuper.c158 int csum; in module_exit() local
173 for(csum = 0; ui >= ((__be32 *) vh);) { in module_exit()
175 csum += be32_to_cpu(cs); in module_exit()
177 if (csum) { in module_exit()
/fs/jbd2/
Djournal.c132 __u32 csum; in jbd2_superblock_csum() local
137 csum = jbd2_chksum(j, ~0, (char *)sb, sizeof(journal_superblock_t)); in jbd2_superblock_csum()
140 return cpu_to_be32(csum); in jbd2_superblock_csum()
1049 __u32 csum; in jbd2_descriptor_block_csum_set() local
1057 csum = jbd2_chksum(j, j->j_csum_seed, bh->b_data, j->j_blocksize); in jbd2_descriptor_block_csum_set()
1058 tail->t_checksum = cpu_to_be32(csum); in jbd2_descriptor_block_csum_set()
Dcommit.c95 __u32 csum; in jbd2_commit_block_csum_set() local
104 csum = jbd2_chksum(j, j->j_csum_seed, bh->b_data, j->j_blocksize); in jbd2_commit_block_csum_set()
105 h->h_chksum[0] = cpu_to_be32(csum); in jbd2_commit_block_csum_set()