@@ -108,6 +108,9 @@ void e2p_list_journal_super(FILE *f, char *journal_sb_buf,
"Journal start: %u\n",
(unsigned int)ntohl(jsb->s_sequence),
(unsigned int)ntohl(jsb->s_start));
+ if (ntohl(jsb->s_start) == 0)
+ fprintf(f, "Journal head: %u\n",
+ (unsigned int)ntohl(jsb->s_head));
if (nr_users != 1)
fprintf(f, "Journal number of users: %u\n", nr_users);
if (jsb->s_feature_compat & e2p_be32(JBD2_FEATURE_COMPAT_CHECKSUM))
@@ -221,8 +221,10 @@ typedef struct journal_superblock_s
__u8 s_padding2[3];
/* 0x0054 */
__be32 s_num_fc_blks; /* Number of fast commit blocks */
-/* 0x0058 */
- __be32 s_padding[41];
+ __be32 s_head; /* blocknr of head of log, only uptodate
+ * while the filesystem is clean */
+/* 0x005C */
+ __be32 s_padding[40];
__be32 s_checksum; /* crc32c(superblock) */
/* 0x0100 */
@@ -79,6 +79,7 @@ errcode_t ext2fs_create_journal_superblock2(ext2_filsys fs,
jsb->s_nr_users = 0;
jsb->s_first = htonl(ext2fs_journal_sb_start(fs->blocksize) + 1);
}
+ jsb->s_head = jsb->s_first;
*ret_jsb = (char *) jsb;
return 0;