#define BOP_FETCH 1 /* parm1 is chunk to get */
#define BOP_STORE 2 /* parm1 is chunk to store */
#define BOP_PATH 3 /* parm1 is path, parm2 is chunk to fetch */
-
-#if defined(AFS_CACHE_BYPASS)
#define BOP_FETCH_NOCACHE 4 /* parms are: vnode ptr, offset, segment ptr, addr, cred ptr */
-#endif
#ifdef AFS_DARWIN_ENV
#define BOP_MOVE 5 /* ptr1 afs_uspc_param ptr2 sname ptr3 dname */
#endif
/* state bits for volume */
#define VRO 1 /* volume is readonly */
#define VRecheck 2 /* recheck volume info with server */
-#define VBackup 4 /* is this a backup volume? */
-#define VForeign 8 /* this is a non-afs volume */
-#define VResort 16 /* server order was rearranged, sort when able */
-#define VMoreReps 32 /* This volume has more replicas than we are */
- /* keeping track of now -- check with VLDB */
-#define VPartVisible 64 /* Volume's partition is visible on the client */
+#define VBackup 4 /* is this a backup volume? */
+#define VForeign 8 /* this is a non-afs volume */
+#define VPartVisible 16 /* Volume's partition is visible on the client */
+#define VHardMount 32 /* we are hard-mount waiting for the vol */
enum repstate { not_busy, end_not_busy = 6, rd_busy, rdwr_busy, offline };
/*... to be continued ... */
-#if defined(AFS_CACHE_BYPASS)
/* vcache (file) cachingStates bits */
#define FCSDesireBypass 0x1 /* This file should bypass the cache */
#define FCSBypass 0x2 /* This file is currently NOT being cached */
* lock vcache (it's already locked) */
#define TRANSSetManualBit 0x4 /* The Transition routine should set FCSManuallySet so that
* filename checking does not override pioctl requests */
-#endif /* AFS_CACHE_BYPASS */
#define CPSIZE 2
#if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV)
short flockCount; /* count of flock readers, or -1 if writer */
char mvstat; /* 0->normal, 1->mt pt, 2->root. */
-#if defined(AFS_CACHE_BYPASS)
- char cachingStates; /* Caching policies for this file */
- afs_uint32 cachingTransitions; /* # of times file has flopped between caching and not */
+ char cachingStates; /* Caching policies for this file */
+ afs_uint32 cachingTransitions; /* # of times file has flopped between caching and not */
+
#if defined(AFS_LINUX24_ENV)
- off_t next_seq_offset; /* Next sequential offset (used by prefetch/readahead) */
-#else
- off_t next_seq_blk_offset; /* accounted in blocks for Solaris & IRIX */
-#endif
+ off_t next_seq_offset; /* Next sequential offset (used by prefetch/readahead) */
+#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI65_ENV)
+ off_t next_seq_blk_offset; /* accounted in blocks for Solaris & IRIX */
#endif
#if defined(AFS_SUN5_ENV)
extern int Afs_syscall(struct afssysa *uap, rval_t *rvp);
#endif /* AFS_SUN5_ENV */
+/*
+ * Various definitions for osi_sleep and its event hash table
+ * DFBSD and SUNOS have no osi_sleep, and HPUX has its own hack for this stuff
+ */
+#define AFS_EVHASHSIZE 128 /* size of afs_evhasht, must be power of 2 */
+
+typedef struct afs_event {
+ struct afs_event *next; /* next in hash chain */
+ char *event; /* lwp event: an address */
+ int refcount; /* Is it in use? */
+ int seq; /* Sequence number: this is incremented
+ * by wakeup calls; wait will not return until
+ * it changes */
+#if defined(AFS_AIX_ENV)
+ tid_t cond;
+#elif defined(AFS_DARWIN_ENV)
+# ifdef AFS_DARWIN80_ENV
+ lck_mtx_t *lck;
+ thread_t owner;
+# endif
+ /* no cond member */
+#elif defined(AFS_FBSD_ENV) || defined(AFS_OBSD_ENV)
+ int cond; /* "all this gluck should probably be replaced by CVs" */
+#elif defined(AFS_LINUX24_ENV)
+ wait_queue_head_t cond;
+#elif defined(AFS_NBSD_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+ kcondvar_t cond; /* Currently associated condition variable */
+#endif
+} afs_event_t;
+
+extern afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */
+
#endif /* _AFS_H_ */