inode.h (32889) | inode.h (34266) |
---|---|
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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)inode.h 8.9 (Berkeley) 5/14/95 |
39 * $Id: inode.h,v 1.19 1997/12/05 13:43:47 jkh Exp $ | 39 * $Id: inode.h,v 1.20 1998/01/30 11:34:02 phk Exp $ |
40 */ 41 42#ifndef _UFS_UFS_INODE_H_ 43#define _UFS_UFS_INODE_H_ 44 45#include <sys/lock.h> 46#include <ufs/ufs/dinode.h> 47 48/* | 40 */ 41 42#ifndef _UFS_UFS_INODE_H_ 43#define _UFS_UFS_INODE_H_ 44 45#include <sys/lock.h> 46#include <ufs/ufs/dinode.h> 47 48/* |
49 * The size of a logical block number. 50 */ 51typedef long ufs_lbn_t; 52 53/* |
|
49 * This must agree with the definition in <ufs/ufs/dir.h>. 50 */ 51#define doff_t int32_t 52 53/* 54 * The inode is used to describe each active (or recently active) file in the 55 * UFS filesystem. It is composed of two types of information. The first part 56 * is the information that is needed only while the file is active (such as --- 5 unchanged lines hidden (view full) --- 62struct inode { 63 struct lock i_lock; /* Inode lock. >Keep this first< */ 64 LIST_ENTRY(inode) i_hash;/* Hash chain. */ 65 struct vnode *i_vnode;/* Vnode associated with this inode. */ 66 struct vnode *i_devvp;/* Vnode for block I/O. */ 67 u_int32_t i_flag; /* flags, see below */ 68 dev_t i_dev; /* Device associated with the inode. */ 69 ino_t i_number; /* The identity of the inode. */ | 54 * This must agree with the definition in <ufs/ufs/dir.h>. 55 */ 56#define doff_t int32_t 57 58/* 59 * The inode is used to describe each active (or recently active) file in the 60 * UFS filesystem. It is composed of two types of information. The first part 61 * is the information that is needed only while the file is active (such as --- 5 unchanged lines hidden (view full) --- 67struct inode { 68 struct lock i_lock; /* Inode lock. >Keep this first< */ 69 LIST_ENTRY(inode) i_hash;/* Hash chain. */ 70 struct vnode *i_vnode;/* Vnode associated with this inode. */ 71 struct vnode *i_devvp;/* Vnode for block I/O. */ 72 u_int32_t i_flag; /* flags, see below */ 73 dev_t i_dev; /* Device associated with the inode. */ 74 ino_t i_number; /* The identity of the inode. */ |
75 int i_effnlink; /* i_nlink when I/O completes */ |
|
70 71 union { /* Associated filesystem. */ 72 struct fs *fs; /* FFS */ 73 struct ext2_sb_info *e2fs; /* EXT2FS */ 74 } inode_u; 75#define i_fs inode_u.fs 76#define i_e2fs inode_u.e2fs 77 struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */ --- 77 unchanged lines hidden (view full) --- 155 (ip)->i_modrev++; \ 156 } \ 157 if ((ip)->i_flag & IN_CHANGE) \ 158 (ip)->i_ctime = tv_sec; \ 159 (ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); \ 160 } \ 161} 162 | 76 77 union { /* Associated filesystem. */ 78 struct fs *fs; /* FFS */ 79 struct ext2_sb_info *e2fs; /* EXT2FS */ 80 } inode_u; 81#define i_fs inode_u.fs 82#define i_e2fs inode_u.e2fs 83 struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */ --- 77 unchanged lines hidden (view full) --- 161 (ip)->i_modrev++; \ 162 } \ 163 if ((ip)->i_flag & IN_CHANGE) \ 164 (ip)->i_ctime = tv_sec; \ 165 (ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); \ 166 } \ 167} 168 |
169/* Determine if soft dependencies are being done */ 170#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP) 171 |
|
163/* This overlays the fid structure (see mount.h). */ 164struct ufid { 165 u_int16_t ufid_len; /* Length of structure. */ 166 u_int16_t ufid_pad; /* Force 32-bit alignment. */ 167 ino_t ufid_ino; /* File number (ino). */ 168 int32_t ufid_gen; /* Generation number. */ 169}; 170#endif /* KERNEL */ 171 172#endif /* !_UFS_UFS_INODE_H_ */ | 172/* This overlays the fid structure (see mount.h). */ 173struct ufid { 174 u_int16_t ufid_len; /* Length of structure. */ 175 u_int16_t ufid_pad; /* Force 32-bit alignment. */ 176 ino_t ufid_ino; /* File number (ino). */ 177 int32_t ufid_gen; /* Generation number. */ 178}; 179#endif /* KERNEL */ 180 181#endif /* !_UFS_UFS_INODE_H_ */ |