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....@oracle.com> --- cmds-inspect-dump-super.c | 2 ++ ctree.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c index 98e0270..baa4d1a 100644 --- a/cmds-inspect-dump-super.c +++ b/cmds-inspect-dump-super.c @@ -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", diff --git a/ctree.h b/ctree.h index 48ae890..d28d6f7 100644 --- a/ctree.h +++ b/ctree.h @@ -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, -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html