Deleted Added
full compact
inode.h (251809) inode.h (252103)
1/*-
2 * Copyright (c) 1982, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 18 unchanged lines hidden (view full) ---

27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)inode.h 8.9 (Berkeley) 5/14/95
1/*-
2 * Copyright (c) 1982, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 18 unchanged lines hidden (view full) ---

27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)inode.h 8.9 (Berkeley) 5/14/95
35 * $FreeBSD: head/sys/fs/ext2fs/inode.h 251809 2013-06-16 16:10:45Z pfg $
35 * $FreeBSD: head/sys/fs/ext2fs/inode.h 252103 2013-06-23 02:44:42Z pfg $
36 */
37
38#ifndef _FS_EXT2FS_INODE_H_
39#define _FS_EXT2FS_INODE_H_
40
41#include <sys/lock.h>
42#include <sys/queue.h>
43
44/*
45 * This must agree with the definition in <ufs/ufs/dir.h>.
46 */
47#define doff_t int32_t
48
49#define NDADDR 12 /* Direct addresses in inode. */
50#define NIADDR 3 /* Indirect addresses in inode. */
51
52/*
36 */
37
38#ifndef _FS_EXT2FS_INODE_H_
39#define _FS_EXT2FS_INODE_H_
40
41#include <sys/lock.h>
42#include <sys/queue.h>
43
44/*
45 * This must agree with the definition in <ufs/ufs/dir.h>.
46 */
47#define doff_t int32_t
48
49#define NDADDR 12 /* Direct addresses in inode. */
50#define NIADDR 3 /* Indirect addresses in inode. */
51
52/*
53 * The size of physical and logical block numbers and time fields in UFS.
54 */
55typedef int32_t e2fs_lbn_t;
56
57/*
53 * The inode is used to describe each active (or recently active) file in the
54 * EXT2FS filesystem. It is composed of two types of information. The first
55 * part is the information that is needed only while the file is active (such
56 * as the identity of the file and linkage to speed its lookup). The second
57 * part is the permanent meta-data associated with the file which is read in
58 * from the permanent dinode from long term storage when the file becomes
59 * active, and is put back when the file is no longer being used.
60 */

--- 82 unchanged lines hidden (view full) ---

143#define i_devvp i_ump->um_devvp
144
145#ifdef _KERNEL
146/*
147 * Structure used to pass around logical block paths generated by
148 * ext2_getlbns and used by truncate and bmap code.
149 */
150struct indir {
58 * The inode is used to describe each active (or recently active) file in the
59 * EXT2FS filesystem. It is composed of two types of information. The first
60 * part is the information that is needed only while the file is active (such
61 * as the identity of the file and linkage to speed its lookup). The second
62 * part is the permanent meta-data associated with the file which is read in
63 * from the permanent dinode from long term storage when the file becomes
64 * active, and is put back when the file is no longer being used.
65 */

--- 82 unchanged lines hidden (view full) ---

148#define i_devvp i_ump->um_devvp
149
150#ifdef _KERNEL
151/*
152 * Structure used to pass around logical block paths generated by
153 * ext2_getlbns and used by truncate and bmap code.
154 */
155struct indir {
151 int32_t in_lbn; /* Logical block number. */
156 e2fs_lbn_t in_lbn; /* Logical block number. */
152 int in_off; /* Offset in buffer. */
153};
154
155/* Convert between inode pointers and vnode pointers. */
156#define VTOI(vp) ((struct inode *)(vp)->v_data)
157#define ITOV(ip) ((ip)->i_vnode)
158
159/* This overlays the fid structure (see mount.h). */
160struct ufid {
161 uint16_t ufid_len; /* Length of structure. */
162 uint16_t ufid_pad; /* Force 32-bit alignment. */
163 ino_t ufid_ino; /* File number (ino). */
164 uint32_t ufid_gen; /* Generation number. */
165};
166#endif /* _KERNEL */
167
168#endif /* !_FS_EXT2FS_INODE_H_ */
157 int in_off; /* Offset in buffer. */
158};
159
160/* Convert between inode pointers and vnode pointers. */
161#define VTOI(vp) ((struct inode *)(vp)->v_data)
162#define ITOV(ip) ((ip)->i_vnode)
163
164/* This overlays the fid structure (see mount.h). */
165struct ufid {
166 uint16_t ufid_len; /* Length of structure. */
167 uint16_t ufid_pad; /* Force 32-bit alignment. */
168 ino_t ufid_ino; /* File number (ino). */
169 uint32_t ufid_gen; /* Generation number. */
170};
171#endif /* _KERNEL */
172
173#endif /* !_FS_EXT2FS_INODE_H_ */