|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1989 The Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * This code is derived from software contributed to Berkeley by ! 6: * Rick Macklem at The University of Guelph. ! 7: * ! 8: * Redistribution is only permitted until one year after the first shipment ! 9: * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and ! 10: * binary forms are permitted provided that: (1) source distributions retain ! 11: * this entire copyright notice and comment, and (2) distributions including ! 12: * binaries display the following acknowledgement: This product includes ! 13: * software developed by the University of California, Berkeley and its ! 14: * contributors'' in the documentation or other materials provided with the ! 15: * distribution and in all advertising materials mentioning features or use ! 16: * of this software. Neither the name of the University nor the names of ! 17: * its contributors may be used to endorse or promote products derived from ! 18: * this software without specific prior written permission. ! 19: * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 20: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 21: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 22: * ! 23: * @(#)nfsnode.h 7.11 (Berkeley) 6/28/90 ! 24: */ ! 25: ! 26: /* ! 27: * The nfsnode is the nfs equivalent to ufs's inode. Any similarity ! 28: * is purely coincidental. ! 29: * There is a unique nfsnode allocated for each active file, ! 30: * each current directory, each mounted-on file, text file, and the root. ! 31: * An nfsnode is 'named' by its file handle. (nget/nfs_node.c) ! 32: */ ! 33: ! 34: struct nfsnode { ! 35: struct nfsnode *n_chain[2]; /* must be first */ ! 36: nfsv2fh_t n_fh; /* NFS File Handle */ ! 37: long n_flag; /* Flag for locking.. */ ! 38: struct vnode *n_vnode; /* vnode associated with this nfsnode */ ! 39: time_t n_attrstamp; /* Time stamp (sec) for attributes */ ! 40: struct vattr n_vattr; /* Vnode attribute cache */ ! 41: struct sillyrename *n_sillyrename; /* Ptr to silly rename struct */ ! 42: u_long n_size; /* Current size of file */ ! 43: time_t n_mtime; /* Prev modify time to maintain data cache consistency*/ ! 44: time_t n_ctime; /* Prev create time for name cache consistency*/ ! 45: int n_error; /* Save write error value */ ! 46: pid_t n_lockholder; /* holder of nfsnode lock */ ! 47: pid_t n_lockwaiter; /* most recent waiter for nfsnode lock */ ! 48: u_long n_direofoffset; /* Dir. EOF offset cache */ ! 49: }; ! 50: ! 51: #define n_forw n_chain[0] ! 52: #define n_back n_chain[1] ! 53: ! 54: #ifdef KERNEL ! 55: /* ! 56: * Convert between nfsnode pointers and vnode pointers ! 57: */ ! 58: #define VTONFS(vp) ((struct nfsnode *)(vp)->v_data) ! 59: #define NFSTOV(np) ((struct vnode *)(np)->n_vnode) ! 60: #endif ! 61: /* ! 62: * Flags for n_flag ! 63: */ ! 64: #define NLOCKED 0x1 /* Lock the node for other local accesses */ ! 65: #define NWANT 0x2 /* Want above lock */ ! 66: #define NMODIFIED 0x4 /* Might have a modified buffer in bio */ ! 67: #define NWRITEERR 0x8 /* Flag write errors so close will know */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.