Deleted Added
full compact
39c39
< * $FreeBSD: head/sys/gnu/fs/ext2fs/inode.h 83899 2001-09-24 18:29:20Z iedowse $
---
> * $FreeBSD: head/sys/gnu/fs/ext2fs/inode.h 96596 2002-05-14 17:14:01Z iedowse $
42,43c42,43
< #ifndef _UFS_UFS_INODE_H_
< #define _UFS_UFS_INODE_H_
---
> #ifndef _SYS_GNU_EXT2FS_INODE_H_
> #define _SYS_GNU_EXT2FS_INODE_H_
47d46
< #include <ufs/ufs/dinode.h>
49,52c48
< /*
< * The size of a logical block number.
< */
< typedef long ufs_lbn_t;
---
> #define ROOTINO ((ino_t)2)
53a50,52
> #define NDADDR 12 /* Direct addresses in inode. */
> #define NIADDR 3 /* Indirect addresses in inode. */
>
61,64c60,63
< * UFS filesystem. It is composed of two types of information. The first part
< * is the information that is needed only while the file is active (such as
< * the identity of the file and linkage to speed its lookup). The second part
< * is the permanent meta-data associated with the file which is read in
---
> * EXT2FS filesystem. It is composed of two types of information. The first
> * part is the information that is needed only while the file is active (such
> * as the identity of the file and linkage to speed its lookup). The second
> * part is the permanent meta-data associated with the file which is read in
70d68
< TAILQ_ENTRY(inode) i_nextsnap; /* snapshot file list */
76d73
< int i_effnlink; /* i_nlink when I/O completes */
78,84c75
< union { /* Associated filesystem. */
< struct fs *fs; /* FFS */
< struct ext2_sb_info *e2fs; /* EXT2FS */
< } inode_u;
< #define i_fs inode_u.fs
< #define i_e2fs inode_u.e2fs
< struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */
---
> struct ext2_sb_info *i_e2fs; /* EXT2FS */
96d86
< u_int32_t i_spare[3]; /* XXX actually non-spare (for ext2fs). */
98,102c88,110
< struct dirhash *i_dirhash; /* Hashing for large directories */
< /*
< * The on-disk dinode itself.
< */
< struct dinode i_din; /* 128 bytes of the on-disk dinode. */
---
> u_int32_t i_block_group;
> u_int32_t i_next_alloc_block;
> u_int32_t i_next_alloc_goal;
> u_int32_t i_prealloc_block;
> u_int32_t i_prealloc_count;
>
> /* Fields from struct dinode in UFS. */
> u_int16_t i_mode; /* IFMT, permissions; see below. */
> int16_t i_nlink; /* File link count. */
> u_int64_t i_size; /* File byte count. */
> int32_t i_atime; /* Last access time. */
> int32_t i_atimensec; /* Last access time. */
> int32_t i_mtime; /* Last modified time. */
> int32_t i_mtimensec; /* Last modified time. */
> int32_t i_ctime; /* Last inode change time. */
> int32_t i_ctimensec; /* Last inode change time. */
> daddr_t i_db[NDADDR]; /* Direct disk blocks. */
> daddr_t i_ib[NIADDR]; /* Indirect disk blocks. */
> u_int32_t i_flags; /* Status flags (chflags). */
> int32_t i_blocks; /* Blocks actually held. */
> int32_t i_gen; /* Generation number. */
> u_int32_t i_uid; /* File owner. */
> u_int32_t i_gid; /* File group. */
105,122c113,122
< #define i_atime i_din.di_atime
< #define i_atimensec i_din.di_atimensec
< #define i_blocks i_din.di_blocks
< #define i_ctime i_din.di_ctime
< #define i_ctimensec i_din.di_ctimensec
< #define i_db i_din.di_db
< #define i_flags i_din.di_flags
< #define i_gen i_din.di_gen
< #define i_gid i_din.di_gid
< #define i_ib i_din.di_ib
< #define i_mode i_din.di_mode
< #define i_mtime i_din.di_mtime
< #define i_mtimensec i_din.di_mtimensec
< #define i_nlink i_din.di_nlink
< #define i_rdev i_din.di_rdev
< #define i_shortlink i_din.di_shortlink
< #define i_size i_din.di_size
< #define i_uid i_din.di_uid
---
> /*
> * The di_db fields may be overlaid with other information for
> * file types that do not have associated disk storage. Block
> * and character devices overlay the first data block with their
> * dev_t value. Short symbolic links place their path in the
> * di_db area.
> */
> #define i_shortlink i_db
> #define i_rdev i_db[0]
> #define MAXSYMLINKLEN ((NDADDR + NIADDR) * sizeof(daddr_t))
123a124,142
> /* File permissions. */
> #define IEXEC 0000100 /* Executable. */
> #define IWRITE 0000200 /* Writeable. */
> #define IREAD 0000400 /* Readable. */
> #define ISVTX 0001000 /* Sticky bit. */
> #define ISGID 0002000 /* Set-gid. */
> #define ISUID 0004000 /* Set-uid. */
>
> /* File types. */
> #define IFMT 0170000 /* Mask of file type. */
> #define IFIFO 0010000 /* Named pipe (fifo). */
> #define IFCHR 0020000 /* Character device. */
> #define IFDIR 0040000 /* Directory file. */
> #define IFBLK 0060000 /* Block device. */
> #define IFREG 0100000 /* Regular file. */
> #define IFLNK 0120000 /* Symbolic link. */
> #define IFSOCK 0140000 /* UNIX domain socket. */
> #define IFWHT 0160000 /* Whiteout. */
>
140c159
< ufs_daddr_t in_lbn; /* Logical block number. */
---
> daddr_t in_lbn; /* Logical block number. */
149,152d167
< /* Determine if soft dependencies are being done */
< #define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP)
< #define DOINGASYNC(vp) ((vp)->v_mount->mnt_flag & MNT_ASYNC)
<
162c177
< #endif /* !_UFS_UFS_INODE_H_ */
---
> #endif /* !_SYS_GNU_EXT2FS_INODE_H_ */