Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * ocfs1_fs_compat.h
0004  *
0005  * OCFS1 volume header definitions.  OCFS2 creates valid but unmountable
0006  * OCFS1 volume headers on the first two sectors of an OCFS2 volume.
0007  * This allows an OCFS1 volume to see the partition and cleanly fail to
0008  * mount it.
0009  *
0010  * Copyright (C) 2002, 2004 Oracle.  All rights reserved.
0011  */
0012 
0013 #ifndef _OCFS1_FS_COMPAT_H
0014 #define _OCFS1_FS_COMPAT_H
0015 
0016 #define OCFS1_MAX_VOL_SIGNATURE_LEN          128
0017 #define OCFS1_MAX_MOUNT_POINT_LEN            128
0018 #define OCFS1_MAX_VOL_ID_LENGTH               16
0019 #define OCFS1_MAX_VOL_LABEL_LEN               64
0020 #define OCFS1_MAX_CLUSTER_NAME_LEN            64
0021 
0022 #define OCFS1_MAJOR_VERSION              (2)
0023 #define OCFS1_MINOR_VERSION              (0)
0024 #define OCFS1_VOLUME_SIGNATURE       "OracleCFS"
0025 
0026 /*
0027  * OCFS1 superblock.  Lives at sector 0.
0028  */
0029 struct ocfs1_vol_disk_hdr
0030 {
0031 /*00*/  __u32 minor_version;
0032     __u32 major_version;
0033 /*08*/  __u8 signature[OCFS1_MAX_VOL_SIGNATURE_LEN];
0034 /*88*/  __u8 mount_point[OCFS1_MAX_MOUNT_POINT_LEN];
0035 /*108*/ __u64 serial_num;
0036 /*110*/ __u64 device_size;
0037     __u64 start_off;
0038 /*120*/ __u64 bitmap_off;
0039     __u64 publ_off;
0040 /*130*/ __u64 vote_off;
0041     __u64 root_bitmap_off;
0042 /*140*/ __u64 data_start_off;
0043     __u64 root_bitmap_size;
0044 /*150*/ __u64 root_off;
0045     __u64 root_size;
0046 /*160*/ __u64 cluster_size;
0047     __u64 num_nodes;
0048 /*170*/ __u64 num_clusters;
0049     __u64 dir_node_size;
0050 /*180*/ __u64 file_node_size;
0051     __u64 internal_off;
0052 /*190*/ __u64 node_cfg_off;
0053     __u64 node_cfg_size;
0054 /*1A0*/ __u64 new_cfg_off;
0055     __u32 prot_bits;
0056     __s32 excl_mount;
0057 /*1B0*/
0058 };
0059 
0060 
0061 struct ocfs1_disk_lock
0062 {
0063 /*00*/  __u32 curr_master;
0064     __u8 file_lock;
0065     __u8 compat_pad[3];  /* Not in original definition.  Used to
0066                 make the already existing alignment
0067                 explicit */
0068     __u64 last_write_time;
0069 /*10*/  __u64 last_read_time;
0070     __u32 writer_node_num;
0071     __u32 reader_node_num;
0072 /*20*/  __u64 oin_node_map;
0073     __u64 dlock_seq_num;
0074 /*30*/
0075 };
0076 
0077 /*
0078  * OCFS1 volume label.  Lives at sector 1.
0079  */
0080 struct ocfs1_vol_label
0081 {
0082 /*00*/  struct ocfs1_disk_lock disk_lock;
0083 /*30*/  __u8 label[OCFS1_MAX_VOL_LABEL_LEN];
0084 /*70*/  __u16 label_len;
0085 /*72*/  __u8 vol_id[OCFS1_MAX_VOL_ID_LENGTH];
0086 /*82*/  __u16 vol_id_len;
0087 /*84*/  __u8 cluster_name[OCFS1_MAX_CLUSTER_NAME_LEN];
0088 /*A4*/  __u16 cluster_name_len;
0089 /*A6*/
0090 };
0091 
0092 
0093 #endif /* _OCFS1_FS_COMPAT_H */
0094