vxfs_olt.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2000-2001 Christoph Hellwig.
  4. */
  5. #ifndef _VXFS_OLT_H_
  6. #define _VXFS_OLT_H_
  7. /*
  8. * Veritas filesystem driver - Object Location Table data structures.
  9. *
  10. * This file contains definitions for the Object Location Table used
  11. * by the Veritas Filesystem version 2 and newer.
  12. */
  13. /*
  14. * OLT magic number (vxfs_olt->olt_magic).
  15. */
  16. #define VXFS_OLT_MAGIC 0xa504FCF5
  17. /*
  18. * VxFS OLT entry types.
  19. */
  20. enum {
  21. VXFS_OLT_FREE = 1,
  22. VXFS_OLT_FSHEAD = 2,
  23. VXFS_OLT_CUT = 3,
  24. VXFS_OLT_ILIST = 4,
  25. VXFS_OLT_DEV = 5,
  26. VXFS_OLT_SB = 6
  27. };
  28. /*
  29. * VxFS OLT header.
  30. *
  31. * The Object Location Table header is placed at the beginning of each
  32. * OLT extent. It is used to fing certain filesystem-wide metadata, e.g.
  33. * the initial inode list, the fileset header or the device configuration.
  34. */
  35. struct vxfs_olt {
  36. __fs32 olt_magic; /* magic number */
  37. __fs32 olt_size; /* size of this entry */
  38. __fs32 olt_checksum; /* checksum of extent */
  39. __u32 __unused1; /* ??? */
  40. __fs32 olt_mtime; /* time of last mod. (sec) */
  41. __fs32 olt_mutime; /* time of last mod. (usec) */
  42. __fs32 olt_totfree; /* free space in OLT extent */
  43. __fs32 olt_extents[2]; /* addr of this extent, replica */
  44. __fs32 olt_esize; /* size of this extent */
  45. __fs32 olt_next[2]; /* addr of next extent, replica */
  46. __fs32 olt_nsize; /* size of next extent */
  47. __u32 __unused2; /* align to 8 byte boundary */
  48. };
  49. /*
  50. * VxFS common OLT entry (on disk).
  51. */
  52. struct vxfs_oltcommon {
  53. __fs32 olt_type; /* type of this record */
  54. __fs32 olt_size; /* size of this record */
  55. };
  56. /*
  57. * VxFS free OLT entry (on disk).
  58. */
  59. struct vxfs_oltfree {
  60. __fs32 olt_type; /* type of this record */
  61. __fs32 olt_fsize; /* size of this free record */
  62. };
  63. /*
  64. * VxFS initial-inode list (on disk).
  65. */
  66. struct vxfs_oltilist {
  67. __fs32 olt_type; /* type of this record */
  68. __fs32 olt_size; /* size of this record */
  69. __fs32 olt_iext[2]; /* initial inode list, replica */
  70. };
  71. /*
  72. * Current Usage Table
  73. */
  74. struct vxfs_oltcut {
  75. __fs32 olt_type; /* type of this record */
  76. __fs32 olt_size; /* size of this record */
  77. __fs32 olt_cutino; /* inode of current usage table */
  78. __u8 __pad; /* unused, 8 byte align */
  79. };
  80. /*
  81. * Inodes containing Superblock, Intent log and OLTs
  82. */
  83. struct vxfs_oltsb {
  84. __fs32 olt_type; /* type of this record */
  85. __fs32 olt_size; /* size of this record */
  86. __fs32 olt_sbino; /* inode of superblock file */
  87. __u32 __unused1; /* ??? */
  88. __fs32 olt_logino[2]; /* inode of log file,replica */
  89. __fs32 olt_oltino[2]; /* inode of OLT, replica */
  90. };
  91. /*
  92. * Inode containing device configuration + it's replica
  93. */
  94. struct vxfs_oltdev {
  95. __fs32 olt_type; /* type of this record */
  96. __fs32 olt_size; /* size of this record */
  97. __fs32 olt_devino[2]; /* inode of device config files */
  98. };
  99. /*
  100. * Fileset header
  101. */
  102. struct vxfs_oltfshead {
  103. __fs32 olt_type; /* type number */
  104. __fs32 olt_size; /* size of this record */
  105. __fs32 olt_fsino[2]; /* inodes of fileset header */
  106. };
  107. #endif /* _VXFS_OLT_H_ */