4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
27 * Loop-back file information structure.
30 #ifndef _SYS_FS_LOFS_NODE_H
31 #define _SYS_FS_LOFS_NODE_H
33 #include <sys/fs/lofs_info.h>
40 * The lnode is the "inode" for loop-back files. It contains
41 * all the information necessary to handle loop-back file on the
44 typedef struct lnode
{
45 struct lnode
*lo_next
; /* link for hash chain */
46 struct vnode
*lo_vp
; /* pointer to real vnode */
47 uint_t lo_looping
; /* looping flags (see below) */
48 struct vnode
*lo_vnode
; /* place holder vnode for file */
52 * Flags used when looping has been detected.
54 #define LO_LOOPING 0x01 /* Looping detected */
55 #define LO_AUTOLOOP 0x02 /* Autonode looping detected */
58 * Flag passed to makelonode().
60 #define LOF_FORCE 0x1 /* Force creation of new lnode */
63 * Convert between vnode and lnode
65 #define ltov(lp) (((lp)->lo_vnode))
66 #define vtol(vp) ((struct lnode *)((vp)->v_data))
67 #define realvp(vp) (vtol(vp)->lo_vp)
70 extern vnode_t
*makelonode(vnode_t
*, struct loinfo
*, int);
71 extern void freelonode(lnode_t
*);
78 #endif /* _SYS_FS_LOFS_NODE_H */