libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
AaruRecoveryFooter Struct Reference

Recovery footer written at the very end of the file (last 160 bytes). More...

#include <aaruformat/structs/erasure.h>

Data Fields

uint64_t ecmbOffset
 Absolute file offset of the primary ECMB.
uint64_t ecmbLength
 Total on-disk size of the ECMB (header + payload).
uint64_t headerCrc64
 CRC64-ECMA of the original AaruHeaderV2 (128 bytes at offset 0).
AaruHeaderV2 backupHeader
 Complete copy of AaruHeaderV2 from file offset 0.
uint64_t footerMagic
 Must be AARU_RECOVERY_FOOTER_MAGIC (0x52464D4345525641).

Detailed Description

Recovery footer written at the very end of the file (last 160 bytes).

Enables locating the ECMB and recovering from a corrupted header or index. Found by reading the last 160 bytes of the file and checking footerMagic.

Recovery chain:

  • Normal: header -> indexOffset -> index -> ECMB (via ecmbOffset)
  • Header corrupt: footer backupHeader -> indexOffset -> index -> ECMB
  • Index corrupt: footer ecmbOffset -> ECMB -> index parity -> reconstruct
  • ECMB corrupt: duplicate ECMB at ecmbOffset + ecmbLength (aligned)

Definition at line 116 of file erasure.h.

Field Documentation

◆ backupHeader

AaruHeaderV2 AaruRecoveryFooter::backupHeader

Complete copy of AaruHeaderV2 from file offset 0.

Definition at line 121 of file erasure.h.

Referenced by aaruf_open(), and ec_finalize().

◆ ecmbLength

uint64_t AaruRecoveryFooter::ecmbLength

Total on-disk size of the ECMB (header + payload).

Definition at line 119 of file erasure.h.

Referenced by ec_finalize().

◆ ecmbOffset

uint64_t AaruRecoveryFooter::ecmbOffset

Absolute file offset of the primary ECMB.

Definition at line 118 of file erasure.h.

Referenced by ec_finalize(), and ec_load_ecmb().

◆ footerMagic

uint64_t AaruRecoveryFooter::footerMagic

Must be AARU_RECOVERY_FOOTER_MAGIC (0x52464D4345525641).

Definition at line 122 of file erasure.h.

Referenced by aaruf_open(), ec_finalize(), and ec_load_ecmb().

◆ headerCrc64

uint64_t AaruRecoveryFooter::headerCrc64

CRC64-ECMA of the original AaruHeaderV2 (128 bytes at offset 0).

Definition at line 120 of file erasure.h.

Referenced by aaruf_open(), and ec_finalize().


The documentation for this struct was generated from the following file: