Changeset View
Changeset View
Standalone View
Standalone View
fs/nfsclient/nfsnode.h
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
* each current directory, each mounted-on file, text file, and the root. | * each current directory, each mounted-on file, text file, and the root. | ||||
* An nfsnode is 'named' by its file handle. (nget/nfs_node.c) | * An nfsnode is 'named' by its file handle. (nget/nfs_node.c) | ||||
* If this structure exceeds 256 bytes (it is currently 256 using 4.4BSD-Lite | * If this structure exceeds 256 bytes (it is currently 256 using 4.4BSD-Lite | ||||
* type definitions), file handles of > 32 bytes should probably be split out | * type definitions), file handles of > 32 bytes should probably be split out | ||||
* into a separate malloc()'d data structure. (Reduce the size of nfsfh_t by | * into a separate malloc()'d data structure. (Reduce the size of nfsfh_t by | ||||
* changing the definition in nfsproto.h of NFS_SMALLFH.) | * changing the definition in nfsproto.h of NFS_SMALLFH.) | ||||
* NB: Hopefully the current order of the fields is such that everything will | * NB: Hopefully the current order of the fields is such that everything will | ||||
* be well aligned and, therefore, tightly packed. | * be well aligned and, therefore, tightly packed. | ||||
* n_mtx - is used to protect all fields except n_size. | |||||
* n_slock - is used to protect the n_size field. This is done so that | |||||
* functions such as vnode_pager_setsize() may be called with this lock. | |||||
*/ | */ | ||||
struct nfsnode { | struct nfsnode { | ||||
struct mtx n_mtx; /* Protects all of these members */ | struct mtx n_mtx; /* Protects all except n_size */ | ||||
struct sx n_slock; /* Protects n_size */ | |||||
struct lock n_excl; /* Exclusive helper for shared | struct lock n_excl; /* Exclusive helper for shared | ||||
vnode lock */ | vnode lock */ | ||||
u_quad_t n_size; /* Current size of file */ | u_quad_t n_size; /* Current size of file */ | ||||
u_quad_t n_brev; /* Modify rev when cached */ | u_quad_t n_brev; /* Modify rev when cached */ | ||||
u_quad_t n_lrev; /* Modify rev for lease */ | u_quad_t n_lrev; /* Modify rev for lease */ | ||||
struct nfsvattr n_vattr; /* Vnode attribute cache */ | struct nfsvattr n_vattr; /* Vnode attribute cache */ | ||||
time_t n_attrstamp; /* Attr. cache timestamp */ | time_t n_attrstamp; /* Attr. cache timestamp */ | ||||
struct nfs_accesscache n_accesscache[NFS_ACCESSCACHESIZE]; | struct nfs_accesscache n_accesscache[NFS_ACCESSCACHESIZE]; | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |