extern int afs_fid2();
-static int afsrwvp(register struct vcache *avc, register struct uio *uio,
+static int afsrwvp(struct vcache *avc, struct uio *uio,
enum uio_rw rw, int ioflag,
#ifdef AFS_SGI64_ENV
struct cred *cr, struct flid *flp);
static int acdrop = 0;
static int
-afsrwvp(register struct vcache *avc, register struct uio *uio, enum uio_rw rw,
+afsrwvp(struct vcache *avc, struct uio *uio, enum uio_rw rw,
int ioflag,
#ifdef AFS_SGI64_ENV
struct cred *cr, struct flid *flp)
struct cred *cr)
#endif
{
- register struct vnode *vp = AFSTOV(avc);
+ struct vnode *vp = AFSTOV(avc);
struct buf *bp;
daddr_t bn;
off_t acnt, cnt;
if (bp->b_flags & B_READ) {
uio->uio_fmode = FREAD;
- error = afs_read(vp, uio, cr, 0, 0, 0);
+ error = afs_read(vp, uio, cr, 0);
} else {
uio->uio_fmode = FWRITE;
error = afs_write(vp, uio, 0, cr, 0);
{
OSI_VC_CONVERT(avc);
struct vnode *vp = AFSTOV(avc);
- register struct brequest *tb;
+ struct brequest *tb;
struct vrequest treq;
afs_int32 code;
/* at least one daemon is idle, so ask it to do the store.
* Also, note that we don't lock it any more... */
tb = afs_BQueue(BOP_STORE, avc, 0, 1, acred,
- (afs_size_t) acred->cr_uid, 0L, (void *)0);
+ (afs_size_t) afs_cr_uid(acred), 0L, (void *)0,
+ (void *)0, (void *)0);
/* sleep waiting for the store to start, then retrieve error code */
while ((tb->flags & BUVALID) == 0) {
tb->flags |= BUWAIT;
afs_osi_Sleep(tb);
}
- code = tb->code;
afs_BRelease(tb);
}
} else {
#endif /* MP */
-#if defined(AFS_SGI62_ENV) && defined(AFS_SGI_DUAL_FS_CACHE)
-/* Support for EFS and XFS caches. The assumption here is that the size of
+/* Support for XFS caches. The assumption here is that the size of
* a cache file also does not exceed 32 bits.
*/
/* Initialized in osi_InitCacheFSType(). Used to determine inode type. */
-int afs_CacheFSType = -1;
-vnodeops_t *afs_efs_vnodeopsp;
vnodeops_t *afs_xfs_vnodeopsp;
-vnode_t *(*afs_IGetVnode) (ino_t);
-
-extern vnode_t *afs_EFSIGetVnode(ino_t); /* defined in osi_file.c */
-extern vnode_t *afs_XFSIGetVnode(ino_t); /* defined in osi_file.c */
extern afs_lock_t afs_xosi; /* lock is for tvattr */
-/* Initialize the cache operations. Called while initializing cache files. */
-void
-afs_InitDualFSCacheOps(struct vnode *vp)
-{
- static int inited = 0;
- struct vfssw *swp;
- int found = 0;
-
- if (inited)
- return;
- inited = 1;
-
- swp = vfs_getvfssw("xfs");
- if (swp) {
- afs_xfs_vnodeopsp = swp->vsw_vnodeops;
- if (!found) {
- if (vp && vp->v_op == afs_xfs_vnodeopsp) {
- afs_CacheFSType = AFS_SGI_XFS_CACHE;
- afs_IGetVnode = afs_XFSIGetVnode;
- found = 1;
- }
- }
- }
-
- if (vp && !found)
- osi_Panic("osi_InitCacheFSType: Can't find fstype for vnode 0x%llx\n",
- vp);
-}
-
ino_t
VnodeToIno(vnode_t * vp)
{
int code;
struct vattr vattr;
- MObtainWriteLock(&afs_xosi, 579);
+ ObtainWriteLock(&afs_xosi, 579);
vattr.va_mask = AT_FSID | AT_NODEID; /* quick return using this mask. */
AFS_GUNLOCK();
AFS_VOP_GETATTR(vp, &vattr, 0, OSI_GET_CURRENT_CRED(), code);
if (code) {
osi_Panic("VnodeToIno");
}
- MReleaseWriteLock(&afs_xosi);
+ ReleaseWriteLock(&afs_xosi);
return vattr.va_nodeid;
}
int code;
struct vattr vattr;
- MObtainWriteLock(&afs_xosi, 580);
+ ObtainWriteLock(&afs_xosi, 580);
vattr.va_mask = AT_FSID | AT_NODEID; /* quick return using this mask. */
AFS_GUNLOCK();
AFS_VOP_GETATTR(vp, &vattr, 0, OSI_GET_CURRENT_CRED(), code);
if (code) {
osi_Panic("VnodeToDev");
}
- MReleaseWriteLock(&afs_xosi);
+ ReleaseWriteLock(&afs_xosi);
return (dev_t) vattr.va_fsid;
}
int code;
struct vattr vattr;
- MObtainWriteLock(&afs_xosi, 581);
+ ObtainWriteLock(&afs_xosi, 581);
vattr.va_mask = AT_SIZE;
AFS_GUNLOCK();
AFS_VOP_GETATTR(vp, &vattr, 0, OSI_GET_CURRENT_CRED(), code);
if (code) {
osi_Panic("VnodeToSize");
}
- MReleaseWriteLock(&afs_xosi);
+ ReleaseWriteLock(&afs_xosi);
return vattr.va_size;
}
-#endif /* 6.2 and dual fs cache */
#endif /* AFS_SGI62_ENV */