X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/316670eb35587141e969394ae8537d66b9211e80..eee3565979933af707c711411001ba11fe406a3c:/bsd/nfs/nfsnode.h diff --git a/bsd/nfs/nfsnode.h b/bsd/nfs/nfsnode.h index adf50cc52..de4913f33 100644 --- a/bsd/nfs/nfsnode.h +++ b/bsd/nfs/nfsnode.h @@ -195,13 +195,11 @@ struct nfsbuf { LIST_HEAD(nfsbuflists, nfsbuf); TAILQ_HEAD(nfsbuffreehead, nfsbuf); -#define NFSNOLIST ((void*)0xdeadbeef) - -__private_extern__ lck_mtx_t *nfs_buf_mutex; -__private_extern__ int nfsbufcnt, nfsbufmin, nfsbufmax, nfsbufmetacnt, nfsbufmetamax; -__private_extern__ int nfsbuffreecnt, nfsbuffreemetacnt, nfsbufdelwricnt, nfsneedbuffer; -__private_extern__ int nfs_nbdwrite; -__private_extern__ struct nfsbuffreehead nfsbuffree, nfsbufdelwri; +extern lck_mtx_t *nfs_buf_mutex; +extern int nfsbufcnt, nfsbufmin, nfsbufmax, nfsbufmetacnt, nfsbufmetamax; +extern int nfsbuffreecnt, nfsbuffreemetacnt, nfsbufdelwricnt, nfsneedbuffer; +extern int nfs_nbdwrite; +extern struct nfsbuffreehead nfsbuffree, nfsbufdelwri; #ifdef NFSBUFDEBUG #define NFSBUFCNTCHK() \ @@ -348,6 +346,7 @@ struct nfs_vattr { #define NGA_UNCACHED 0x0002 /* fetch new attributes */ #define NGA_ACL 0x0004 /* fetch ACL */ #define NGA_MONITOR 0x0008 /* vnode monitor attr update poll */ +#define NGA_SOFT 0x0010 /* use cached attributes if ETIMEOUT */ /* macros for initting/cleaning up nfs_vattr structures */ #define NVATTR_INIT(NVAP) \ @@ -398,8 +397,8 @@ struct nfs_vattr { } while (0) -__private_extern__ lck_grp_t *nfs_open_grp; -__private_extern__ uint32_t nfs_open_owner_seqnum, nfs_lock_owner_seqnum; +extern lck_grp_t *nfs_open_grp; +extern uint32_t nfs_open_owner_seqnum, nfs_lock_owner_seqnum; /* * NFSv4 open owner structure - one per cred per mount @@ -583,6 +582,7 @@ struct nfsnode { int n_error; /* Save write error value */ union { struct timespec ns_atim; /* Special file times */ + struct timespec nl_rltim; /* Time of last readlink */ daddr64_t nf_lastread; /* last block# read from (for readahead) */ uint64_t nd_cookieverf; /* Cookie verifier (dir only) */ } n_un1; @@ -650,6 +650,7 @@ struct nfsnode { #define n_atim n_un1.ns_atim #define n_mtim n_un2.ns_mtim +#define n_rltim n_un1.nl_rltim #define n_lastread n_un1.nf_lastread #define n_lastrahead n_un2.nf_lastrahead #define n_sillyrename n_un3.nf_silly @@ -688,6 +689,8 @@ struct nfsnode { #define NISDOTZFS 0x04000 /* a ".zfs" directory */ #define NISDOTZFSCHILD 0x08000 /* a child of a ".zfs" directory */ #define NISMAPPED 0x10000 /* node is mmapped */ +#define NREFRESH 0x20000 /* node's fh needs to be refreshed */ +#define NREFRESHWANT 0x40000 /* Waiting for fh to be refreshed */ /* * Flags for n_hflag @@ -759,7 +762,7 @@ struct nfsnode { #define NFSTOV(np) ((np)->n_vnode) /* nfsnode hash table mutex */ -__private_extern__ lck_mtx_t *nfs_node_hash_mutex; +extern lck_mtx_t *nfs_node_hash_mutex; /* * printf-like helper macro that also outputs node name. @@ -780,9 +783,9 @@ struct nfsiod { }; TAILQ_HEAD(nfsiodlist, nfsiod); TAILQ_HEAD(nfsiodmountlist, nfsmount); -__private_extern__ struct nfsiodlist nfsiodfree, nfsiodwork; -__private_extern__ struct nfsiodmountlist nfsiodmounts; -__private_extern__ lck_mtx_t *nfsiod_mutex; +extern struct nfsiodlist nfsiodfree, nfsiodwork; +extern struct nfsiodmountlist nfsiodmounts; +extern lck_mtx_t *nfsiod_mutex; #if defined(KERNEL)