#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() \
} 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
struct nfs_sillyrename *nf_silly;/* Ptr to silly rename struct */
struct nfsdmap *nd_cookiecache; /* dir cookie cache */
} n_un3;
+ uint32_t n_flag; /* node flags */
u_short n_fhsize; /* size in bytes, of fh */
- u_short n_flag; /* node flags */
u_short n_hflag; /* node hash flags */
u_short n_bflag; /* node buffer flags */
u_short n_mflag; /* node mount flags */
/*
* Flags for n_flag
*/
-#define NUPDATESIZE 0x0001 /* size of file needs updating */
-#define NREVOKE 0x0002 /* node revoked */
-#define NMODIFIED 0x0004 /* Might have a modified buffer in bio */
-#define NWRITEERR 0x0008 /* Flag write errors so close will know */
-#define NNEEDINVALIDATE 0x0010 /* need to call vinvalbuf() */
-#define NGETATTRINPROG 0x0020 /* GETATTR RPC in progress */
-#define NGETATTRWANT 0x0040 /* waiting for GETATTR RPC */
-#define NACC 0x0100 /* Special file accessed */
-#define NUPD 0x0200 /* Special file updated */
-#define NCHG 0x0400 /* Special file times changed */
-#define NNEGNCENTRIES 0x0800 /* directory has negative name cache entries */
-#define NBUSY 0x1000 /* node is busy */
-#define NBUSYWANT 0x2000 /* waiting on busy node */
-#define NISDOTZFS 0x4000 /* a ".zfs" directory */
-#define NISDOTZFSCHILD 0x8000 /* a child of a ".zfs" directory */
-
+#define NUPDATESIZE 0x00001 /* size of file needs updating */
+#define NREVOKE 0x00002 /* node revoked */
+#define NMODIFIED 0x00004 /* Might have a modified buffer in bio */
+#define NWRITEERR 0x00008 /* Flag write errors so close will know */
+#define NNEEDINVALIDATE 0x00010 /* need to call vinvalbuf() */
+#define NGETATTRINPROG 0x00020 /* GETATTR RPC in progress */
+#define NGETATTRWANT 0x00040 /* waiting for GETATTR RPC */
+#define NACC 0x00100 /* Special file accessed */
+#define NUPD 0x00200 /* Special file updated */
+#define NCHG 0x00400 /* Special file times changed */
+#define NNEGNCENTRIES 0x00800 /* directory has negative name cache entries */
+#define NBUSY 0x01000 /* node is busy */
+#define NBUSYWANT 0x02000 /* waiting on busy node */
+#define NISDOTZFS 0x04000 /* a ".zfs" directory */
+#define NISDOTZFSCHILD 0x08000 /* a child of a ".zfs" directory */
+#define NISMAPPED 0x10000 /* node is mmapped */
/*
* Flags for n_hflag
#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.
};
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)
/* other stuff */
int nfs_removeit(struct nfs_sillyrename *);
int nfs_nget(mount_t,nfsnode_t,struct componentname *,u_char *,int,struct nfs_vattr *,u_int64_t *,uint32_t,int,nfsnode_t*);
+int nfs_mount_is_dirty(mount_t);
void nfs_dir_cookie_cache(nfsnode_t, uint64_t, uint64_t);
int nfs_dir_cookie_to_lbn(nfsnode_t, uint64_t, int *, uint64_t *);
void nfs_invaldir(nfsnode_t);