Loading...
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/*
9 * Veritas filesystem driver - Object Location Table data structures.
10 *
11 * This file contains definitions for the Object Location Table used
12 * by the Veritas Filesystem version 2 and newer.
13 */
14
15
16/*
17 * OLT magic number (vxfs_olt->olt_magic).
18 */
19#define VXFS_OLT_MAGIC 0xa504FCF5
20
21/*
22 * VxFS OLT entry types.
23 */
24enum {
25 VXFS_OLT_FREE = 1,
26 VXFS_OLT_FSHEAD = 2,
27 VXFS_OLT_CUT = 3,
28 VXFS_OLT_ILIST = 4,
29 VXFS_OLT_DEV = 5,
30 VXFS_OLT_SB = 6
31};
32
33/*
34 * VxFS OLT header.
35 *
36 * The Object Location Table header is placed at the beginning of each
37 * OLT extent. It is used to fing certain filesystem-wide metadata, e.g.
38 * the initial inode list, the fileset header or the device configuration.
39 */
40struct vxfs_olt {
41 __fs32 olt_magic; /* magic number */
42 __fs32 olt_size; /* size of this entry */
43 __fs32 olt_checksum; /* checksum of extent */
44 __u32 __unused1; /* ??? */
45 __fs32 olt_mtime; /* time of last mod. (sec) */
46 __fs32 olt_mutime; /* time of last mod. (usec) */
47 __fs32 olt_totfree; /* free space in OLT extent */
48 __fs32 olt_extents[2]; /* addr of this extent, replica */
49 __fs32 olt_esize; /* size of this extent */
50 __fs32 olt_next[2]; /* addr of next extent, replica */
51 __fs32 olt_nsize; /* size of next extent */
52 __u32 __unused2; /* align to 8 byte boundary */
53};
54
55/*
56 * VxFS common OLT entry (on disk).
57 */
58struct vxfs_oltcommon {
59 __fs32 olt_type; /* type of this record */
60 __fs32 olt_size; /* size of this record */
61};
62
63/*
64 * VxFS free OLT entry (on disk).
65 */
66struct vxfs_oltfree {
67 __fs32 olt_type; /* type of this record */
68 __fs32 olt_fsize; /* size of this free record */
69};
70
71/*
72 * VxFS initial-inode list (on disk).
73 */
74struct vxfs_oltilist {
75 __fs32 olt_type; /* type of this record */
76 __fs32 olt_size; /* size of this record */
77 __fs32 olt_iext[2]; /* initial inode list, replica */
78};
79
80/*
81 * Current Usage Table
82 */
83struct vxfs_oltcut {
84 __fs32 olt_type; /* type of this record */
85 __fs32 olt_size; /* size of this record */
86 __fs32 olt_cutino; /* inode of current usage table */
87 __u8 __pad; /* unused, 8 byte align */
88};
89
90/*
91 * Inodes containing Superblock, Intent log and OLTs
92 */
93struct vxfs_oltsb {
94 __fs32 olt_type; /* type of this record */
95 __fs32 olt_size; /* size of this record */
96 __fs32 olt_sbino; /* inode of superblock file */
97 __u32 __unused1; /* ??? */
98 __fs32 olt_logino[2]; /* inode of log file,replica */
99 __fs32 olt_oltino[2]; /* inode of OLT, replica */
100};
101
102/*
103 * Inode containing device configuration + it's replica
104 */
105struct vxfs_oltdev {
106 __fs32 olt_type; /* type of this record */
107 __fs32 olt_size; /* size of this record */
108 __fs32 olt_devino[2]; /* inode of device config files */
109};
110
111/*
112 * Fileset header
113 */
114struct vxfs_oltfshead {
115 __fs32 olt_type; /* type number */
116 __fs32 olt_size; /* size of this record */
117 __fs32 olt_fsino[2]; /* inodes of fileset header */
118};
119
120#endif /* _VXFS_OLT_H_ */
1/*
2 * Copyright (c) 2000-2001 Christoph Hellwig.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions, and the following disclaimer,
10 * without modification.
11 * 2. The name of the author may not be used to endorse or promote products
12 * derived from this software without specific prior written permission.
13 *
14 * Alternatively, this software may be distributed under the terms of the
15 * GNU General Public License ("GPL").
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 */
30#ifndef _VXFS_OLT_H_
31#define _VXFS_OLT_H_
32
33/*
34 * Veritas filesystem driver - Object Location Table data structures.
35 *
36 * This file contains definitions for the Object Location Table used
37 * by the Veritas Filesystem version 2 and newer.
38 */
39
40
41/*
42 * OLT magic number (vxfs_olt->olt_magic).
43 */
44#define VXFS_OLT_MAGIC 0xa504FCF5
45
46/*
47 * VxFS OLT entry types.
48 */
49enum {
50 VXFS_OLT_FREE = 1,
51 VXFS_OLT_FSHEAD = 2,
52 VXFS_OLT_CUT = 3,
53 VXFS_OLT_ILIST = 4,
54 VXFS_OLT_DEV = 5,
55 VXFS_OLT_SB = 6
56};
57
58/*
59 * VxFS OLT header.
60 *
61 * The Object Location Table header is placed at the beginning of each
62 * OLT extent. It is used to fing certain filesystem-wide metadata, e.g.
63 * the initial inode list, the fileset header or the device configuration.
64 */
65struct vxfs_olt {
66 u_int32_t olt_magic; /* magic number */
67 u_int32_t olt_size; /* size of this entry */
68 u_int32_t olt_checksum; /* checksum of extent */
69 u_int32_t __unused1; /* ??? */
70 u_int32_t olt_mtime; /* time of last mod. (sec) */
71 u_int32_t olt_mutime; /* time of last mod. (usec) */
72 u_int32_t olt_totfree; /* free space in OLT extent */
73 vx_daddr_t olt_extents[2]; /* addr of this extent, replica */
74 u_int32_t olt_esize; /* size of this extent */
75 vx_daddr_t olt_next[2]; /* addr of next extent, replica */
76 u_int32_t olt_nsize; /* size of next extent */
77 u_int32_t __unused2; /* align to 8 byte boundary */
78};
79
80/*
81 * VxFS common OLT entry (on disk).
82 */
83struct vxfs_oltcommon {
84 u_int32_t olt_type; /* type of this record */
85 u_int32_t olt_size; /* size of this record */
86};
87
88/*
89 * VxFS free OLT entry (on disk).
90 */
91struct vxfs_oltfree {
92 u_int32_t olt_type; /* type of this record */
93 u_int32_t olt_fsize; /* size of this free record */
94};
95
96/*
97 * VxFS initial-inode list (on disk).
98 */
99struct vxfs_oltilist {
100 u_int32_t olt_type; /* type of this record */
101 u_int32_t olt_size; /* size of this record */
102 vx_ino_t olt_iext[2]; /* initial inode list, replica */
103};
104
105/*
106 * Current Usage Table
107 */
108struct vxfs_oltcut {
109 u_int32_t olt_type; /* type of this record */
110 u_int32_t olt_size; /* size of this record */
111 vx_ino_t olt_cutino; /* inode of current usage table */
112 u_int32_t __pad; /* unused, 8 byte align */
113};
114
115/*
116 * Inodes containing Superblock, Intent log and OLTs
117 */
118struct vxfs_oltsb {
119 u_int32_t olt_type; /* type of this record */
120 u_int32_t olt_size; /* size of this record */
121 vx_ino_t olt_sbino; /* inode of superblock file */
122 u_int32_t __unused1; /* ??? */
123 vx_ino_t olt_logino[2]; /* inode of log file,replica */
124 vx_ino_t olt_oltino[2]; /* inode of OLT, replica */
125};
126
127/*
128 * Inode containing device configuration + it's replica
129 */
130struct vxfs_oltdev {
131 u_int32_t olt_type; /* type of this record */
132 u_int32_t olt_size; /* size of this record */
133 vx_ino_t olt_devino[2]; /* inode of device config files */
134};
135
136/*
137 * Fileset header
138 */
139struct vxfs_oltfshead {
140 u_int32_t olt_type; /* type number */
141 u_int32_t olt_size; /* size of this record */
142 vx_ino_t olt_fsino[2]; /* inodes of fileset header */
143};
144
145#endif /* _VXFS_OLT_H_ */