3
0

jfs_dat.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * jfs_dat.h --- stripped down header file which only contains the JFS
  3. * on-disk data structures
  4. */
  5. #define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
  6. /*
  7. * On-disk structures
  8. */
  9. /*
  10. * Descriptor block types:
  11. */
  12. #define JFS_DESCRIPTOR_BLOCK 1
  13. #define JFS_COMMIT_BLOCK 2
  14. #define JFS_SUPERBLOCK 3
  15. /*
  16. * Standard header for all descriptor blocks:
  17. */
  18. typedef struct journal_header_s
  19. {
  20. __u32 h_magic;
  21. __u32 h_blocktype;
  22. __u32 h_sequence;
  23. } journal_header_t;
  24. /*
  25. * The block tag: used to describe a single buffer in the journal
  26. */
  27. typedef struct journal_block_tag_s
  28. {
  29. __u32 t_blocknr; /* The on-disk block number */
  30. __u32 t_flags; /* See below */
  31. } journal_block_tag_t;
  32. /* Definitions for the journal tag flags word: */
  33. #define JFS_FLAG_ESCAPE 1 /* on-disk block is escaped */
  34. #define JFS_FLAG_SAME_UUID 2 /* block has same uuid as previous */
  35. #define JFS_FLAG_DELETED 4 /* block deleted by this transaction */
  36. #define JFS_FLAG_LAST_TAG 8 /* last tag in this descriptor block */
  37. /*
  38. * The journal superblock
  39. */
  40. typedef struct journal_superblock_s
  41. {
  42. journal_header_t s_header;
  43. /* Static information describing the journal */
  44. __u32 s_blocksize; /* journal device blocksize */
  45. __u32 s_maxlen; /* total blocks in journal file */
  46. __u32 s_first; /* first block of log information */
  47. /* Dynamic information describing the current state of the log */
  48. __u32 s_sequence; /* first commit ID expected in log */
  49. __u32 s_start; /* blocknr of start of log */
  50. } journal_superblock_t;