*/
struct afs_cacheOps {
+#if defined(AFS_SUN57_64BIT_ENV) || defined(AFS_SGI62_ENV)
+ void *(*open)(ino_t ainode);
+#else
void *(*open)(afs_int32 ainode);
- int (*truncate)(struct osi_file *fp, int len);
- int (*fread)(struct osi_file *fp, int offset, char *buf, int len);
- int (*fwrite)(struct osi_file *fp, int offset, char *buf, int len);
+#endif
+ int (*truncate)(struct osi_file *fp, afs_int32 len);
+ int (*fread)(struct osi_file *fp, int offset, void *buf, afs_int32 len);
+ int (*fwrite)(struct osi_file *fp, afs_int32 offset, void *buf, afs_int32 len);
int (*close)(struct osi_file *fp);
int (*vread)(register struct vcache *avc, struct uio *auio,
struct AFS_UCRED *acred, daddr_t albn, struct buf **abpp, int noLock);
{
register afs_int32 i, preallocs;
register struct volume *tv;
- long code;
AFS_STATCNT(afs_CacheInit);
/*
{
int code;
struct osi_file *tfile;
- struct vnode *filevp;
AFS_STATCNT(afs_InitVolumeInfo);
code = LookupInodeByPath(afile, &volumeInode);
#if defined(AFS_DARWIN_ENV)
if (!VFS_STATFS(filevp->v_mount, &st, current_proc()))
#else
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
if (!VFS_STATFS(filevp->v_mount, &st, curproc))
#else
if (!VFS_STATFS(filevp->v_vfsp, &st))
*/
void shutdown_cache(void)
{
- register struct afs_cbr *tsp, *nsp;
- int i;
-
AFS_STATCNT(shutdown_cache);
afs_WriteThroughDSlots();
if (afs_cold_shutdown) {
struct server *ts, *nts;
struct conn *tc, *ntc;
register struct afs_cbr *tcbrp, *tbrp;
- struct afs_cbr **lcbrpp;
for (i=0; i < NSERVERS; i++) {
for (ts = afs_servers[i]; ts; ts = nts) {
AFS_GLOCK(); \
} while(0)
-#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE) \
do { \
int haveGlock = ISAFS_GLOCK(); \
CODE = copyout((SRC),(DST),(LEN)); \
} while(0)
-#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE) \
do { \
(UIO)->uio_rw = (RW); \
#ifdef AFS_SGI_ENV
code = HandleClientContext(&data, &com, &foreigncreds, OSI_GET_CURRENT_CRED());
#else
+#ifdef AFS_OBSD_ENV
+ code = HandleClientContext(&data, &com, &foreigncreds, osi_curcred());
+#else
code = HandleClientContext(&data, &com, &foreigncreds, u.u_cred);
#endif /* AFS_SGI_ENV */
#endif
#endif
#endif
+#endif
if (code) {
if (foreigncreds) {
crfree(foreigncreds);
tmpcred = OSI_GET_CURRENT_CRED();
OSI_SET_CURRENT_CRED(foreigncreds);
#else
+#ifdef AFS_OBSD_ENV
+ tmpcred = osi_curcred();
+ osi_curcred() = foreigncreds;
+#else
tmpcred = u.u_cred;
u.u_cred = foreigncreds;
#endif /* AFS_SGI64_ENV */
#endif /* AFS_HPUX101_ENV */
#endif
#endif
+#endif
}
#endif
if ((com & 0xff) == 15) {
#ifdef AFS_SGI_ENV
code = Prefetch(path, &data, follow, OSI_GET_CURRENT_CRED());
#else
+#ifdef AFS_OBSD_ENV
+ code = Prefetch(path, &data, follow, osi_curcred());
+#else
code = Prefetch(path, &data, follow, u.u_cred);
#endif /* AFS_SGI64_ENV */
#endif /* AFS_HPUX101_ENV */
#endif
+#endif
#if !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
if (foreigncreds) {
#ifdef AFS_AIX41_ENV
void afs_ServerDown(struct srvAddr *sa)
{
register struct server *aserver = sa->server;
- register struct srvAddr *sap;
AFS_STATCNT(ServerDown);
if (aserver->flags & SRVR_ISDOWN || sa->sa_flags & SRVADDR_ISDOWN)
afsi_SetServerIPRank(sa, ifa);
}
}
+#elif defined(AFS_OBSD_ENV)
+ {
+ extern struct in_ifaddrhead in_ifaddr;
+ struct in_ifaddr *ifa;
+ for (ifa = in_ifaddr.tqh_first; ifa; ifa = ifa->ia_list.tqe_next)
+ afsi_SetServerIPRank(sa, ifa);
+ }
#else
{
struct in_ifaddr *ifa;
afs_int32 addr_uniquifier)
{
struct server *oldts=0, *ts, *newts, *orphts=0;
- struct srvAddr *oldsa, *sa, *newsa, *nextsa, *orphsa;
+ struct srvAddr *oldsa, *newsa, *nextsa, *orphsa;
u_short fsport;
afs_int32 iphash, k, srvcount=0;
unsigned int srvhash;
#include <ufs/ffs/fs.h>
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
+#include <ufs/ufs/extattr.h>
#include <ufs/ufs/ufsmount.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/ioctl.h>
-#include <vm/vm_kern.h>
+#include <sys/timeout.h>
#include <rpc/rpc.h>
#else /* AFS_OBSD_ENV */
#ifdef AFS_LINUX22_ENV