Deleted Added
sdiff udiff text old ( 251809 ) new ( 252103 )
full compact
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 $
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 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 {
151 int32_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_ */