+#define VNOCS 0x2000000 /* is there no code signature available */
+#define VISDIRTY 0x4000000 /* vnode will need IO if reclaimed */
+#define VFASTDEVCANDIDATE 0x8000000 /* vnode is a candidate to store on a fast device */
+#define VAUTOCANDIDATE 0x10000000 /* vnode was automatically marked as a fast-dev candidate */
+/*
+ 0x20000000 not used
+ 0x40000000 not used
+ 0x80000000 not used.
+*/
+
+/*
+ * This structure describes vnode data which is specific to a file descriptor.
+ * It is currently used only for file descriptors which are for opened for
+ * directories.
+ */
+struct fd_vn_data {
+ lck_mtx_t fv_lock; /* Used to serialize directory enumeration on fd */
+ off_t fv_offset; /* Offset to be used */
+ void *fv_dircookie; /* If FS doesn't like offsets in directories */
+ caddr_t fv_buf; /* Temporary buffer to store directory entries */
+ size_t fv_bufsiz; /* Valid size of fv_buf */
+ size_t fv_bufdone; /* How much of fv_buf is processed */
+ size_t fv_bufallocsiz; /* Allocation size determined for Buffer*/
+ off_t fv_soff; /* Starting FS offset for this buffer */
+ off_t fv_eoff; /* Ending FS offset for this buffer */
+ int fv_eofflag;/* Does fv_eoff represent EOF ? */
+};
+
+/*
+ * FV_DIRBUF_START_SIZ is the initial size of the buffer passed to VNOP_READDIR.
+ * That may not be enough for some filesytems so the current algorithm works its
+ * way upto FV_DIRBUF_MAX_SIZ
+ */
+#define FV_DIRBUF_DIRENTRY_SIZ (sizeof(struct direntry))
+#define FV_DIRBUF_START_SIZ FV_DIRBUF_DIRENTRY_SIZ
+#define FV_DIRBUF_MAX_SIZ (4*(sizeof(struct direntry)))
+
+#define FV_LOCK(fvd) lck_mtx_lock(&(((struct fd_vn_data *)fvd)->fv_lock))
+#define FV_UNLOCK(fvd) lck_mtx_unlock(&(((struct fd_vn_data *)fvd)->fv_lock))