/* Load the on-disk journal superblock and read the key fields into the journal_t.  */
static int load_superblock(journal_t *journal)
/* Load the on-disk journal superblock and read the key fields into the journal_t.  */
static int load_superblock(journal_t *journal)
{
	int err;
	journal_superblock_t *sb;
	err = journal_get_superblock(journal);
	if (err)
		return err;
	sb = journal->j_superblock;
	journal->j_tail_sequence = be32_to_cpu(sb->s_sequence);
	journal->j_tail = be32_to_cpu(sb->s_start);
	journal->j_first = be32_to_cpu(sb->s_first);
	journal->j_last = be32_to_cpu(sb->s_maxlen);
	journal->j_errno = be32_to_cpu(sb->s_errno);
	return 0;
}