+/* Headers that go on items in local log segments and cloud log segments. */
+struct log_header {
+ uint32_t magic; // HEADER_MAGIC
+ uint8_t type; // Object type + '0'
+ uint32_t offset; // Starting byte offset of the log header
+ uint32_t size1; // Size of the data item (bytes)
+ uint32_t size2; //
+ uint32_t size3; //
+ uint64_t inum; // Inode which owns this data, if any
+ BlueSkyCloudID id; // Object identifier
+} __attribute__((packed));
+
+struct log_footer {
+ uint32_t magic; // FOOTER_MAGIC
+ uint32_t crc; // Computed from log_header to log_footer.magic
+} __attribute__((packed));
+
+struct cloudlog_header {
+ char magic[4];
+ uint8_t type;
+ BlueSkyCloudID id;
+ uint32_t size1, size2, size3;
+} __attribute__((packed));
+
+#define JOURNAL_MAGIC "\nLog"
+#define CLOUDLOG_MAGIC "AgI-"
+