Home
last modified time | relevance | path

Searched refs:crc (Results 1 – 25 of 43) sorted by relevance

12

/fs/ocfs2/
Dblockcheck.c394 u32 crc; in ocfs2_block_check_compute() local
399 crc = crc32_le(~0, data, blocksize); in ocfs2_block_check_compute()
408 bc->bc_crc32e = cpu_to_le32(crc); in ocfs2_block_check_compute()
427 u32 crc, ecc; in ocfs2_block_check_validate() local
437 crc = crc32_le(~0, data, blocksize); in ocfs2_block_check_validate()
438 if (crc == bc_crc32e) in ocfs2_block_check_validate()
444 (unsigned int)bc_crc32e, (unsigned int)crc); in ocfs2_block_check_validate()
451 crc = crc32_le(~0, data, blocksize); in ocfs2_block_check_validate()
452 if (crc == bc_crc32e) { in ocfs2_block_check_validate()
458 (unsigned int)bc_crc32e, (unsigned int)crc); in ocfs2_block_check_validate()
[all …]
/fs/xfs/libxfs/
Dxfs_cksum.h17 uint32_t crc; in xfs_start_cksum_safe() local
20 crc = crc32c(XFS_CRC_SEED, buffer, cksum_offset); in xfs_start_cksum_safe()
23 crc = crc32c(crc, &zero, sizeof(__u32)); in xfs_start_cksum_safe()
26 return crc32c(crc, &buffer[cksum_offset + sizeof(__be32)], in xfs_start_cksum_safe()
52 xfs_end_cksum(uint32_t crc) in xfs_end_cksum() argument
54 return ~cpu_to_le32(crc); in xfs_end_cksum()
66 uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset); in xfs_update_cksum() local
68 *(__le32 *)(buffer + cksum_offset) = xfs_end_cksum(crc); in xfs_update_cksum()
77 uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset); in xfs_verify_cksum() local
79 return *(__le32 *)(buffer + cksum_offset) == xfs_end_cksum(crc); in xfs_verify_cksum()
Dxfs_da_format.h60 __be32 crc; /* CRC of block */ member
91 #define XFS_DA3_NODE_CRC_OFF (offsetof(struct xfs_da3_node_hdr, info.crc))
338 __be32 crc; /* CRC of block */ member
351 #define XFS_DIR3_DATA_CRC_OFF offsetof(struct xfs_dir3_data_hdr, hdr.crc)
485 #define XFS_DIR3_LEAF_CRC_OFF offsetof(struct xfs_dir3_leaf_hdr, info.crc)
533 #define XFS_DIR3_FREE_CRC_OFF offsetof(struct xfs_dir3_free, hdr.hdr.crc)
708 #define XFS_ATTR3_LEAF_CRC_OFF (offsetof(struct xfs_attr3_leaf_hdr, info.crc))
Dxfs_inode_buf.c446 uint32_t crc; in xfs_dinode_calc_crc() local
452 crc = xfs_start_cksum_update((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_calc_crc()
454 dip->di_crc = xfs_end_cksum(crc); in xfs_dinode_calc_crc()
/fs/nilfs2/
Dsegbuf.c184 u32 crc; in nilfs_segbuf_fill_in_segsum_crc() local
191 crc = crc32_le(seed, in nilfs_segbuf_fill_in_segsum_crc()
201 crc = crc32_le(crc, bh->b_data, size); in nilfs_segbuf_fill_in_segsum_crc()
203 raw_sum->ss_sumsum = cpu_to_le32(crc); in nilfs_segbuf_fill_in_segsum_crc()
212 u32 crc; in nilfs_segbuf_fill_in_data_crc() local
217 crc = crc32_le(seed, in nilfs_segbuf_fill_in_data_crc()
223 crc = crc32_le(crc, bh->b_data, bh->b_size); in nilfs_segbuf_fill_in_data_crc()
227 crc = crc32_le(crc, kaddr + bh_offset(bh), bh->b_size); in nilfs_segbuf_fill_in_data_crc()
230 raw_sum->ss_datasum = cpu_to_le32(crc); in nilfs_segbuf_fill_in_data_crc()
240 u32 crc; in nilfs_segbuf_fill_in_super_root_crc() local
[all …]
Drecovery.c108 u32 crc; in nilfs_compute_checksum() local
113 crc = crc32_le(nilfs->ns_crc_seed, in nilfs_compute_checksum()
124 crc = crc32_le(crc, bh->b_data, size); in nilfs_compute_checksum()
128 *sum = crc; in nilfs_compute_checksum()
144 u32 crc; in nilfs_read_super_root_block() local
163 nilfs, bh_sr, &crc, sizeof(sr->sr_sum), bytes, in nilfs_read_super_root_block()
168 if (crc != le32_to_cpu(sr->sr_sum)) { in nilfs_read_super_root_block()
213 u32 crc; in nilfs_validate_log() local
231 if (nilfs_compute_checksum(nilfs, bh_sum, &crc, sizeof(sum->ss_datasum), in nilfs_validate_log()
237 if (crc != le32_to_cpu(sum->ss_datasum)) in nilfs_validate_log()
Dthe_nilfs.c445 u32 crc; in nilfs_valid_sb() local
452 crc = crc32_le(le32_to_cpu(sbp->s_crc_seed), (unsigned char *)sbp, in nilfs_valid_sb()
454 crc = crc32_le(crc, sum, 4); in nilfs_valid_sb()
455 crc = crc32_le(crc, (unsigned char *)sbp + sumoff + 4, in nilfs_valid_sb()
457 return crc == le32_to_cpu(sbp->s_sum); in nilfs_valid_sb()
/fs/jffs2/
Dread.c29 uint32_t crc; in jffs2_read_dnode() local
51 crc = crc32(0, ri, sizeof(*ri)-8); in jffs2_read_dnode()
55 crc, je32_to_cpu(ri->dsize), je32_to_cpu(ri->csize), in jffs2_read_dnode()
57 if (crc != je32_to_cpu(ri->node_crc)) { in jffs2_read_dnode()
59 je32_to_cpu(ri->node_crc), crc, ref_offset(fd->raw)); in jffs2_read_dnode()
123 crc = crc32(0, readbuf, je32_to_cpu(ri->csize)); in jffs2_read_dnode()
124 if (crc != je32_to_cpu(ri->data_crc)) { in jffs2_read_dnode()
126 je32_to_cpu(ri->data_crc), crc, ref_offset(fd->raw)); in jffs2_read_dnode()
130 jffs2_dbg(2, "Data CRC matches calculated CRC %08x\n", crc); in jffs2_read_dnode()
Dscan.c332 uint32_t xid, version, totlen, crc; in jffs2_scan_xattr_node() local
335 crc = crc32(0, rx, sizeof(struct jffs2_raw_xattr) - 4); in jffs2_scan_xattr_node()
336 if (crc != je32_to_cpu(rx->node_crc)) { in jffs2_scan_xattr_node()
338 ofs, je32_to_cpu(rx->node_crc), crc); in jffs2_scan_xattr_node()
388 uint32_t crc; in jffs2_scan_xref_node() local
391 crc = crc32(0, rr, sizeof(*rr) - 4); in jffs2_scan_xref_node()
392 if (crc != je32_to_cpu(rr->node_crc)) { in jffs2_scan_xref_node()
394 ofs, je32_to_cpu(rr->node_crc), crc); in jffs2_scan_xref_node()
989 uint32_t crc, ino = je32_to_cpu(ri->ino); in jffs2_scan_inode_node() local
1003 crc = crc32(0, ri, sizeof(*ri)-8); in jffs2_scan_inode_node()
[all …]
Dgc.c599 uint32_t crc, rawlen; in jffs2_garbage_collect_pristine() local
634 crc = crc32(0, node, sizeof(struct jffs2_unknown_node)-4); in jffs2_garbage_collect_pristine()
635 if (je32_to_cpu(node->u.hdr_crc) != crc) { in jffs2_garbage_collect_pristine()
637 ref_offset(raw), je32_to_cpu(node->u.hdr_crc), crc); in jffs2_garbage_collect_pristine()
643 crc = crc32(0, node, sizeof(node->i)-8); in jffs2_garbage_collect_pristine()
644 if (je32_to_cpu(node->i.node_crc) != crc) { in jffs2_garbage_collect_pristine()
647 crc); in jffs2_garbage_collect_pristine()
652 crc = crc32(0, node->i.data, je32_to_cpu(node->i.csize)); in jffs2_garbage_collect_pristine()
653 if (je32_to_cpu(node->i.data_crc) != crc) { in jffs2_garbage_collect_pristine()
656 je32_to_cpu(node->i.data_crc), crc); in jffs2_garbage_collect_pristine()
[all …]
Dreadinode.c37 uint32_t crc, ofs, len; in check_node_data() local
99 crc = crc32(tn->partial_crc, buffer, len); in check_node_data()
107 if (crc != tn->data_crc) { in check_node_data()
109 ref_offset(ref), tn->data_crc, crc); in check_node_data()
591 uint32_t crc; in read_direntry() local
596 crc = crc32(0, rd, sizeof(*rd) - 8); in read_direntry()
597 if (unlikely(crc != je32_to_cpu(rd->node_crc))) { in read_direntry()
599 ref_offset(ref), je32_to_cpu(rd->node_crc), crc); in read_direntry()
704 uint32_t crc; in read_dnode() local
709 crc = crc32(0, rd, sizeof(*rd) - 8); in read_dnode()
[all …]
Dxattr.c139 uint32_t crc, offset, totlen; in do_verify_xattr_datum() local
154 crc = crc32(0, &rx, sizeof(rx) - 4); in do_verify_xattr_datum()
155 if (crc != je32_to_cpu(rx.node_crc)) { in do_verify_xattr_datum()
157 offset, je32_to_cpu(rx.hdr_crc), crc); in do_verify_xattr_datum()
209 uint32_t crc, length; in do_load_xattr_datum() local
231 crc = crc32(0, data, length); in do_load_xattr_datum()
232 if (crc != xd->data_crc) { in do_load_xattr_datum()
235 ref_offset(xd->node), xd->data_crc, crc); in do_load_xattr_datum()
450 uint32_t crc, offset, totlen; in verify_xattr_ref() local
466 crc = crc32(0, &rr, sizeof(rr) - 4); in verify_xattr_ref()
[all …]
Dsummary.c578 uint32_t crc; in jffs2_sum_scan_sumnode() local
589 crc = crc32(0, &crcnode, sizeof(crcnode)-4); in jffs2_sum_scan_sumnode()
591 if (je32_to_cpu(summary->hdr_crc) != crc) { in jffs2_sum_scan_sumnode()
602 crc = crc32(0, summary, sizeof(struct jffs2_raw_summary)-8); in jffs2_sum_scan_sumnode()
604 if (je32_to_cpu(summary->node_crc) != crc) { in jffs2_sum_scan_sumnode()
609 crc = crc32(0, summary->sum, sumsize - sizeof(struct jffs2_raw_summary)); in jffs2_sum_scan_sumnode()
611 if (je32_to_cpu(summary->sum_crc) != crc) { in jffs2_sum_scan_sumnode()
Ddebug.c778 uint32_t crc; in __jffs2_dbg_dump_node() local
795 crc = crc32(0, &node.u, sizeof(node.u) - 4); in __jffs2_dbg_dump_node()
796 if (crc != je32_to_cpu(node.u.hdr_crc)) { in __jffs2_dbg_dump_node()
832 crc = crc32(0, &node.i, sizeof(node.i) - 8); in __jffs2_dbg_dump_node()
833 if (crc != je32_to_cpu(node.i.node_crc)) { in __jffs2_dbg_dump_node()
854 crc = crc32(0, &node.d, sizeof(node.d) - 8); in __jffs2_dbg_dump_node()
855 if (crc != je32_to_cpu(node.d.node_crc)) { in __jffs2_dbg_dump_node()
/fs/ubifs/
Dio.c241 uint32_t crc, node_crc, magic; in ubifs_check_node() local
278 crc = crc32(UBIFS_CRC32_INIT, buf + 8, node_len - 8); in ubifs_check_node()
279 node_crc = le32_to_cpu(ch->crc); in ubifs_check_node()
280 if (crc != node_crc) { in ubifs_check_node()
283 crc, node_crc); in ubifs_check_node()
320 uint32_t crc; in ubifs_pad() local
336 crc = crc32(UBIFS_CRC32_INIT, buf + 8, UBIFS_PAD_NODE_SZ - 8); in ubifs_pad()
337 ch->crc = cpu_to_le32(crc); in ubifs_pad()
381 uint32_t crc; in ubifs_prepare_node() local
392 crc = crc32(UBIFS_CRC32_INIT, node + 8, len - 8); in ubifs_prepare_node()
[all …]
Dlpt.c355 uint16_t crc; in ubifs_pack_pnode() local
370 crc = crc16(-1, buf + UBIFS_LPT_CRC_BYTES, in ubifs_pack_pnode()
374 pack_bits(&addr, &pos, crc, UBIFS_LPT_CRC_BITS); in ubifs_pack_pnode()
388 uint16_t crc; in ubifs_pack_nnode() local
402 crc = crc16(-1, buf + UBIFS_LPT_CRC_BYTES, in ubifs_pack_nnode()
406 pack_bits(&addr, &pos, crc, UBIFS_LPT_CRC_BITS); in ubifs_pack_nnode()
420 uint16_t crc; in ubifs_pack_ltab() local
427 crc = crc16(-1, buf + UBIFS_LPT_CRC_BYTES, in ubifs_pack_ltab()
431 pack_bits(&addr, &pos, crc, UBIFS_LPT_CRC_BITS); in ubifs_pack_ltab()
444 uint16_t crc; in ubifs_pack_lsave() local
[all …]
/fs/udf/
Dunicode.c196 uint8_t crc[CRC_LEN]; in udf_name_from_CS0() local
277 crc[0] = CRC_MARK; in udf_name_from_CS0()
278 crc[1] = hex_asc_upper_hi(valueCRC >> 8); in udf_name_from_CS0()
279 crc[2] = hex_asc_upper_lo(valueCRC >> 8); in udf_name_from_CS0()
280 crc[3] = hex_asc_upper_hi(valueCRC); in udf_name_from_CS0()
281 crc[4] = hex_asc_upper_lo(valueCRC); in udf_name_from_CS0()
283 memcpy(&str_o[str_o_len], crc, len); in udf_name_from_CS0()
Dnamei.c48 uint16_t crc; in udf_write_fi() local
99 crc = crc_itu_t(0, (uint8_t *)cfi + sizeof(struct tag), in udf_write_fi()
103 crc = crc_itu_t(crc, (uint8_t *)sfi->impUse, in udf_write_fi()
107 crc = crc_itu_t(crc, fibh->ebh->b_data + in udf_write_fi()
113 crc = crc_itu_t(crc, (uint8_t *)sfi->impUse, in udf_write_fi()
115 crc = crc_itu_t(crc, fibh->ebh->b_data, fibh->eoffset); in udf_write_fi()
118 cfi->descTag.descCRC = cpu_to_le16(crc); in udf_write_fi()
/fs/qnx6/
Ddir.c18 unsigned crc = 0; in qnx6_lfile_checksum() local
21 crc = ((crc >> 1) + *(name++)) ^ in qnx6_lfile_checksum()
22 ((crc & 0x00000001) ? 0x80000000 : 0); in qnx6_lfile_checksum()
24 return crc; in qnx6_lfile_checksum()
/fs/btrfs/
Dhash.c37 u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length) in btrfs_crc32c() argument
46 *ctx = crc; in btrfs_crc32c()
Dhash.h27 u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length);
Dsend.h49 __le32 crc; member
Ddisk-io.c274 void btrfs_csum_final(u32 crc, u8 *result) in btrfs_csum_final() argument
276 put_unaligned_le32(~crc, result); in btrfs_csum_final()
296 u32 crc = ~(u32)0; in csum_tree_block() local
306 crc = btrfs_csum_data(kaddr + offset - map_start, in csum_tree_block()
307 crc, cur_len); in csum_tree_block()
319 btrfs_csum_final(crc, result); in csum_tree_block()
413 u32 crc = ~(u32)0; in btrfs_check_super_csum() local
414 const int csum_size = sizeof(crc); in btrfs_check_super_csum()
422 crc = btrfs_csum_data(raw_disk_sb + BTRFS_CSUM_SIZE, in btrfs_check_super_csum()
423 crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE); in btrfs_check_super_csum()
[all …]
Dfree-space-cache.c479 u32 crc = ~(u32)0; in io_ctl_set_crc() local
490 crc = btrfs_csum_data(io_ctl->orig + offset, crc, in io_ctl_set_crc()
492 btrfs_csum_final(crc, (u8 *)&crc); in io_ctl_set_crc()
496 *tmp = crc; in io_ctl_set_crc()
502 u32 crc = ~(u32)0; in io_ctl_check_crc() local
518 crc = btrfs_csum_data(io_ctl->orig + offset, crc, in io_ctl_check_crc()
520 btrfs_csum_final(crc, (u8 *)&crc); in io_ctl_check_crc()
521 if (val != crc) { in io_ctl_check_crc()
/fs/omfs/
Dinode.c86 u16 crc = 0; in omfs_update_checksums() local
92 crc = crc_itu_t(crc, ptr + ofs, count); in omfs_update_checksums()
93 oi->i_head.h_crc = cpu_to_be16(crc); in omfs_update_checksums()

12