patch-2.1.32 linux/include/linux/nfs_fs_i.h

Next file: linux/include/linux/nfs_fs_sb.h
Previous file: linux/include/linux/nfs_fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.31/linux/include/linux/nfs_fs_i.h linux/include/linux/nfs_fs_i.h
@@ -8,35 +8,75 @@
  * nfs fs inode data in memory
  */
 struct nfs_inode_info {
-	struct pipe_inode_info pipeinfo;
-	struct nfs_fh fhandle;
+	/*
+	 * This is a place holder so named pipes on NFS filesystems
+	 * work (more or less correctly). This must be first in the
+	 * struct because the data is really accessed via inode->u.pipe_i.
+	 */
+	struct pipe_inode_info	pipeinfo;
+
+	/*
+	 * The file handle
+	 */
+	struct nfs_fh		fhandle;
+
+	/*
+	 * Various flags
+	 */
+	unsigned short		flags;
+
 	/*
 	 * read_cache_jiffies is when we started read-caching this inode,
 	 * and read_cache_mtime is the mtime of the inode at that time.
+	 * attrtimeo is for how long the cached information is assumed
+	 * to be valid. A successful attribute revalidation doubles
+	 * attrtimeo (up to acregmax/acdirmax), a failure resets it to
+	 * acregmin/acdirmin.
+	 *
+	 * We need to revalidate the cached attrs for this inode if
 	 *
-	 * We need to invalidate the cache for this inode if
+	 *	jiffies - read_cache_jiffies > attrtimeo
+	 *
+	 * and invalidate any cached data/flush out any dirty pages if
+	 * we find that
 	 *
-	 *	jiffies - read_cache_jiffies > 30*HZ
-	 * AND
 	 *	mtime != read_cache_mtime
 	 */
-	unsigned long read_cache_jiffies;
-	unsigned long read_cache_mtime;
+	unsigned long		read_cache_jiffies;
+	unsigned long		read_cache_mtime;
+	unsigned long		attrtimeo;
+
 	/*
 	 * This is to support the clandestine rename on unlink.
-	 * Instead of the directory inode, we might as well keep its
-	 * NFS FH, but that requires a kmalloc.
+	 * Instead of the directory inode, we might as well keep
+	 * its NFS FH, but that requires a kmalloc.
 	 */
-	struct inode *silly_rename_dir;
+	struct inode *		silly_inode;
+
 	/*
-	 * attrtimeo defines for how long the cached attributes are valid
+	 * This is the list of dirty unwritten pages.
+	 * NFSv3 will want to add a list for written but uncommitted
+	 * pages.
 	 */
-	unsigned long attrtimeo;
+	struct nfs_wreq *	writeback;
 };
 
+/*
+ * Legal inode flag values
+ */
+#define NFS_INO_REVALIDATE	0x0001		/* revalidating attrs */
+
+/*
+ * NFS lock info
+ */
 struct nfs_lock_info {
 	u32		state;
-	unsigned int	flags;
+	u32		flags;
 };
+
+/*
+ * Lock flag values
+ */
+#define NFS_LCK_GRANTED		0x0001		/* lock has been granted */
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov