ocfs1_fs_compat.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * ocfs1_fs_compat.h
  4. *
  5. * OCFS1 volume header definitions. OCFS2 creates valid but unmountable
  6. * OCFS1 volume headers on the first two sectors of an OCFS2 volume.
  7. * This allows an OCFS1 volume to see the partition and cleanly fail to
  8. * mount it.
  9. *
  10. * Copyright (C) 2002, 2004 Oracle. All rights reserved.
  11. */
  12. #ifndef _OCFS1_FS_COMPAT_H
  13. #define _OCFS1_FS_COMPAT_H
  14. #define OCFS1_MAX_VOL_SIGNATURE_LEN 128
  15. #define OCFS1_MAX_MOUNT_POINT_LEN 128
  16. #define OCFS1_MAX_VOL_ID_LENGTH 16
  17. #define OCFS1_MAX_VOL_LABEL_LEN 64
  18. #define OCFS1_MAX_CLUSTER_NAME_LEN 64
  19. #define OCFS1_MAJOR_VERSION (2)
  20. #define OCFS1_MINOR_VERSION (0)
  21. #define OCFS1_VOLUME_SIGNATURE "OracleCFS"
  22. /*
  23. * OCFS1 superblock. Lives at sector 0.
  24. */
  25. struct ocfs1_vol_disk_hdr
  26. {
  27. /*00*/ __u32 minor_version;
  28. __u32 major_version;
  29. /*08*/ __u8 signature[OCFS1_MAX_VOL_SIGNATURE_LEN];
  30. /*88*/ __u8 mount_point[OCFS1_MAX_MOUNT_POINT_LEN];
  31. /*108*/ __u64 serial_num;
  32. /*110*/ __u64 device_size;
  33. __u64 start_off;
  34. /*120*/ __u64 bitmap_off;
  35. __u64 publ_off;
  36. /*130*/ __u64 vote_off;
  37. __u64 root_bitmap_off;
  38. /*140*/ __u64 data_start_off;
  39. __u64 root_bitmap_size;
  40. /*150*/ __u64 root_off;
  41. __u64 root_size;
  42. /*160*/ __u64 cluster_size;
  43. __u64 num_nodes;
  44. /*170*/ __u64 num_clusters;
  45. __u64 dir_node_size;
  46. /*180*/ __u64 file_node_size;
  47. __u64 internal_off;
  48. /*190*/ __u64 node_cfg_off;
  49. __u64 node_cfg_size;
  50. /*1A0*/ __u64 new_cfg_off;
  51. __u32 prot_bits;
  52. __s32 excl_mount;
  53. /*1B0*/
  54. };
  55. struct ocfs1_disk_lock
  56. {
  57. /*00*/ __u32 curr_master;
  58. __u8 file_lock;
  59. __u8 compat_pad[3]; /* Not in original definition. Used to
  60. make the already existing alignment
  61. explicit */
  62. __u64 last_write_time;
  63. /*10*/ __u64 last_read_time;
  64. __u32 writer_node_num;
  65. __u32 reader_node_num;
  66. /*20*/ __u64 oin_node_map;
  67. __u64 dlock_seq_num;
  68. /*30*/
  69. };
  70. /*
  71. * OCFS1 volume label. Lives at sector 1.
  72. */
  73. struct ocfs1_vol_label
  74. {
  75. /*00*/ struct ocfs1_disk_lock disk_lock;
  76. /*30*/ __u8 label[OCFS1_MAX_VOL_LABEL_LEN];
  77. /*70*/ __u16 label_len;
  78. /*72*/ __u8 vol_id[OCFS1_MAX_VOL_ID_LENGTH];
  79. /*82*/ __u16 vol_id_len;
  80. /*84*/ __u8 cluster_name[OCFS1_MAX_CLUSTER_NAME_LEN];
  81. /*A4*/ __u16 cluster_name_len;
  82. /*A6*/
  83. };
  84. #endif /* _OCFS1_FS_COMPAT_H */