+struct ocfs_volume_header {
+ unsigned char minor_version[4];
+ unsigned char major_version[4];
+ unsigned char signature[128];
+ char mount[128];
+ unsigned char mount_len[2];
+};
+
+struct ocfs_volume_label {
+ unsigned char disk_lock[48];
+ char label[64];
+ unsigned char label_len[2];
+ unsigned char vol_id[16];
+ unsigned char vol_id_len[2];
+};
+
+#define ocfsmajor(o) ((__u32)o.major_version[0] \
+ + (((__u32) o.major_version[1]) << 8) \
+ + (((__u32) o.major_version[2]) << 16) \
+ + (((__u32) o.major_version[3]) << 24))
+#define ocfslabellen(o) ((__u32)o.label_len[0] + (((__u32) o.label_len[1]) << 8))
+#define ocfsmountlen(o) ((__u32)o.mount_len[0] + (((__u32) o.mount_len[1])<<8))
+
+#define OCFS_MAGIC "OracleCFS"
+
+struct ocfs2_super_block {
+ unsigned char signature[8];
+ unsigned char s_dummy1[184];
+ unsigned char s_dummy2[80];
+ char s_label[64];
+ unsigned char s_uuid[16];
+};
+
+#define OCFS2_MIN_BLOCKSIZE 512
+#define OCFS2_MAX_BLOCKSIZE 4096
+
+#define OCFS2_SUPER_BLOCK_BLKNO 2
+
+#define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2"
+
+struct oracle_asm_disk_label {
+ char dummy[32];
+ char dl_tag[8];
+ char dl_id[24];
+};
+
+#define ORACLE_ASM_DISK_LABEL_MARKED "ORCLDISK"
+#define ORACLE_ASM_DISK_LABEL_OFFSET 32
+
+struct iso_volume_descriptor {
+ unsigned char vd_type;
+ unsigned char vd_id[5];
+ unsigned char vd_version;
+ unsigned char flags;
+ unsigned char system_id[32];
+ unsigned char volume_id[32];
+ unsigned char unused[8];
+ unsigned char space_size[8];
+ unsigned char escape_sequences[8];
+};
+
+/* Common gfs/gfs2 constants: */
+#define GFS_MAGIC 0x01161970
+#define GFS_DEFAULT_BSIZE 4096
+#define GFS_SUPERBLOCK_OFFSET (0x10 * GFS_DEFAULT_BSIZE)
+#define GFS_METATYPE_SB 1
+#define GFS_FORMAT_SB 100
+#define GFS_LOCKNAME_LEN 64
+
+/* gfs1 constants: */
+#define GFS_FORMAT_FS 1309
+#define GFS_FORMAT_MULTI 1401
+/* gfs2 constants: */
+#define GFS2_FORMAT_FS 1801
+#define GFS2_FORMAT_MULTI 1900
+
+struct gfs2_meta_header {
+ __u32 mh_magic;
+ __u32 mh_type;
+ __u64 __pad0; /* Was generation number in gfs1 */
+ __u32 mh_format;
+ __u32 __pad1; /* Was incarnation number in gfs1 */
+};
+
+struct gfs2_inum {
+ __u64 no_formal_ino;
+ __u64 no_addr;
+};
+
+struct gfs2_sb {
+ struct gfs2_meta_header sb_header;
+
+ __u32 sb_fs_format;
+ __u32 sb_multihost_format;
+ __u32 __pad0; /* Was superblock flags in gfs1 */
+
+ __u32 sb_bsize;
+ __u32 sb_bsize_shift;
+ __u32 __pad1; /* Was journal segment size in gfs1 */
+
+ struct gfs2_inum sb_master_dir; /* Was jindex dinode in gfs1 */
+ struct gfs2_inum __pad2; /* Was rindex dinode in gfs1 */
+ struct gfs2_inum sb_root_dir;
+
+ char sb_lockproto[GFS_LOCKNAME_LEN];
+ char sb_locktable[GFS_LOCKNAME_LEN];
+ /* In gfs1, quota and license dinodes followed */
+};
+
+struct ntfs_super_block {
+ __u8 jump[3];
+ __u8 oem_id[8];
+ __u8 bios_parameter_block[25];
+ __u16 unused[2];
+ __u64 number_of_sectors;
+ __u64 mft_cluster_location;
+ __u64 mft_mirror_cluster_location;
+ __s8 cluster_per_mft_record;
+ __u8 reserved1[3];
+ __s8 cluster_per_index_record;
+ __u8 reserved2[3];
+ __u64 volume_serial;
+ __u16 checksum;
+};
+
+struct master_file_table_record {
+ __u32 magic;
+ __u16 usa_ofs;
+ __u16 usa_count;
+ __u64 lsn;
+ __u16 sequence_number;
+ __u16 link_count;
+ __u16 attrs_offset;
+ __u16 flags;
+ __u32 bytes_in_use;
+ __u32 bytes_allocated;
+} __attribute__((__packed__));
+
+struct file_attribute {
+ __u32 type;
+ __u32 len;
+ __u8 non_resident;
+ __u8 name_len;
+ __u16 name_offset;
+ __u16 flags;
+ __u16 instance;
+ __u32 value_len;
+ __u16 value_offset;
+} __attribute__((__packed__));
+
+#define MFT_RECORD_VOLUME 3
+#define MFT_RECORD_ATTR_VOLUME_NAME 0x60
+#define MFT_RECORD_ATTR_VOLUME_INFO 0x70
+#define MFT_RECORD_ATTR_OBJECT_ID 0x40
+#define MFT_RECORD_ATTR_END 0xffffffffu
+
+/* HFS / HFS+ */
+struct hfs_finder_info {
+ __u32 boot_folder;
+ __u32 start_app;
+ __u32 open_folder;
+ __u32 os9_folder;
+ __u32 reserved;
+ __u32 osx_folder;
+ __u8 id[8];
+} __attribute__((packed));
+
+struct hfs_mdb {
+ __u8 signature[2];
+ __u32 cr_date;
+ __u32 ls_Mod;
+ __u16 atrb;
+ __u16 nm_fls;
+ __u16 vbm_st;
+ __u16 alloc_ptr;
+ __u16 nm_al_blks;
+ __u32 al_blk_size;
+ __u32 clp_size;
+ __u16 al_bl_st;
+ __u32 nxt_cnid;
+ __u16 free_bks;
+ __u8 label_len;
+ __u8 label[27];
+ __u32 vol_bkup;
+ __u16 vol_seq_num;
+ __u32 wr_cnt;
+ __u32 xt_clump_size;
+ __u32 ct_clump_size;
+ __u16 num_root_dirs;
+ __u32 file_count;
+ __u32 dir_count;
+ struct hfs_finder_info finder_info;
+ __u8 embed_sig[2];
+ __u16 embed_startblock;
+ __u16 embed_blockcount;
+} __attribute__((packed));
+
+/* this is lvm's label_header & pv_header combined. */
+
+#define LVM2_ID_LEN 32
+
+struct lvm2_pv_label_header {
+ /* label_header */
+ __u8 id[8]; /* LABELONE */
+ __u64 sector_xl; /* Sector number of this label */
+ __u32 crc_xl; /* From next field to end of sector */
+ __u32 offset_xl; /* Offset from start of struct to contents */
+ __u8 type[8]; /* LVM2 001 */
+ /* pv_header */
+ __u8 pv_uuid[LVM2_ID_LEN];
+} __attribute__ ((packed));
+