Skip to contentSkip to conversation

xfsdocs: clarify log item header structure

PATCH New Darrick J. Wong 1 participant 1 message Nov 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsdocs: clarify log item header structure

From: Darrick J. Wong <[email protected]>

Make it more explicit that each log item has to start with a type code and size, except for transaction headers.

---
 .../journaling_log.asciidoc                        |   12 ++++++++++++
 1 file changed, 12 insertions(+)
design/XFS_Filesystem_Structure/journaling_log.asciidoc +12 -0
index 0aec036..6109458 100644
@@ -217,6 +217,18 @@ magic number to distinguish themselves.  Buffer data items only appear after
 | +XFS_LI_BUD+			| 0x1245        | xref:BUD_Log_Item[File Block Mapping Update Done]
 |=====
 
+Note that all log items (except for transaction headers) MUST start with
+the following header structure.  The type and size fields are baked into
+each log item header, but there is not a separately defined header.
+
+[source, c]
+----
+struct xfs_log_item {
+     __uint16_t                magic;
+     __uint16_t                size;
+};
+----
+
 [[Log_Transaction_Headers]]
 === Transaction Headers