#define PIGGYSIZE 1350 /* max piggyback size */
#define MAXVOLS 128 /* max vols we can store */
#define MAXSYSNAME 128 /* max sysname (i.e. @sys) size */
+#define MAXNUMSYSNAMES 16 /* max that current constants allow */
#define NOTOKTIMEOUT (2*3600) /* time after which to timeout conns sans tokens */
#define NOPAG 0xffffffff
#define AFS_NCBRS 300 /* max # of call back return entries */
#define AFS_RXDEADTIME 50
#define AFS_HARDDEADTIME 120
+struct sysname_info {
+ char *name;
+ short offset;
+ char index, allocked;
+};
/* flags to use with AFSOP_CACHEINIT */
#define AFSCALL_INIT_MEMCACHE 0x1 /* use a memory-based cache */
u_short vlport; /* volume server port */
short states; /* state flags */
short cellIndex; /* relative index number per cell */
+ time_t timeout; /* data expire time, if non-zero */
};
#define afs_PutCell(cellp, locktype)
#define VPageCleaning 0x2 /* Solaris - Cache Trunc Daemon sez keep out */
#define CPSIZE 2
+#if !defined(AFS_FBSD_ENV)
#define vrefCount v.v_count
+#else
+#define vrefCount v.v_usecount
+#endif /* AFS_FBSD_ENV */
#define AFS_MAXDV 0x7fffffff /* largest dataversion number */
#define AFS_NOTRUNC 0x7fffffff /* largest dataversion number */
* Do not try to get the vcache lock when the vlock is held */
afs_rwlock_t vlock;
#endif /* defined(AFS_SUN5_ENV) */
-#if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV)
+#if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_DARWIN_ENV)
#if defined(AFS_SUN5_ENV)
krwlock_t rwlock;
struct cred *credp;
#ifdef AFS_AIX_ENV
int ownslock; /* pid of owner of excl lock, else 0 - defect 3083 */
#endif
+#ifdef AFS_DARWIN_ENV
+ struct lock__bsd__ rwlock;
+#endif
afs_int32 parentVnode; /* Parent dir, if a file. */
afs_int32 parentUnique;
struct VenusFid *mvid; /* Either parent dir (if root) or root (if mt pt) */
*/
ino64_t inode; /* Unix inode for this chunk */
#else
+#if defined(AFS_LINUX_64BIT_KERNEL)
+ long inode; /* Unix inode for this chunk */
+#else
afs_int32 inode; /* Unix inode for this chunk */
#endif
+#endif
afs_int32 chunkBytes; /* Num bytes in this chunk */
char states; /* Has this chunk been modified? */
};
(((avc)->states & CStatd) ? (vcache2inode(avc), 0) : \
afs_VerifyVCache2((avc),areq))
#else
+#ifdef AFS_DARWIN_ENV
+#define afs_VerifyVCache(avc, areq) \
+ (((avc)->states & CStatd) ? (osi_VM_Setup(avc), 0) : \
+ afs_VerifyVCache2((avc),areq))
+#else
#define afs_VerifyVCache(avc, areq) \
(((avc)->states & CStatd) ? 0 : afs_VerifyVCache2((avc),areq))
#endif
+#endif
#define DO_STATS 1 /* bits used by FindVCache */
#define DO_VLRU 2
#define VN_UNLOCK(vp) simple_unlock(&(vp)->v_lock)
#endif
+/* get a file's serial number from a vnode */
+#ifndef afs_vnodeToInumber
+#if defined(AFS_SGI62_ENV) || defined(AFS_HAVE_VXFS) || defined(AFS_DARWIN_ENV)
+#define afs_vnodeToInumber(V) VnodeToIno(V)
+#else
+#ifdef AFS_DECOSF_ENV
+#define afs_vnodeToInumber(V) osi_vnodeToInumber(V)
+#else
+#define afs_vnodeToInumber(V) (VTOI(V)->i_number)
+#endif /* AFS_DECOSF_ENV */
+#endif /* AFS_SGI62_ENV */
+#endif
+
+/* get a file's device number from a vnode */
+#ifndef afs_vnodeToDev
+#if defined(AFS_SGI62_ENV) || defined(AFS_HAVE_VXFS) || defined(AFS_DARWIN_ENV)
+#define afs_vnodeToDev(V) VnodeToDev(V)
+#else
+#ifdef AFS_DECOSF_ENV
+#define afs_vnodeToDev(V) osi_vnodeToDev(V)
+#else
+#define afs_vnodeToDev(V) (VTOI(V)->i_dev)
+#endif /* AFS_DECOSF_ENV */
+#endif /* AFS_SGI62_ENV */
+#endif
+
#endif /* _AFS_H_ */