From 25de94a998da9a1044aa2ab382c9191335aeb1fc Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 31 Jul 2025 15:04:38 +0100 Subject: [PATCH] [Specification] Add index block continuation (`IDXC`) --- docs/spec/spec.adoc | 6 ++- docs/spec/structs/index_continuation.adoc | 45 +++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 docs/spec/structs/index_continuation.adoc diff --git a/docs/spec/spec.adoc b/docs/spec/spec.adoc index 2781066..aea6a48 100644 --- a/docs/spec/spec.adoc +++ b/docs/spec/spec.adoc @@ -38,4 +38,8 @@ include::structs/blocks.adoc[] <<< -include::structs/index2.adoc[] \ No newline at end of file +include::structs/index2.adoc[] + +<<< + +include::structs/index_continuation.adoc[] \ No newline at end of file diff --git a/docs/spec/structs/index_continuation.adoc b/docs/spec/structs/index_continuation.adoc new file mode 100644 index 0000000..823d9f3 --- /dev/null +++ b/docs/spec/structs/index_continuation.adoc @@ -0,0 +1,45 @@ +=== The index block continuation (`IDXC`) + +The index block continuation follows the same structure and semantics as the index block version 2, with the exception that it includes a pointer to the preceding index block or index block continuation. + +At most, a single index block continuation may appear within any index block structure. + +The purpose of this block is to enable incremental indexing prior to finalizing the image file. +This allows new blocks to be indexed as they are written, facilitating partial recovery in the event of application failure. + +The block is immediately followed by index entries formatted identically to those defined in index block version 2. + +==== Structure Definition + +[source,c] +/* Undefined */ + +==== Field Descriptions + +[cols="2,2,2,6",options="header"] +|=== +|Type +|Size +|Name +|Description + +|uint32 +|4 bytes +|identifier +|The index block identifier, always `IDXC` + +|uint64 +|8 bytes +|entries +|The number of entries following this header + +|uint64 +|8 bytes +|crc64 +|CRC64-ECMA checksum of the entries following this header + +|uint64 +|8 bytes +|previous +|Pointer in image file to previous index block +|=== \ No newline at end of file