@@ -389,6 +389,8 @@ static void dump_superblock(struct btrfs_super_block *sb, int full)
(unsigned long long)btrfs_super_log_root_transid(sb));
printf("log_root_level\t\t%llu\n",
(unsigned long long)btrfs_super_log_root_level(sb));
+ printf("journal_tail\t\t%llu\n",
+ (unsigned long long)btrfs_super_journal_tail(sb));
printf("total_bytes\t\t%llu\n",
(unsigned long long)btrfs_super_total_bytes(sb));
printf("bytes_used\t\t%llu\n",
@@ -458,8 +458,10 @@ struct btrfs_super_block {
__le64 cache_generation;
__le64 uuid_tree_generation;
+ __le64 journal_tail;
+
/* future expansion */
- __le64 reserved[30];
+ __le64 reserved[29];
u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
} __attribute__ ((__packed__));
@@ -2143,6 +2145,8 @@ BTRFS_SETGET_STACK_FUNCS(super_log_root_transid, struct btrfs_super_block,
log_root_transid, 64);
BTRFS_SETGET_STACK_FUNCS(super_log_root_level, struct btrfs_super_block,
log_root_level, 8);
+BTRFS_SETGET_STACK_FUNCS(super_journal_tail, struct btrfs_super_block,
+ journal_tail, 64);
BTRFS_SETGET_STACK_FUNCS(super_total_bytes, struct btrfs_super_block,
total_bytes, 64);
BTRFS_SETGET_STACK_FUNCS(super_bytes_used, struct btrfs_super_block,
We've record journal_tail of raid5/6 log in super_block so that recovery of raid5/6 log can scan from this position. This teaches inspect-dump-super to acknowledge %journal_tail. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> --- cmds-inspect-dump-super.c | 2 ++ ctree.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)