• Home
  • Raw
  • Download

Lines Matching refs:jsb

43 					   journal_superblock_t *jsb)  in e2fsck_journal_verify_csum_type()  argument
48 return jsb->s_checksum_type == JBD2_CRC32C_CHKSUM; in e2fsck_journal_verify_csum_type()
51 static __u32 e2fsck_journal_sb_csum(journal_superblock_t *jsb) in e2fsck_journal_sb_csum() argument
55 old_crc = jsb->s_checksum; in e2fsck_journal_sb_csum()
56 jsb->s_checksum = 0; in e2fsck_journal_sb_csum()
57 crc = ext2fs_crc32c_le(~0, (unsigned char *)jsb, in e2fsck_journal_sb_csum()
59 jsb->s_checksum = old_crc; in e2fsck_journal_sb_csum()
65 journal_superblock_t *jsb) in e2fsck_journal_sb_csum_verify() argument
72 provided = ext2fs_be32_to_cpu(jsb->s_checksum); in e2fsck_journal_sb_csum_verify()
73 calculated = e2fsck_journal_sb_csum(jsb); in e2fsck_journal_sb_csum_verify()
79 journal_superblock_t *jsb) in e2fsck_journal_sb_csum_set() argument
86 crc = e2fsck_journal_sb_csum(jsb); in e2fsck_journal_sb_csum_set()
87 jsb->s_checksum = ext2fs_cpu_to_be32(crc); in e2fsck_journal_sb_csum_set()
1261 journal_superblock_t *jsb; in e2fsck_journal_load() local
1274 jsb = journal->j_superblock; in e2fsck_journal_load()
1276 if (jsb->s_header.h_magic != htonl(JBD2_MAGIC_NUMBER)) in e2fsck_journal_load()
1279 switch (ntohl(jsb->s_header.h_blocktype)) { in e2fsck_journal_load()
1282 if (jsb->s_feature_compat || in e2fsck_journal_load()
1283 jsb->s_feature_incompat || in e2fsck_journal_load()
1284 jsb->s_feature_ro_compat || in e2fsck_journal_load()
1285 jsb->s_nr_users) in e2fsck_journal_load()
1291 if (ntohl(jsb->s_nr_users) > 1 && in e2fsck_journal_load()
1294 if (ntohl(jsb->s_nr_users) > 1) { in e2fsck_journal_load()
1330 if (!e2fsck_journal_verify_csum_type(journal, jsb) || in e2fsck_journal_load()
1331 !e2fsck_journal_sb_csum_verify(journal, jsb)) in e2fsck_journal_load()
1335 journal->j_csum_seed = jbd2_chksum(journal, ~0, jsb->s_uuid, in e2fsck_journal_load()
1336 sizeof(jsb->s_uuid)); in e2fsck_journal_load()
1341 if (jsb->s_blocksize != htonl(journal->j_blocksize)) { in e2fsck_journal_load()
1348 if (ntohl(jsb->s_maxlen) < journal->j_total_len) in e2fsck_journal_load()
1349 journal->j_total_len = ntohl(jsb->s_maxlen); in e2fsck_journal_load()
1350 else if (ntohl(jsb->s_maxlen) > journal->j_total_len) { in e2fsck_journal_load()
1357 journal->j_tail_sequence = ntohl(jsb->s_sequence); in e2fsck_journal_load()
1359 journal->j_tail = ntohl(jsb->s_start); in e2fsck_journal_load()
1360 journal->j_first = ntohl(jsb->s_first); in e2fsck_journal_load()
1362 if (ntohl(jsb->s_maxlen) - jbd2_journal_get_num_fc_blks(jsb) in e2fsck_journal_load()
1369 journal->j_fc_last = ntohl(jsb->s_maxlen); in e2fsck_journal_load()
1371 jbd2_journal_get_num_fc_blks(jsb); in e2fsck_journal_load()
1374 journal->j_last = ntohl(jsb->s_maxlen); in e2fsck_journal_load()
1380 static void e2fsck_journal_reset_super(e2fsck_t ctx, journal_superblock_t *jsb, in e2fsck_journal_reset_super() argument
1395 if (jsb->s_header.h_magic != htonl(JBD2_MAGIC_NUMBER) || in e2fsck_journal_reset_super()
1396 jsb->s_header.h_blocktype != htonl(JBD2_SUPERBLOCK_V1)) { in e2fsck_journal_reset_super()
1397 jsb->s_header.h_magic = htonl(JBD2_MAGIC_NUMBER); in e2fsck_journal_reset_super()
1398 jsb->s_header.h_blocktype = htonl(JBD2_SUPERBLOCK_V2); in e2fsck_journal_reset_super()
1403 p = ((char *) jsb) + sizeof(journal_header_t); in e2fsck_journal_reset_super()
1406 jsb->s_blocksize = htonl(ctx->fs->blocksize); in e2fsck_journal_reset_super()
1407 jsb->s_maxlen = htonl(journal->j_total_len); in e2fsck_journal_reset_super()
1408 jsb->s_first = htonl(1); in e2fsck_journal_reset_super()
1418 jsb->s_sequence = htonl(new_seq); in e2fsck_journal_reset_super()
1419 e2fsck_journal_sb_csum_set(journal, jsb); in e2fsck_journal_reset_super()
1450 journal_superblock_t *jsb; in e2fsck_journal_release() local
1455 jsb = journal->j_superblock; in e2fsck_journal_release()
1456 jsb->s_sequence = htonl(journal->j_tail_sequence); in e2fsck_journal_release()
1458 jsb->s_start = 0; /* this marks the journal as empty */ in e2fsck_journal_release()
1459 e2fsck_journal_sb_csum_set(journal, jsb); in e2fsck_journal_release()