logfs_abi.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. /*
  2. * fs/logfs/logfs_abi.h
  3. *
  4. * As should be obvious for Linux kernel code, license is GPLv2
  5. *
  6. * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org>
  7. *
  8. * Public header for logfs.
  9. */
  10. #ifndef FS_LOGFS_LOGFS_ABI_H
  11. #define FS_LOGFS_LOGFS_ABI_H
  12. /* For out-of-kernel compiles */
  13. #ifndef BUILD_BUG_ON
  14. #define BUILD_BUG_ON(condition) /**/
  15. #endif
  16. #define SIZE_CHECK(type, size) \
  17. static inline void check_##type(void) \
  18. { \
  19. BUILD_BUG_ON(sizeof(struct type) != (size)); \
  20. }
  21. /*
  22. * Throughout the logfs code, we're constantly dealing with blocks at
  23. * various positions or offsets. To remove confusion, we stricly
  24. * distinguish between a "position" - the logical position within a
  25. * file and an "offset" - the physical location within the device.
  26. *
  27. * Any usage of the term offset for a logical location or position for
  28. * a physical one is a bug and should get fixed.
  29. */
  30. /*
  31. * Block are allocated in one of several segments depending on their
  32. * level. The following levels are used:
  33. * 0 - regular data block
  34. * 1 - i1 indirect blocks
  35. * 2 - i2 indirect blocks
  36. * 3 - i3 indirect blocks
  37. * 4 - i4 indirect blocks
  38. * 5 - i5 indirect blocks
  39. * 6 - ifile data blocks
  40. * 7 - ifile i1 indirect blocks
  41. * 8 - ifile i2 indirect blocks
  42. * 9 - ifile i3 indirect blocks
  43. * 10 - ifile i4 indirect blocks
  44. * 11 - ifile i5 indirect blocks
  45. * Potential levels to be used in the future:
  46. * 12 - gc recycled blocks, long-lived data
  47. * 13 - replacement blocks, short-lived data
  48. *
  49. * Levels 1-11 are necessary for robust gc operations and help separate
  50. * short-lived metadata from longer-lived file data. In the future,
  51. * file data should get separated into several segments based on simple
  52. * heuristics. Old data recycled during gc operation is expected to be
  53. * long-lived. New data is of uncertain life expectancy. New data
  54. * used to replace older blocks in existing files is expected to be
  55. * short-lived.
  56. */
  57. /* Magic numbers. 64bit for superblock, 32bit for statfs f_type */
  58. #define LOGFS_MAGIC 0x7a3a8e5cb9d5bf67ull
  59. #define LOGFS_MAGIC_U32 0xc97e8168u
  60. /*
  61. * Various blocksize related macros. Blocksize is currently fixed at 4KiB.
  62. * Sooner or later that should become configurable and the macros replaced
  63. * by something superblock-dependent. Pointers in indirect blocks are and
  64. * will remain 64bit.
  65. *
  66. * LOGFS_BLOCKSIZE - self-explaining
  67. * LOGFS_BLOCK_FACTOR - number of pointers per indirect block
  68. * LOGFS_BLOCK_BITS - log2 of LOGFS_BLOCK_FACTOR, used for shifts
  69. */
  70. #define LOGFS_BLOCKSIZE (4096ull)
  71. #define LOGFS_BLOCK_FACTOR (LOGFS_BLOCKSIZE / sizeof(u64))
  72. #define LOGFS_BLOCK_BITS (9)
  73. /*
  74. * Number of blocks at various levels of indirection. There are 16 direct
  75. * block pointers plus a single indirect pointer.
  76. */
  77. #define I0_BLOCKS (16)
  78. #define I1_BLOCKS LOGFS_BLOCK_FACTOR
  79. #define I2_BLOCKS (LOGFS_BLOCK_FACTOR * I1_BLOCKS)
  80. #define I3_BLOCKS (LOGFS_BLOCK_FACTOR * I2_BLOCKS)
  81. #define I4_BLOCKS (LOGFS_BLOCK_FACTOR * I3_BLOCKS)
  82. #define I5_BLOCKS (LOGFS_BLOCK_FACTOR * I4_BLOCKS)
  83. #define INDIRECT_INDEX I0_BLOCKS
  84. #define LOGFS_EMBEDDED_FIELDS (I0_BLOCKS + 1)
  85. /*
  86. * Sizes at which files require another level of indirection. Files smaller
  87. * than LOGFS_EMBEDDED_SIZE can be completely stored in the inode itself,
  88. * similar like ext2 fast symlinks.
  89. *
  90. * Data at a position smaller than LOGFS_I0_SIZE is accessed through the
  91. * direct pointers, else through the 1x indirect pointer and so forth.
  92. */
  93. #define LOGFS_EMBEDDED_SIZE (LOGFS_EMBEDDED_FIELDS * sizeof(u64))
  94. #define LOGFS_I0_SIZE (I0_BLOCKS * LOGFS_BLOCKSIZE)
  95. #define LOGFS_I1_SIZE (I1_BLOCKS * LOGFS_BLOCKSIZE)
  96. #define LOGFS_I2_SIZE (I2_BLOCKS * LOGFS_BLOCKSIZE)
  97. #define LOGFS_I3_SIZE (I3_BLOCKS * LOGFS_BLOCKSIZE)
  98. #define LOGFS_I4_SIZE (I4_BLOCKS * LOGFS_BLOCKSIZE)
  99. #define LOGFS_I5_SIZE (I5_BLOCKS * LOGFS_BLOCKSIZE)
  100. /*
  101. * Each indirect block pointer must have this flag set, if all block pointers
  102. * behind it are set, i.e. there is no hole hidden in the shadow of this
  103. * indirect block pointer.
  104. */
  105. #define LOGFS_FULLY_POPULATED (1ULL << 63)
  106. #define pure_ofs(ofs) (ofs & ~LOGFS_FULLY_POPULATED)
  107. /*
  108. * LogFS needs to separate data into levels. Each level is defined as the
  109. * maximal possible distance from the master inode (inode of the inode file).
  110. * Data blocks reside on level 0, 1x indirect block on level 1, etc.
  111. * Inodes reside on level 6, indirect blocks for the inode file on levels 7-11.
  112. * This effort is necessary to guarantee garbage collection to always make
  113. * progress.
  114. *
  115. * LOGFS_MAX_INDIRECT is the maximal indirection through indirect blocks,
  116. * LOGFS_MAX_LEVELS is one more for the actual data level of a file. It is
  117. * the maximal number of levels for one file.
  118. * LOGFS_NO_AREAS is twice that, as the inode file and regular files are
  119. * effectively stacked on top of each other.
  120. */
  121. #define LOGFS_MAX_INDIRECT (5)
  122. #define LOGFS_MAX_LEVELS (LOGFS_MAX_INDIRECT + 1)
  123. #define LOGFS_NO_AREAS (2 * LOGFS_MAX_LEVELS)
  124. /* Maximum size of filenames */
  125. #define LOGFS_MAX_NAMELEN (255)
  126. /* Number of segments in the primary journal. */
  127. #define LOGFS_JOURNAL_SEGS (16)
  128. /* Maximum number of free/erased/etc. segments in journal entries */
  129. #define MAX_CACHED_SEGS (64)
  130. /*
  131. * LOGFS_OBJECT_HEADERSIZE is the size of a single header in the object store,
  132. * LOGFS_MAX_OBJECTSIZE the size of the largest possible object, including
  133. * its header,
  134. * LOGFS_SEGMENT_RESERVE is the amount of space reserved for each segment for
  135. * its segment header and the padded space at the end when no further objects
  136. * fit.
  137. */
  138. #define LOGFS_OBJECT_HEADERSIZE (0x1c)
  139. #define LOGFS_SEGMENT_HEADERSIZE (0x18)
  140. #define LOGFS_MAX_OBJECTSIZE (LOGFS_OBJECT_HEADERSIZE + LOGFS_BLOCKSIZE)
  141. #define LOGFS_SEGMENT_RESERVE \
  142. (LOGFS_SEGMENT_HEADERSIZE + LOGFS_MAX_OBJECTSIZE - 1)
  143. /*
  144. * Segment types:
  145. * SEG_SUPER - Data or indirect block
  146. * SEG_JOURNAL - Inode
  147. * SEG_OSTORE - Dentry
  148. */
  149. enum {
  150. SEG_SUPER = 0x01,
  151. SEG_JOURNAL = 0x02,
  152. SEG_OSTORE = 0x03,
  153. };
  154. /**
  155. * struct logfs_segment_header - per-segment header in the ostore
  156. *
  157. * @crc: crc32 of header (there is no data)
  158. * @pad: unused, must be 0
  159. * @type: segment type, see above
  160. * @level: GC level for all objects in this segment
  161. * @segno: segment number
  162. * @ec: erase count for this segment
  163. * @gec: global erase count at time of writing
  164. */
  165. struct logfs_segment_header {
  166. __be32 crc;
  167. __be16 pad;
  168. __u8 type;
  169. __u8 level;
  170. __be32 segno;
  171. __be32 ec;
  172. __be64 gec;
  173. };
  174. SIZE_CHECK(logfs_segment_header, LOGFS_SEGMENT_HEADERSIZE);
  175. #define LOGFS_FEATURES_INCOMPAT (0ull)
  176. #define LOGFS_FEATURES_RO_COMPAT (0ull)
  177. #define LOGFS_FEATURES_COMPAT (0ull)
  178. /**
  179. * struct logfs_disk_super - on-medium superblock
  180. *
  181. * @ds_magic: magic number, must equal LOGFS_MAGIC
  182. * @ds_crc: crc32 of structure starting with the next field
  183. * @ds_ifile_levels: maximum number of levels for ifile
  184. * @ds_iblock_levels: maximum number of levels for regular files
  185. * @ds_data_levels: number of separate levels for data
  186. * @pad0: reserved, must be 0
  187. * @ds_feature_incompat: incompatible filesystem features
  188. * @ds_feature_ro_compat: read-only compatible filesystem features
  189. * @ds_feature_compat: compatible filesystem features
  190. * @ds_flags: flags
  191. * @ds_segment_shift: log2 of segment size
  192. * @ds_block_shift: log2 of block size
  193. * @ds_write_shift: log2 of write size
  194. * @pad1: reserved, must be 0
  195. * @ds_journal_seg: segments used by primary journal
  196. * @ds_root_reserve: bytes reserved for the superuser
  197. * @ds_speed_reserve: bytes reserved to speed up GC
  198. * @ds_bad_seg_reserve: number of segments reserved to handle bad blocks
  199. * @pad2: reserved, must be 0
  200. * @pad3: reserved, must be 0
  201. *
  202. * Contains only read-only fields. Read-write fields like the amount of used
  203. * space is tracked in the dynamic superblock, which is stored in the journal.
  204. */
  205. struct logfs_disk_super {
  206. struct logfs_segment_header ds_sh;
  207. __be64 ds_magic;
  208. __be32 ds_crc;
  209. __u8 ds_ifile_levels;
  210. __u8 ds_iblock_levels;
  211. __u8 ds_data_levels;
  212. __u8 ds_segment_shift;
  213. __u8 ds_block_shift;
  214. __u8 ds_write_shift;
  215. __u8 pad0[6];
  216. __be64 ds_filesystem_size;
  217. __be32 ds_segment_size;
  218. __be32 ds_bad_seg_reserve;
  219. __be64 ds_feature_incompat;
  220. __be64 ds_feature_ro_compat;
  221. __be64 ds_feature_compat;
  222. __be64 ds_feature_flags;
  223. __be64 ds_root_reserve;
  224. __be64 ds_speed_reserve;
  225. __be32 ds_journal_seg[LOGFS_JOURNAL_SEGS];
  226. __be64 ds_super_ofs[2];
  227. __be64 pad3[8];
  228. };
  229. SIZE_CHECK(logfs_disk_super, 256);
  230. /*
  231. * Object types:
  232. * OBJ_BLOCK - Data or indirect block
  233. * OBJ_INODE - Inode
  234. * OBJ_DENTRY - Dentry
  235. */
  236. enum {
  237. OBJ_BLOCK = 0x04,
  238. OBJ_INODE = 0x05,
  239. OBJ_DENTRY = 0x06,
  240. };
  241. /**
  242. * struct logfs_object_header - per-object header in the ostore
  243. *
  244. * @crc: crc32 of header, excluding data_crc
  245. * @len: length of data
  246. * @type: object type, see above
  247. * @compr: compression type
  248. * @ino: inode number
  249. * @bix: block index
  250. * @data_crc: crc32 of payload
  251. */
  252. struct logfs_object_header {
  253. __be32 crc;
  254. __be16 len;
  255. __u8 type;
  256. __u8 compr;
  257. __be64 ino;
  258. __be64 bix;
  259. __be32 data_crc;
  260. } __attribute__((packed));
  261. SIZE_CHECK(logfs_object_header, LOGFS_OBJECT_HEADERSIZE);
  262. /*
  263. * Reserved inode numbers:
  264. * LOGFS_INO_MASTER - master inode (for inode file)
  265. * LOGFS_INO_ROOT - root directory
  266. * LOGFS_INO_SEGFILE - per-segment used bytes and erase count
  267. */
  268. enum {
  269. LOGFS_INO_MAPPING = 0x00,
  270. LOGFS_INO_MASTER = 0x01,
  271. LOGFS_INO_ROOT = 0x02,
  272. LOGFS_INO_SEGFILE = 0x03,
  273. LOGFS_RESERVED_INOS = 0x10,
  274. };
  275. /*
  276. * Inode flags. High bits should never be written to the medium. They are
  277. * reserved for in-memory usage.
  278. * Low bits should either remain in sync with the corresponding FS_*_FL or
  279. * reuse slots that obviously don't make sense for logfs.
  280. *
  281. * LOGFS_IF_DIRTY Inode must be written back
  282. * LOGFS_IF_ZOMBIE Inode has been deleted
  283. * LOGFS_IF_STILLBORN -ENOSPC happened when creating inode
  284. */
  285. #define LOGFS_IF_COMPRESSED 0x00000004 /* == FS_COMPR_FL */
  286. #define LOGFS_IF_DIRTY 0x20000000
  287. #define LOGFS_IF_ZOMBIE 0x40000000
  288. #define LOGFS_IF_STILLBORN 0x80000000
  289. /* Flags available to chattr */
  290. #define LOGFS_FL_USER_VISIBLE (LOGFS_IF_COMPRESSED)
  291. #define LOGFS_FL_USER_MODIFIABLE (LOGFS_IF_COMPRESSED)
  292. /* Flags inherited from parent directory on file/directory creation */
  293. #define LOGFS_FL_INHERITED (LOGFS_IF_COMPRESSED)
  294. /**
  295. * struct logfs_disk_inode - on-medium inode
  296. *
  297. * @di_mode: file mode
  298. * @di_pad: reserved, must be 0
  299. * @di_flags: inode flags, see above
  300. * @di_uid: user id
  301. * @di_gid: group id
  302. * @di_ctime: change time
  303. * @di_mtime: modify time
  304. * @di_refcount: reference count (aka nlink or link count)
  305. * @di_generation: inode generation, for nfs
  306. * @di_used_bytes: number of bytes used
  307. * @di_size: file size
  308. * @di_data: data pointers
  309. */
  310. struct logfs_disk_inode {
  311. __be16 di_mode;
  312. __u8 di_height;
  313. __u8 di_pad;
  314. __be32 di_flags;
  315. __be32 di_uid;
  316. __be32 di_gid;
  317. __be64 di_ctime;
  318. __be64 di_mtime;
  319. __be64 di_atime;
  320. __be32 di_refcount;
  321. __be32 di_generation;
  322. __be64 di_used_bytes;
  323. __be64 di_size;
  324. __be64 di_data[LOGFS_EMBEDDED_FIELDS];
  325. };
  326. SIZE_CHECK(logfs_disk_inode, 200);
  327. #define INODE_POINTER_OFS \
  328. (offsetof(struct logfs_disk_inode, di_data) / sizeof(__be64))
  329. #define INODE_USED_OFS \
  330. (offsetof(struct logfs_disk_inode, di_used_bytes) / sizeof(__be64))
  331. #define INODE_SIZE_OFS \
  332. (offsetof(struct logfs_disk_inode, di_size) / sizeof(__be64))
  333. #define INODE_HEIGHT_OFS (0)
  334. /**
  335. * struct logfs_disk_dentry - on-medium dentry structure
  336. *
  337. * @ino: inode number
  338. * @namelen: length of file name
  339. * @type: file type, identical to bits 12..15 of mode
  340. * @name: file name
  341. */
  342. /* FIXME: add 6 bytes of padding to remove the __packed */
  343. struct logfs_disk_dentry {
  344. __be64 ino;
  345. __be16 namelen;
  346. __u8 type;
  347. __u8 name[LOGFS_MAX_NAMELEN];
  348. } __attribute__((packed));
  349. SIZE_CHECK(logfs_disk_dentry, 266);
  350. #define RESERVED 0xffffffff
  351. #define BADSEG 0xffffffff
  352. /**
  353. * struct logfs_segment_entry - segment file entry
  354. *
  355. * @ec_level: erase count and level
  356. * @valid: number of valid bytes
  357. *
  358. * Segment file contains one entry for every segment. ec_level contains the
  359. * erasecount in the upper 28 bits and the level in the lower 4 bits. An
  360. * ec_level of BADSEG (-1) identifies bad segments. valid contains the number
  361. * of valid bytes or RESERVED (-1 again) if the segment is used for either the
  362. * superblock or the journal, or when the segment is bad.
  363. */
  364. struct logfs_segment_entry {
  365. __be32 ec_level;
  366. __be32 valid;
  367. };
  368. SIZE_CHECK(logfs_segment_entry, 8);
  369. /**
  370. * struct logfs_journal_header - header for journal entries (JEs)
  371. *
  372. * @h_crc: crc32 of journal entry
  373. * @h_len: length of compressed journal entry,
  374. * not including header
  375. * @h_datalen: length of uncompressed data
  376. * @h_type: JE type
  377. * @h_compr: compression type
  378. * @h_pad: reserved
  379. */
  380. struct logfs_journal_header {
  381. __be32 h_crc;
  382. __be16 h_len;
  383. __be16 h_datalen;
  384. __be16 h_type;
  385. __u8 h_compr;
  386. __u8 h_pad[5];
  387. };
  388. SIZE_CHECK(logfs_journal_header, 16);
  389. /*
  390. * Life expectency of data.
  391. * VIM_DEFAULT - default vim
  392. * VIM_SEGFILE - for segment file only - very short-living
  393. * VIM_GC - GC'd data - likely long-living
  394. */
  395. enum logfs_vim {
  396. VIM_DEFAULT = 0,
  397. VIM_SEGFILE = 1,
  398. };
  399. /**
  400. * struct logfs_je_area - wbuf header
  401. *
  402. * @segno: segment number of area
  403. * @used_bytes: number of bytes already used
  404. * @gc_level: GC level
  405. * @vim: life expectancy of data
  406. *
  407. * "Areas" are segments currently being used for writing. There is at least
  408. * one area per GC level. Several may be used to separate long-living from
  409. * short-living data. If an area with unknown vim is encountered, it can
  410. * simply be closed.
  411. * The write buffer immediately follow this header.
  412. */
  413. struct logfs_je_area {
  414. __be32 segno;
  415. __be32 used_bytes;
  416. __u8 gc_level;
  417. __u8 vim;
  418. } __attribute__((packed));
  419. SIZE_CHECK(logfs_je_area, 10);
  420. #define MAX_JOURNAL_HEADER \
  421. (sizeof(struct logfs_journal_header) + sizeof(struct logfs_je_area))
  422. /**
  423. * struct logfs_je_dynsb - dynamic superblock
  424. *
  425. * @ds_gec: global erase count
  426. * @ds_sweeper: current position of GC "sweeper"
  427. * @ds_rename_dir: source directory ino (see dir.c documentation)
  428. * @ds_rename_pos: position of source dd (see dir.c documentation)
  429. * @ds_victim_ino: victims of incomplete dir operation (see dir.c)
  430. * @ds_victim_ino: parent inode of victim (see dir.c)
  431. * @ds_used_bytes: number of used bytes
  432. */
  433. struct logfs_je_dynsb {
  434. __be64 ds_gec;
  435. __be64 ds_sweeper;
  436. __be64 ds_rename_dir;
  437. __be64 ds_rename_pos;
  438. __be64 ds_victim_ino;
  439. __be64 ds_victim_parent; /* XXX */
  440. __be64 ds_used_bytes;
  441. __be32 ds_generation;
  442. __be32 pad;
  443. };
  444. SIZE_CHECK(logfs_je_dynsb, 64);
  445. /**
  446. * struct logfs_je_anchor - anchor of filesystem tree, aka master inode
  447. *
  448. * @da_size: size of inode file
  449. * @da_last_ino: last created inode
  450. * @da_used_bytes: number of bytes used
  451. * @da_data: data pointers
  452. */
  453. struct logfs_je_anchor {
  454. __be64 da_size;
  455. __be64 da_last_ino;
  456. __be64 da_used_bytes;
  457. u8 da_height;
  458. u8 pad[7];
  459. __be64 da_data[LOGFS_EMBEDDED_FIELDS];
  460. };
  461. SIZE_CHECK(logfs_je_anchor, 168);
  462. /**
  463. * struct logfs_je_spillout - spillout entry (from 1st to 2nd journal)
  464. *
  465. * @so_segment: segments used for 2nd journal
  466. *
  467. * Length of the array is given by h_len field in the header.
  468. */
  469. struct logfs_je_spillout {
  470. __be64 so_segment[0];
  471. };
  472. SIZE_CHECK(logfs_je_spillout, 0);
  473. /**
  474. * struct logfs_je_journal_ec - erase counts for all journal segments
  475. *
  476. * @ec: erase count
  477. *
  478. * Length of the array is given by h_len field in the header.
  479. */
  480. struct logfs_je_journal_ec {
  481. __be32 ec[0];
  482. };
  483. SIZE_CHECK(logfs_je_journal_ec, 0);
  484. /**
  485. * struct logfs_je_free_segments - list of free segmetns with erase count
  486. */
  487. struct logfs_je_free_segments {
  488. __be32 segno;
  489. __be32 ec;
  490. };
  491. SIZE_CHECK(logfs_je_free_segments, 8);
  492. /**
  493. * struct logfs_seg_alias - list of segment aliases
  494. */
  495. struct logfs_seg_alias {
  496. __be32 old_segno;
  497. __be32 new_segno;
  498. };
  499. SIZE_CHECK(logfs_seg_alias, 8);
  500. /**
  501. * struct logfs_obj_alias - list of object aliases
  502. */
  503. struct logfs_obj_alias {
  504. __be64 ino;
  505. __be64 bix;
  506. __be64 val;
  507. u8 level;
  508. u8 pad[5];
  509. __be16 child_no;
  510. };
  511. SIZE_CHECK(logfs_obj_alias, 32);
  512. /**
  513. * Compression types.
  514. *
  515. * COMPR_NONE - uncompressed
  516. * COMPR_ZLIB - compressed with zlib
  517. */
  518. enum {
  519. COMPR_NONE = 0,
  520. COMPR_ZLIB = 1,
  521. };
  522. /*
  523. * Journal entries come in groups of 16. First group contains unique
  524. * entries, next groups contain one entry per level
  525. *
  526. * JE_FIRST - smallest possible journal entry number
  527. *
  528. * JEG_BASE - base group, containing unique entries
  529. * JE_COMMIT - commit entry, validates all previous entries
  530. * JE_DYNSB - dynamic superblock, anything that ought to be in the
  531. * superblock but cannot because it is read-write data
  532. * JE_ANCHOR - anchor aka master inode aka inode file's inode
  533. * JE_ERASECOUNT erasecounts for all journal segments
  534. * JE_SPILLOUT - unused
  535. * JE_SEG_ALIAS - aliases segments
  536. * JE_AREA - area description
  537. *
  538. * JE_LAST - largest possible journal entry number
  539. */
  540. enum {
  541. JE_FIRST = 0x01,
  542. JEG_BASE = 0x00,
  543. JE_COMMIT = 0x02,
  544. JE_DYNSB = 0x03,
  545. JE_ANCHOR = 0x04,
  546. JE_ERASECOUNT = 0x05,
  547. JE_SPILLOUT = 0x06,
  548. JE_OBJ_ALIAS = 0x0d,
  549. JE_AREA = 0x0e,
  550. JE_LAST = 0x0e,
  551. };
  552. #endif