1 /* SPDX-License-Identifier: GPL-2.0-only */ << 2 /* 1 /* 3 * Copyright (c) 2000-2001 Christoph Hellwig. 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 * 4 */ 29 */ 5 #ifndef _VXFS_OLT_H_ 30 #ifndef _VXFS_OLT_H_ 6 #define _VXFS_OLT_H_ 31 #define _VXFS_OLT_H_ 7 32 8 /* 33 /* 9 * Veritas filesystem driver - Object Location 34 * Veritas filesystem driver - Object Location Table data structures. 10 * 35 * 11 * This file contains definitions for the Obje 36 * This file contains definitions for the Object Location Table used 12 * by the Veritas Filesystem version 2 and new 37 * by the Veritas Filesystem version 2 and newer. 13 */ 38 */ 14 39 15 40 16 /* 41 /* 17 * OLT magic number (vxfs_olt->olt_magic). 42 * OLT magic number (vxfs_olt->olt_magic). 18 */ 43 */ 19 #define VXFS_OLT_MAGIC 0xa504FCF5 44 #define VXFS_OLT_MAGIC 0xa504FCF5 20 45 21 /* 46 /* 22 * VxFS OLT entry types. 47 * VxFS OLT entry types. 23 */ 48 */ 24 enum { 49 enum { 25 VXFS_OLT_FREE = 1, 50 VXFS_OLT_FREE = 1, 26 VXFS_OLT_FSHEAD = 2, 51 VXFS_OLT_FSHEAD = 2, 27 VXFS_OLT_CUT = 3, 52 VXFS_OLT_CUT = 3, 28 VXFS_OLT_ILIST = 4, 53 VXFS_OLT_ILIST = 4, 29 VXFS_OLT_DEV = 5, 54 VXFS_OLT_DEV = 5, 30 VXFS_OLT_SB = 6 55 VXFS_OLT_SB = 6 31 }; 56 }; 32 57 33 /* 58 /* 34 * VxFS OLT header. 59 * VxFS OLT header. 35 * 60 * 36 * The Object Location Table header is placed 61 * The Object Location Table header is placed at the beginning of each 37 * OLT extent. It is used to fing certain fil 62 * OLT extent. It is used to fing certain filesystem-wide metadata, e.g. 38 * the initial inode list, the fileset header 63 * the initial inode list, the fileset header or the device configuration. 39 */ 64 */ 40 struct vxfs_olt { 65 struct vxfs_olt { 41 __fs32 olt_magic; /* mag 66 __fs32 olt_magic; /* magic number */ 42 __fs32 olt_size; /* siz 67 __fs32 olt_size; /* size of this entry */ 43 __fs32 olt_checksum; /* che 68 __fs32 olt_checksum; /* checksum of extent */ 44 __u32 __unused1; /* ??? 69 __u32 __unused1; /* ??? */ 45 __fs32 olt_mtime; /* tim 70 __fs32 olt_mtime; /* time of last mod. (sec) */ 46 __fs32 olt_mutime; /* tim 71 __fs32 olt_mutime; /* time of last mod. (usec) */ 47 __fs32 olt_totfree; /* fre 72 __fs32 olt_totfree; /* free space in OLT extent */ 48 __fs32 olt_extents[2]; /* add 73 __fs32 olt_extents[2]; /* addr of this extent, replica */ 49 __fs32 olt_esize; /* siz 74 __fs32 olt_esize; /* size of this extent */ 50 __fs32 olt_next[2]; /* add 75 __fs32 olt_next[2]; /* addr of next extent, replica */ 51 __fs32 olt_nsize; /* siz 76 __fs32 olt_nsize; /* size of next extent */ 52 __u32 __unused2; /* ali 77 __u32 __unused2; /* align to 8 byte boundary */ 53 }; 78 }; 54 79 55 /* 80 /* 56 * VxFS common OLT entry (on disk). 81 * VxFS common OLT entry (on disk). 57 */ 82 */ 58 struct vxfs_oltcommon { 83 struct vxfs_oltcommon { 59 __fs32 olt_type; /* typ 84 __fs32 olt_type; /* type of this record */ 60 __fs32 olt_size; /* siz 85 __fs32 olt_size; /* size of this record */ 61 }; 86 }; 62 87 63 /* 88 /* 64 * VxFS free OLT entry (on disk). 89 * VxFS free OLT entry (on disk). 65 */ 90 */ 66 struct vxfs_oltfree { 91 struct vxfs_oltfree { 67 __fs32 olt_type; /* typ 92 __fs32 olt_type; /* type of this record */ 68 __fs32 olt_fsize; /* siz 93 __fs32 olt_fsize; /* size of this free record */ 69 }; 94 }; 70 95 71 /* 96 /* 72 * VxFS initial-inode list (on disk). 97 * VxFS initial-inode list (on disk). 73 */ 98 */ 74 struct vxfs_oltilist { 99 struct vxfs_oltilist { 75 __fs32 olt_type; /* type of thi 100 __fs32 olt_type; /* type of this record */ 76 __fs32 olt_size; /* size of thi 101 __fs32 olt_size; /* size of this record */ 77 __fs32 olt_iext[2]; /* ini 102 __fs32 olt_iext[2]; /* initial inode list, replica */ 78 }; 103 }; 79 104 80 /* 105 /* 81 * Current Usage Table 106 * Current Usage Table 82 */ 107 */ 83 struct vxfs_oltcut { 108 struct vxfs_oltcut { 84 __fs32 olt_type; /* typ 109 __fs32 olt_type; /* type of this record */ 85 __fs32 olt_size; /* siz 110 __fs32 olt_size; /* size of this record */ 86 __fs32 olt_cutino; /* ino 111 __fs32 olt_cutino; /* inode of current usage table */ 87 __u8 __pad; /* unu 112 __u8 __pad; /* unused, 8 byte align */ 88 }; 113 }; 89 114 90 /* 115 /* 91 * Inodes containing Superblock, Intent log an 116 * Inodes containing Superblock, Intent log and OLTs 92 */ 117 */ 93 struct vxfs_oltsb { 118 struct vxfs_oltsb { 94 __fs32 olt_type; /* typ 119 __fs32 olt_type; /* type of this record */ 95 __fs32 olt_size; /* siz 120 __fs32 olt_size; /* size of this record */ 96 __fs32 olt_sbino; /* ino 121 __fs32 olt_sbino; /* inode of superblock file */ 97 __u32 __unused1; /* ??? 122 __u32 __unused1; /* ??? */ 98 __fs32 olt_logino[2]; /* ino 123 __fs32 olt_logino[2]; /* inode of log file,replica */ 99 __fs32 olt_oltino[2]; /* ino 124 __fs32 olt_oltino[2]; /* inode of OLT, replica */ 100 }; 125 }; 101 126 102 /* 127 /* 103 * Inode containing device configuration + it' 128 * Inode containing device configuration + it's replica 104 */ 129 */ 105 struct vxfs_oltdev { 130 struct vxfs_oltdev { 106 __fs32 olt_type; /* typ 131 __fs32 olt_type; /* type of this record */ 107 __fs32 olt_size; /* siz 132 __fs32 olt_size; /* size of this record */ 108 __fs32 olt_devino[2]; /* ino 133 __fs32 olt_devino[2]; /* inode of device config files */ 109 }; 134 }; 110 135 111 /* 136 /* 112 * Fileset header 137 * Fileset header 113 */ 138 */ 114 struct vxfs_oltfshead { 139 struct vxfs_oltfshead { 115 __fs32 olt_type; /* typ 140 __fs32 olt_type; /* type number */ 116 __fs32 olt_size; /* siz 141 __fs32 olt_size; /* size of this record */ 117 __fs32 olt_fsino[2]; /* ino 142 __fs32 olt_fsino[2]; /* inodes of fileset header */ 118 }; 143 }; 119 144 120 #endif /* _VXFS_OLT_H_ */ 145 #endif /* _VXFS_OLT_H_ */ 121 146
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.