All pastes #928231 Raw Edit

pluknet

public c v1 · immutable
·published 2008-03-04 21:58 UTC
rendered paste body
--- /sys/ufs/ufs/inode.h	2008-01-16 01:37:55.000000000 +0300+++ /sys/fs/bsdext2fs/inode.h	2008-02-25 22:48:07.000000000 +0300@@ -32,12 +32,16 @@  * SUCH DAMAGE.  *  *	@(#)inode.h	8.9 (Berkeley) 5/14/95- * $FreeBSD: src/sys/ufs/ufs/inode.h,v 1.51 2006/10/10 09:20:54 kib Exp $+ *+ * From: src/sys/ufs/ufs/inode.h,v 1.51+ *+ * $FreeBSD$  */  #ifndef _UFS_UFS_INODE_H_ #define	_UFS_UFS_INODE_H_ +#include <sys/file.h> #include <sys/lock.h> #include <sys/queue.h> #include <ufs/ufs/dinode.h>@@ -48,6 +52,14 @@ #define	doff_t		int32_t  /*+ * Per-filesystem inode extensions.+ */+struct ext2fs_inode_ext {+	daddr_t ext2fs_last_lblk;	/* last logical block allocated */+	daddr_t ext2fs_last_blk;	/* last block allocated on disk */+};++/*  * The inode is used to describe each active (or recently active) file in the  * 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@@ -72,7 +84,13 @@ 	ino_t	  i_number;	/* The identity of the inode. */ 	int	  i_effnlink;	/* i_nlink when I/O completes */ -	struct	 fs *i_fs;	/* Associated filesystem superblock. */+	union {+		struct fs *fs;	/* FFS */+		struct m_ext2fs *e2fs;	/* EXT2FS */+	} inode_u;+#define	i_fs	inode_u.fs+#define i_e2fs	inode_u.e2fs+ 	struct	 dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */ 	u_quad_t i_modrev;	/* Revision level for NFS lease. */ 	struct	 lockf *i_lockf;/* Head of byte-level lock list. */@@ -89,7 +107,10 @@ 	union { 		struct dirhash *dirhash; /* Hashing for large directories. */ 		daddr_t *snapblklist;    /* Collect expunged snapshot blocks. */+		struct ext2fs_inode_ext e2fs; 	} i_un;+#define	i_e2fs_last_lblk	i_un.e2fs.ext2fs_last_lblk+#define	i_e2fs_last_blk		i_un.e2fs.ext2fs_last_blk  	/* 	 * Data for extended attribute modification.@@ -114,7 +135,40 @@ 	union { 		struct ufs1_dinode *din1;	/* UFS1 on-disk dinode. */ 		struct ufs2_dinode *din2;	/* UFS2 on-disk dinode. */+		struct ext2fs_dinode *e2fs_din; /* 128 bytes of the on-disk+								dinode. */ 	} dinode_u;+        /* misc data field for different tn_type node */+        union {+                /* Valid when tn_type == VBLK || tn_type == VCHR. */+                dev_t                   tn_rdev;++                /* Valid when tn_type == VLNK. */+                /* The link's target, allocated from a string pool. */+                char *                  tn_link;++                /* Valid when tn_type == VREG. */+                struct tn_reg {+                        /* The contents of regular files stored in a tmpfs+                         * file system are represented by a single anonymous+                         * memory object (aobj, for short).  The aobj provides+                         * direct access to any position within the file,+                         * because its contents are always mapped in a   +                         * contiguous region of virtual memory.  It is a task+                         * of the memory management subsystem (see uvm(9)) to+                         * issue the required page ins or page outs whenever +                         * a position within the file is accessed. */+                        vm_object_t             tn_aobj;+                        size_t                  tn_aobj_pages;++                }tn_reg;++                /* Valid when tn_type = VFIFO */+                struct tn_fifo {+                        fo_rdwr_t               *tn_fo_read;+                        fo_rdwr_t               *tn_fo_write;+                }tn_fifo;+        }tn_spec; }; /*  * These flags are kept in i_flag.@@ -135,6 +189,7 @@ #define i_snapblklist i_un.snapblklist #define i_din1 dinode_u.din1 #define i_din2 dinode_u.din2+#define i_e2di dinode_u.e2fs_din  #ifdef _KERNEL /*