afile->size = VTOI(afile->vnode)->i_size;
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
afile->vnode = vp;
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
#ifndef AFS_CACHE_VNODE_PATH
afile->size = va.va_size;
#else
afile->size = VTOI(vp)->i_size;
afile->offset = 0;
afile->proc = NULL;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
afile->size = VTOI(afile->vnode)->i_size;
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
afile->size = VnodeToSize(afile->vnode);
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
#endif
struct file *
-afs_linux_raw_open(afs_dcache_id_t *ainode, ino_t *hint)
+afs_linux_raw_open(afs_dcache_id_t *ainode)
{
struct inode *tip = NULL;
struct dentry *dp = NULL;
#else
osi_Panic("Can't open inode %d\n", (int) ainode->ufs);
#endif
- if (hint)
- *hint = tip->i_ino;
return filp;
}
}
memset(afile, 0, sizeof(struct osi_file));
- afile->filp = afs_linux_raw_open(ainode, &afile->inum);
+ afile->filp = afs_linux_raw_open(ainode);
afile->size = i_size_read(FILE_INODE(afile->filp));
AFS_GLOCK();
afile->offset = 0;
#if defined(AFS_LINUX26_ENV)
struct file *
-afs_linux_raw_open(afs_dcache_id_t *ainode, ino_t *hint)
+afs_linux_raw_open(afs_dcache_id_t *ainode)
{
struct inode *tip = NULL;
struct dentry *dp = NULL;
#else
osi_Panic("Can't open inode %d\n", (int) ainode->ufs);
#endif
- if (hint)
- *hint = tip->i_ino;
return filp;
}
}
memset(afile, 0, sizeof(struct osi_file));
- afile->filp = afs_linux_raw_open(ainode, &afile->inum);
+ afile->filp = afs_linux_raw_open(ainode);
afile->size = i_size_read(FILE_INODE(afile->filp));
AFS_GLOCK();
afile->offset = 0;
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
#endif
afile->size = VTOI(afile->vnode)->i_size;
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
#endif
afile->offset = 0;
afile->proc = NULL;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
afile->size = VnodeToSize(afile->vnode);
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
#endif /* AFS_HAVE_VXFS */
#endif
afile->offset = 0;
afile->proc = (int (*)())0;
- afile->inum = ainode->ufs; /* for hint validity checking */
return (void *)afile;
}
}
fp->size = st.st_size;
fp->offset = 0;
- fp->inum = ino->ufs;
fp->vnode = (struct usr_vnode *)fp;
AFS_GLOCK();
extern char afs_zeros[AFS_ZEROS];
-afs_int32 maxIHint;
-afs_int32 nihints; /* # of above actually in-use */
-afs_int32 usedihint;
-
-
/* Imported variables */
extern afs_rwlock_t afs_xdcache;
extern unsigned char *afs_indexFlags;
}
} else {
/* get the data from the file */
-#ifdef IHINT
- if (tfile = tdc->ihint) {
- if (tdc->f.inode != tfile->inum) {
- afs_warn("afs_UFSRead: %x hint mismatch tdc %d inum %d\n",
- tdc, tdc->f.inode, tfile->inum);
- osi_UFSClose(tfile);
- tdc->ihint = tfile = 0;
- nihints--;
- }
- }
- if (tfile != 0) {
- usedihint++;
- } else
-#endif /* IHINT */
tfile = (struct osi_file *)osi_UFSOpen(&tdc->f.inode);
#ifdef AFS_DARWIN80_ENV
trimlen = len;
#else
code = VOP_RDWR(tfile->vnode, &tuio, UIO_READ, 0, afs_osi_credp);
#endif
-
-#ifdef IHINT
- if (!tdc->ihint && nihints < maxIHint) {
- tdc->ihint = tfile;
- nihints++;
- } else
-#endif /* IHINT */
- osi_UFSClose(tfile);
+ osi_UFSClose(tfile);
if (code) {
error = code;
return 0;
afs_cacheinit_flag = 1;
cacheInfoModTime = 0;
- maxIHint = ninodes;
- nihints = 0;
- usedihint = 0;
LOCK_INIT(&afs_ftf, "afs_ftf");
AFS_RWLOCK_INIT(&afs_xaxs, "afs_xaxs");
afs_cacheStats = 0;
afs_cacheFiles = afs_cacheBlocks = 0;
- pag_epoch = maxIHint = nihints = usedihint = 0;
+ pag_epoch = 0;
pagCounter = 0;
#if defined(AFS_XBSD_ENV)
vrele(volumeVnode); /* let it go, finally. */
#endif
int (*proc) (struct osi_file * afile, afs_int32 code); /* proc, which, if not null, is called on writes */
char *rock; /* rock passed to proc */
- ino_t inum; /* guarantee validity of hint */
#if defined(UKERNEL)
int fd; /* file descriptor for user space files */
#endif /* defined(UKERNEL) */
/* VNOPS/afs_vnop_read.c */
-extern afs_int32 maxIHint;
-extern afs_int32 nihints;
-extern afs_int32 usedihint;
extern int afs_MemRead(register struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, daddr_t albn,
struct buf **abpp, int noLock);