Lines Matching refs:jsb

50 					   journal_superblock_t *jsb)  in ext2fs_journal_verify_csum_type()  argument
55 return jsb->s_checksum_type == JBD2_CRC32C_CHKSUM; in ext2fs_journal_verify_csum_type()
58 static __u32 ext2fs_journal_sb_csum(journal_superblock_t *jsb) in ext2fs_journal_sb_csum() argument
62 old_crc = jsb->s_checksum; in ext2fs_journal_sb_csum()
63 jsb->s_checksum = 0; in ext2fs_journal_sb_csum()
64 crc = ext2fs_crc32c_le(~0, (unsigned char *)jsb, in ext2fs_journal_sb_csum()
66 jsb->s_checksum = old_crc; in ext2fs_journal_sb_csum()
72 journal_superblock_t *jsb) in ext2fs_journal_sb_csum_verify() argument
79 provided = ext2fs_be32_to_cpu(jsb->s_checksum); in ext2fs_journal_sb_csum_verify()
80 calculated = ext2fs_journal_sb_csum(jsb); in ext2fs_journal_sb_csum_verify()
86 journal_superblock_t *jsb) in ext2fs_journal_sb_csum_set() argument
93 crc = ext2fs_journal_sb_csum(jsb); in ext2fs_journal_sb_csum_set()
94 jsb->s_checksum = ext2fs_cpu_to_be32(crc); in ext2fs_journal_sb_csum_set()
548 journal_superblock_t *jsb; in ext2fs_journal_load() local
555 jsb = journal->j_superblock; in ext2fs_journal_load()
557 if (jsb->s_header.h_magic != htonl(JFS_MAGIC_NUMBER)) in ext2fs_journal_load()
560 switch (ntohl(jsb->s_header.h_blocktype)) { in ext2fs_journal_load()
563 if (jsb->s_feature_compat || in ext2fs_journal_load()
564 jsb->s_feature_incompat || in ext2fs_journal_load()
565 jsb->s_feature_ro_compat || in ext2fs_journal_load()
566 jsb->s_nr_users) in ext2fs_journal_load()
572 if (ntohl(jsb->s_nr_users) > 1 && in ext2fs_journal_load()
575 if (ntohl(jsb->s_nr_users) > 1) in ext2fs_journal_load()
609 if (!ext2fs_journal_verify_csum_type(journal, jsb) || in ext2fs_journal_load()
610 !ext2fs_journal_sb_csum_verify(journal, jsb)) in ext2fs_journal_load()
614 journal->j_csum_seed = jbd2_chksum(journal, ~0, jsb->s_uuid, in ext2fs_journal_load()
615 sizeof(jsb->s_uuid)); in ext2fs_journal_load()
620 if (jsb->s_blocksize != htonl(journal->j_blocksize)) in ext2fs_journal_load()
623 if (ntohl(jsb->s_maxlen) < journal->j_maxlen) in ext2fs_journal_load()
624 journal->j_maxlen = ntohl(jsb->s_maxlen); in ext2fs_journal_load()
625 else if (ntohl(jsb->s_maxlen) > journal->j_maxlen) in ext2fs_journal_load()
628 journal->j_tail_sequence = ntohl(jsb->s_sequence); in ext2fs_journal_load()
630 journal->j_tail = ntohl(jsb->s_start); in ext2fs_journal_load()
631 journal->j_first = ntohl(jsb->s_first); in ext2fs_journal_load()
632 journal->j_last = ntohl(jsb->s_maxlen); in ext2fs_journal_load()
640 journal_superblock_t *jsb; in ext2fs_journal_release() local
645 jsb = journal->j_superblock; in ext2fs_journal_release()
646 jsb->s_sequence = htonl(journal->j_tail_sequence); in ext2fs_journal_release()
648 jsb->s_start = 0; /* this marks the journal as empty */ in ext2fs_journal_release()
649 ext2fs_journal_sb_csum_set(journal, jsb); in ext2fs_journal_release()