Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec
#define WAL_HDR_FL_CSUM 0x1 /* The tail csum entry is in current block */

struct wal_trans_head {
  uint32_t  wth_magic;
  uint16_t  wth_len;    /* Transaction data length within current block, in bytes */
  uint16_t  wth_flags;  /* Transaction header flags */
  uint64_t  wth_id;     /* Transaction ID */
};

enum wal_trans_op_type {
  /* Memory copy data to given VOSmeta blob offset */
  WAL_OP_MEMCPY = 0,
  /* Memory move data of given VOSmeta blob offset */
  WAL_OP_MEMMOVE,
  /* Zeoring data from given VOSmeta blob offset */
  WAL_OP_ZEROING,
  /* Checksum of given data on data blob */
  WAL_OP_CSUM,
  WAL_OP_MAX,
};

struct wal_trans_entry {
  uint64_t  wte_off;    /* Offset within VOSmeta or data blob, in bytes */
  uint32_t  wte_type;   /* Operation type */
  uint32_t  wte_len;    /* Data length in bytes */
  uint8_t   wte_data[0];
};

struct wal_trans_csum {
  uint32_t  wtc_len;    /* Checksum length in bytes */
  uint8_t   wtc_csum[0];
};

...