From: Sam Hartman Date: Wed, 7 Mar 2001 09:10:04 +0000 (+0000) Subject: This commit was generated by cvs2svn to compensate for changes in r178, X-Git-Tag: debian/1.0.3-1~12 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ebd6ffe700f5622c6b56e4fc1c2fd887cc92bf84;p=packages%2Fo%2Fopenafs.git This commit was generated by cvs2svn to compensate for changes in r178, which included commits to RCS files with non-trunk default branches. --- diff --git a/src/README b/src/README index 292a85544..27beaa75e 100644 --- a/src/README +++ b/src/README @@ -10,19 +10,23 @@ Building OpenAFS on UNIX and LINUX A. Creating the proper directory structure. - Uncompress the source into a directory of your choice. - Preferrably, afs space. In the directory that you uncompressed the - source in, you will only have an src directory. - + Uncompress the source into a directory of your choice. A directory + in afs space is also valid. In the directory that you uncompressed the + source in, you will only have an src/ directory. + 1. Make a directory for each system type that you plan on building. Current tested system types include the following (this step is skipped for the i386_nt40 system type): alpha_dux40/ + alpha_dux50/ (only tested on 5.0A) i386_linux22/ + i386_linux24/ (only tested with 2.4.0 kernel) rs_aix42/ + sgi_65/ (file server not tested) sun4x_56/ sun4x_57/ + sun4x_58/ Example: % mkdir i386_linux22 @@ -32,7 +36,6 @@ A. Creating the proper directory structure. Builds for the following platforms will not fully compile: hp_ux110/ - sgi_65/ 2. Within each of those directories, create a dest/ and obj/ directory. @@ -41,31 +44,35 @@ A. Creating the proper directory structure. % mkdir i386_linux22/obj 3. Create symbolic links to the system type you are about to build + a. If the source is in AFS space - Example: - % ln -s @sys/dest dest - % ln -s @sys/obj obj - % ls -CF - Makefile@ dest@ i386_linux22/ obj@ src/ - - 4. If this source is NOT in AFS space, You must make a link from - @sys to your current system type. + Example: + % ln -s @sys/dest dest + % ln -s @sys/obj obj + % ls -CF + dest@ i386_linux22/ obj@ src/ - Example: - % ln -s i386_linux22 @sys + Within AFS space, the AFS Cache Manager automatically + substitutes the local machine's AFS system name (CPU/operating + system type [ie: alpha_dux40, i386_linux22, ...]) for the @sys + variable. - Within AFS space, the AFS Cache Manager automatically - substitutes the local machine's AFS system name (CPU/operating - system type [ie: alpha_dux40, i386_linux22, ...]) for the @sys - variable. + b. If this source is NOT in AFS space, You must make a link from + @sys to your current system type. + Example: + % ln -s i386_linux22 @sys + % ln -s @sys/dest dest + % ln -s @sys/obj obj + % ls -CF + dest@ i386_linux22/ obj@ src/ sys@ + 5. Create the top level Makefile: - a. For LINUX and UNIX versions Example: % ln -s src/Makefile Makefile % ls -CF - Makefile@ i386_linux22/ src/ + Makefile@ dest@ i386_linux22/ obj@ src/ B Building diff --git a/src/WINNT/afsd/smb3.c b/src/WINNT/afsd/smb3.c index f6067288d..8f3c5cb5c 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -2367,7 +2367,8 @@ nextEntry: * we're supposed to close the search if we're done, and we're done, * or if something went wrong, close the search. */ - if ((searchFlags & 1) || ((searchFlags & 2) && eos) + /* ((searchFlags & 1) || ((searchFlags & 2) && eos) */ + if ((searchFlags & 1) || (returnedNames == 0) || code != 0) smb_DeleteDirSearch(dsp); if (code) smb_SendTran2Error(vcp, p, opx, code); diff --git a/src/WINNT/afssvrmgr/svc_create.cpp b/src/WINNT/afssvrmgr/svc_create.cpp index 21690f1ec..a69be2b2a 100644 --- a/src/WINNT/afssvrmgr/svc_create.cpp +++ b/src/WINNT/afssvrmgr/svc_create.cpp @@ -139,7 +139,7 @@ void Services_Create_OnInitDialog (HWND hDlg, LPIDENT lpi) void Services_Create_OnType (HWND hDlg) { - SERVICETYPE type; + AFSSERVICETYPE type; if (IsDlgButtonChecked (hDlg, IDC_SVC_TYPE_FS)) type = SERVICETYPE_FS; else if (IsDlgButtonChecked (hDlg, IDC_SVC_TYPE_CRON)) diff --git a/src/WINNT/client_config/drivemap.cpp b/src/WINNT/client_config/drivemap.cpp index 0fadf3ad5..0b08e8eae 100644 --- a/src/WINNT/client_config/drivemap.cpp +++ b/src/WINNT/client_config/drivemap.cpp @@ -684,9 +684,14 @@ void AdjustAfsPath (LPTSTR pszTarget, LPCTSTR pszSource, BOOL fWantAFS, BOOL fWa lstrcpy (pszTarget, (fWantAFS) ? TEXT("/afs") : TEXT("")); else if ((*pszSource != TEXT('/')) && (*pszSource != TEXT('\\'))) wsprintf (pszTarget, TEXT("/afs/%s"), pszSource); - else if (fWantAFS && lstrncmpi (&pszSource[1], TEXT("afs"), 3)) + // We don't want to strip afs off the start if it is part of something for example afscell.company.com + else if (fWantAFS && (lstrncmpi (&pszSource[1], TEXT("afs"), 3)) || !((pszSource[4] == TEXT('/')) || + (pszSource[4] == TEXT('\\')) || + (lstrlen(pszSource) == 4))) wsprintf (pszTarget, TEXT("/afs%s"), pszSource); - else if (!fWantAFS && !lstrncmpi (&pszSource[1], TEXT("afs"), 3)) + else if (!fWantAFS && (!lstrncmpi (&pszSource[1], TEXT("afs"), 3) || ((pszSource[4] == TEXT('/')) || + (pszSource[4] == TEXT('\\')) || + (lstrlen(pszSource) == 4)))) lstrcpy (pszTarget, &pszSource[4]); else lstrcpy (pszTarget, pszSource); diff --git a/src/afs/DUX/osi_inode.c b/src/afs/DUX/osi_inode.c index b0c271438..0679b2a18 100644 --- a/src/afs/DUX/osi_inode.c +++ b/src/afs/DUX/osi_inode.c @@ -56,6 +56,9 @@ getinode(fs, dev, inode, ipp, perror) } MOUNTLIST_LOCK(); } +#ifdef AFS_DUX50_ENV +#define m_next m_nxt +#endif mp = mp->m_next; } while (mp != rootfs); MOUNTLIST_UNLOCK(); @@ -212,6 +215,9 @@ afs_syscall_iopen(dev, inode, usrmod, retval) int fd; extern struct fileops vnops; register int code; +#ifdef AFS_DUX50_ENV + struct ufile_entry *fe; +#endif AFS_STATCNT(afs_syscall_iopen); @@ -222,10 +228,17 @@ afs_syscall_iopen(dev, inode, usrmod, retval) if (code) { return(code); } +#ifdef AFS_DUX50_ENV + if ((code = falloc(&fp, &fd, &fe)) != 0) { + iput(ip); + return(code); + } +#else if ((code = falloc(&fp, &fd)) != 0) { iput(ip); return(code); } +#endif IN_UNLOCK(ip); FP_LOCK(fp); @@ -235,7 +248,11 @@ afs_syscall_iopen(dev, inode, usrmod, retval) fp->f_data = (caddr_t)ITOV(ip); FP_UNLOCK(fp); +#ifdef AFS_DUX50_ENV + u_set_fe(fd, fe, fp, &u.u_file_state); +#else U_FD_SET(fd, fp, &u.u_file_state); +#endif *retval = fd; return(0); } diff --git a/src/afs/DUX/osi_vfsops.c b/src/afs/DUX/osi_vfsops.c index ecba5e5f2..87342e45e 100644 --- a/src/afs/DUX/osi_vfsops.c +++ b/src/afs/DUX/osi_vfsops.c @@ -200,6 +200,14 @@ int mp_afs_sync(struct mount *mp, int flags) } +#ifdef AFS_DUX50_ENV +int mp_afs_smoothsync(struct mount *mp, u_int age, u_int smsync_flag) +{ + AFS_STATCNT(afs_sync); + return 0; +} +#endif + int mp_afs_fhtovp(struct mount *afsp, struct fid *fidp, struct vnode **avcp) { struct vrequest treq; @@ -350,7 +358,10 @@ struct vfsops afs_vfsops = { mp_afs_vptofh, mp_Afs_init, mp_afs_mountroot, - mp_afs_swapvp + mp_afs_swapvp, +#ifdef AFS_DUX50_ENV + mp_afs_smoothsync +#endif }; @@ -469,8 +480,12 @@ int mp_Afs_init(void) AFS_GLOCK(); sysent[AFS_SYSCALL].sy_call = afs3_syscall; +#ifdef SY_NARG + sysent[AFS_SYSCALL].sy_info = 6; +#else sysent[AFS_SYSCALL].sy_parallel = 0; sysent[AFS_SYSCALL].sy_narg = 6; +#endif sysent[SYS_setgroups].sy_call = Afs_xsetgroups; afs_xioctl_func = afsxioctl; afs_xsetgroups_func = afsxsetgroups; diff --git a/src/afs/DUX/osi_vnodeops.c b/src/afs/DUX/osi_vnodeops.c index f57b82bc6..b4424ad58 100644 --- a/src/afs/DUX/osi_vnodeops.c +++ b/src/afs/DUX/osi_vnodeops.c @@ -40,6 +40,7 @@ int mp_afs_reclaim(), mp_afs_bmap(), mp_afs_strategy(), mp_afs_print(); int mp_afs_page_read(), mp_afs_page_write(), mp_afs_swap(), mp_afs_bread(); int mp_afs_brelse(), mp_afs_lockctl(), mp_afs_syncdata(), mp_afs_close(); int mp_afs_closex(); +int mp_afs_ioctl(); /* AFS vnodeops */ struct vnodeops Afs_vnodeops = { @@ -53,7 +54,7 @@ struct vnodeops Afs_vnodeops = { mp_afs_setattr, mp_afs_ubcrdwr, mp_afs_ubcrdwr, - afs_badop, /* vn_ioctl */ + mp_afs_ioctl, /* vn_ioctl */ seltrue, /* vn_select */ mp_afs_mmap, mp_afs_fsync, @@ -510,8 +511,13 @@ mp_afs_ubcrdwr(avc, uio, ioflag, cred) flags = 0; ReleaseWriteLock(&avc->lock); AFS_GUNLOCK(); +#ifdef AFS_DUX50_ENV + code = ubc_lookup(((struct vnode *)avc)->v_object, pageBase, + PAGE_SIZE, PAGE_SIZE, &page, &flags, NULL); +#else code = ubc_lookup(((struct vnode *)avc)->v_object, pageBase, PAGE_SIZE, PAGE_SIZE, &page, &flags); +#endif AFS_GLOCK(); ObtainWriteLock(&avc->lock,163); @@ -561,9 +567,7 @@ mp_afs_ubcrdwr(avc, uio, ioflag, cred) } AFS_GUNLOCK(); ubc_page_wait(page); - data = (char *)page->pg_addr; /* DUX 4.0D */ - if (data == 0) - data = (char *)PHYS_TO_KSEG(page->pg_phys_addr); /* DUX 4.0E */ + data = ubc_load(page, pageOffset, page_size); AFS_GLOCK(); ReleaseWriteLock(&avc->lock); /* uiomove may page fault */ AFS_GUNLOCK(); @@ -666,6 +670,12 @@ out: return code; } +int +mp_afs_ioctl(struct vnode *vp, int com, caddr_t data, int fflag, + struct ucred *cred, int *retval) +{ + return ENOSYS; +} /* * Now for some bad news. Since we artificially hold on to vnodes by doing @@ -724,15 +734,25 @@ mp_afs_mmap(avc, offset, map, addrp, len, prot, maxprot, flags, cred) } -int mp_afs_getpage(vop, offset, len, protp, pl, plsz, mape, addr, rw, cred) +int mp_afs_getpage(vop, offset, len, protp, pl, plsz, +#ifdef AFS_DUX50_ENV + policy, +#else + mape, addr, +#endif + rw, cred) vm_ubc_object_t vop; vm_offset_t offset; vm_size_t len; vm_prot_t *protp; vm_page_t *pl; int plsz; +#ifdef AFS_DUX50_ENV + struct vm_policy *policy; +#else vm_map_entry_t mape; vm_offset_t addr; +#endif int rw; struct ucred *cred; { @@ -774,8 +794,13 @@ int mp_afs_getpage(vop, offset, len, protp, pl, plsz, mape, addr, rw, cred) flags = 0; ReleaseWriteLock(&avc->lock); AFS_GUNLOCK(); +#ifdef AFS_DUX50_ENV + code = ubc_lookup(((struct vnode *)avc)->v_object, off, + PAGE_SIZE, PAGE_SIZE, pagep, &flags, NULL); +#else code = ubc_lookup(((struct vnode *)avc)->v_object, off, PAGE_SIZE, PAGE_SIZE, pagep, &flags); +#endif AFS_GLOCK(); ObtainWriteLock(&avc->lock,168); if (code) { @@ -815,7 +840,11 @@ int mp_afs_getpage(vop, offset, len, protp, pl, plsz, mape, addr, rw, cred) } if ((rw & B_READ) == 0) { AFS_GUNLOCK(); +#ifdef AFS_DUX50_ENV + ubc_page_dirty(pl[i], 0); +#else ubc_page_dirty(pl[i]); +#endif AFS_GLOCK(); } else { if (protp && (flags & B_DIRTY) == 0) { @@ -1045,6 +1074,21 @@ mp_afs_write_check(vm_ubc_object_t vop, vm_page_t pp) return TRUE; } +#ifdef AFS_DUX50_ENV +int +mp_afs_objtovp(vm_ubc_object_t vop, struct vnode **vp) +{ + *vp = vop->vu_vp; + return 0; +} + +int +mp_afs_setpgstamp(vm_page_t pp, unsigned int tick) +{ + pp->pg_stamp = tick; + return 0; +} +#endif struct vfs_ubcops afs_ubcops = { @@ -1053,6 +1097,10 @@ struct vfs_ubcops afs_ubcops = { mp_afs_getpage, /* get page */ mp_afs_putpage, /* put page */ mp_afs_write_check, /* check writablity */ +#ifdef AFS_DUX50_ENV + mp_afs_objtovp, /* get vnode pointer */ + mp_afs_setpgstamp /* set page stamp */ +#endif }; diff --git a/src/afs/IRIX/osi_file.c b/src/afs/IRIX/osi_file.c index 6c861a4c5..805ecaed8 100644 --- a/src/afs/IRIX/osi_file.c +++ b/src/afs/IRIX/osi_file.c @@ -23,6 +23,7 @@ extern struct vfs *afs_cacheVfsp; * now vectors to the correct EFS or XFS function. If new functionality is * added which accesses the inode, that will also need EFS/XFS variants. */ +#ifdef AFS_SGI_EFS_IOPS_ENV vnode_t *afs_EFSIGetVnode(ino_t ainode) { struct inode *ip; @@ -39,6 +40,7 @@ vnode_t *afs_EFSIGetVnode(ino_t ainode) iunlock(ip); return (EFS_ITOV(ip)); } +#endif /* AFS_SGI_EFS_IOPS_ENV */ vnode_t *afs_XFSIGetVnode(ino_t ainode) { @@ -142,6 +144,7 @@ osi_UFSTruncate(afile, asize) return code; } +#ifdef AFS_SGI_EFS_IOPS_ENV void osi_DisableAtimes(avp) struct vnode *avp; { @@ -152,6 +155,7 @@ struct vnode *avp; } } +#endif /* AFS_SGI_EFS_IOPS_ENV */ /* Generic read interface */ @@ -185,7 +189,9 @@ afs_osi_Read(afile, offset, aptr, asize) if (code == 0) { code = asize - resid; afile->offset += code; +#ifdef AFS_SGI_EFS_IOPS_ENV osi_DisableAtimes(afile->vnode); +#endif /* AFS_SGI_EFS_IOPS_ENV */ } else { afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid, diff --git a/src/afs/IRIX/osi_inode.c b/src/afs/IRIX/osi_inode.c index 33709bc1d..9341388f9 100644 --- a/src/afs/IRIX/osi_inode.c +++ b/src/afs/IRIX/osi_inode.c @@ -166,7 +166,8 @@ getinode(struct vfs *vfsp, dev_t dev, ino_t inode, struct inode **ipp) return ENOSYS; #endif - if (error = iget(vfstom(vfsp), (unsigned int)(inode&0xffffffff), &ip)) { + if (error = iget((((struct mount *)((vfsp)->vfs_bh.bh_first)->bd_pdata)), + (unsigned int)(inode&0xffffffff), &ip)) { return error; } *ipp = ip; @@ -216,8 +217,10 @@ int xfs_getinode(struct vfs *vfsp, dev_t dev, ino_t inode, } #endif - if (error = xfs_iget(vfstom(vfsp), (void*)0, - (xfs_ino_t)inode,XFS_ILOCK_SHARED, &ip, (daddr_t)0)) { + if (error = xfs_iget((((struct mount *) + ((vfsp)->vfs_bh.bh_first)->bd_pdata)), + (void*)0, (xfs_ino_t)inode, + XFS_ILOCK_SHARED, &ip, (daddr_t)0)) { SET_XFS_ERROR(3, vfsp->vfs_dev, inode); return error; } @@ -280,11 +283,16 @@ struct icreateargs { int icreate(struct icreateargs *uap, rval_t *rvp) { +#ifdef AFS_SGI_EFS_IOPS_ENV AFS_STATCNT(icreate); return(afs_syscall_icreate(uap->dev, uap->near_inode, uap->param1, uap->param2, uap->param3, uap->param4, rvp)); +#else + return ENOSYS; +#endif } +#ifdef AFS_SGI_EFS_IOPS_ENV int afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp) afs_uint32 dev, near_inode, param1, param2, param3, param4; @@ -327,6 +335,15 @@ rval_t *rvp; iput(newip); return 0; } +#else /* !AFS_SGI_EFS_IOPS_ENV */ +int +afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp) +afs_uint32 dev, near_inode, param1, param2, param3, param4; +rval_t *rvp; +{ + return ENOSYS; +} +#endif /* AFS_SGI_EFS_IOPS_ENV */ #ifdef AFS_SGI_XFS_IOPS_ENV /* inode creation routines for icreatename64 entry point. Use for EFS/XFS @@ -620,6 +637,7 @@ afs_syscall_iopen(int dev, ino_t inode, int usrmod, rval_t *rvp) if (!vfsp) return ENXIO; +#ifdef AFS_SGI_EFS_IOPS_ENV if (vfsp->vfs_fstype == efs_fstype) { struct inode *ip; if (error = igetinode(vfsp, (dev_t)dev, inode, &ip)) @@ -631,20 +649,22 @@ afs_syscall_iopen(int dev, ino_t inode, int usrmod, rval_t *rvp) } iunlock(ip); } - else if (vfsp->vfs_fstype == xfs_fstype) { - struct xfs_inode *xip; - if (error = xfs_igetinode(vfsp, (dev_t)dev, inode, &xip)) - return error; - vp = XFS_ITOV(xip); - if (error = vfile_alloc((usrmod+1) & (FMASK), &fp, &fd)) { - VN_RELE(vp); - return error; - } - } - else { - osi_Panic("afs_syscall_iopen: bad fstype = %d\n", - vfsp->vfs_fstype); - } + else +#endif /* AFS_SGI_EFS_IOPS_ENV */ + if (vfsp->vfs_fstype == xfs_fstype) { + struct xfs_inode *xip; + if (error = xfs_igetinode(vfsp, (dev_t)dev, inode, &xip)) + return error; + vp = XFS_ITOV(xip); + if (error = vfile_alloc((usrmod+1) & (FMASK), &fp, &fd)) { + VN_RELE(vp); + return error; + } + } + else { + osi_Panic("afs_syscall_iopen: bad fstype = %d\n", + vfsp->vfs_fstype); + } vfile_ready(fp, vp); rvp->r_val1 = fd; return 0; @@ -765,6 +785,7 @@ rval_t *rvp; * Only VICEMAGIC type inodes. */ #ifdef AFS_SGI_XFS_IOPS_ENV +#ifdef AFS_SGI_EFS_IOPS_ENV /* efs_iincdec * * XFS/EFS iinc/idec code for EFS. Uses 32 bit inode numbers. @@ -796,6 +817,7 @@ int inode, inode_p1, amount; iput(ip); return error; } +#endif /* AFS_SGI_EFS_IOPS_ENV */ /* xfs_iincdec * @@ -814,8 +836,9 @@ static int xfs_iincdec64(struct vfs *vfsp, ino_t inode, int inode_p1, int nlink; int vol; - code = xfs_iget(vfstom(vfsp), (void*)0, (xfs_ino_t)inode, XFS_ILOCK_SHARED, - &ip, (daddr_t)0); + code = xfs_iget((((struct mount *)((vfsp)->vfs_bh.bh_first)->bd_pdata)), + (void*)0, (xfs_ino_t)inode, XFS_ILOCK_SHARED, &ip, + (daddr_t)0); if (code) return code; @@ -963,9 +986,11 @@ iincdec64(int dev, int inode_hi, int inode_lo, int inode_p1, int amount) inode |= inode_lo; return xfs_iincdec64(vfsp, inode, inode_p1, amount); } +#ifdef AFS_SGI_EFS_IOPS_ENV else if (vfsp->vfs_fstype == efs_fstype) { return efs_iincdec(vfsp, inode_lo, inode_p1, amount); } +#endif /* AFS_SGI_EFS_IOPS_ENV */ return ENXIO; } @@ -1143,7 +1168,8 @@ afs_syscall_ilistinode64(int dev, int inode_hi, int inode_lo, inode = inode_hi; inode <<= 32; inode |= inode_lo; - code = xfs_iget(vfstom(vfsp), (void*)0, (xfs_ino_t)inode, + code = xfs_iget((((struct mount *)((vfsp)->vfs_bh.bh_first)->bd_pdata)), + (void*)0, (xfs_ino_t)inode, XFS_ILOCK_SHARED, &ip, (daddr_t)0); if (code) return code; diff --git a/src/afs/IRIX/osi_vnodeops.c b/src/afs/IRIX/osi_vnodeops.c index 1c8920ef9..18e0a5aa7 100644 --- a/src/afs/IRIX/osi_vnodeops.c +++ b/src/afs/IRIX/osi_vnodeops.c @@ -10,7 +10,7 @@ /* * SGI specific vnodeops + other misc interface glue */ -#ident "$Revision: 1.1.1.2 $" +#ident "$Revision: 1.1.1.3 $" #include "../afs/param.h" /* Should be always first */ #ifdef AFS_SGI62_ENV @@ -1829,6 +1829,7 @@ void afs_InitDualFSCacheOps(struct vnode *vp) inited = 1; +#ifdef AFS_SGI_EFS_IOPS_ENV swp = vfs_getvfssw("efs"); if (swp) { afs_efs_vnodeopsp = swp->vsw_vnodeops; @@ -1838,6 +1839,7 @@ void afs_InitDualFSCacheOps(struct vnode *vp) found = 1; } } +#endif /* AFS_SGI_EFS_IOPS_ENV */ swp = vfs_getvfssw("xfs"); if (swp) { diff --git a/src/afs/LINUX/osi_vfs.h b/src/afs/LINUX/osi_vfs.h index 77b7bcff9..3e795caf2 100644 --- a/src/afs/LINUX/osi_vfs.h +++ b/src/afs/LINUX/osi_vfs.h @@ -36,7 +36,7 @@ typedef struct vnode { uid_t i_uid; gid_t i_gid; kdev_t i_rdev; -#if defined(AFS_LINUX24_ENV) +#if defined(AFS_LINUX24_ENV) || defined(pgoff2loff) loff_t i_size; #else off_t i_size; diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index d1939581a..f471d0819 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -231,37 +231,19 @@ void afs_write_inode(struct inode *ip) * If we use the common inode pool, we'll need to set i_nlink to 0 here. * That will trigger the call to delete routine. */ + void afs_delete_inode(struct inode *ip) { - cred_t *credp = crref(); struct vcache *vc = (struct vcache*)ip; AFS_GLOCK(); -#if defined(AFS_LINUX24_ENV) - lock_kernel(); - if (atomic_read(&ip->i_count) > 1) -#else - if (ip->i_count > 1) -#endif - printf("afs_put_inode: ino %d (0x%x) has count %d\n", ip->i_ino, ip); - ObtainWriteLock(&vc->lock, 504); - afs_InactiveVCache(vc, credp); -#if defined(AFS_LINUX24_ENV) - atomic_set(&ip->i_count, 0); -#else - ip->i_count = 0; -#endif - ip->i_nlink = 0; /* iput checks this after calling this routine. */ + osi_clear_inode(ip); ReleaseWriteLock(&vc->lock); - -#ifdef AFS_LINUX24_ENV - unlock_kernel(); -#endif AFS_GUNLOCK(); - crfree(credp); } + /* afs_put_super * Called from unmount to release super_block. */ void afs_put_super(struct super_block *sbp) diff --git a/src/afs/SOLARIS/osi_vnodeops.c b/src/afs/SOLARIS/osi_vnodeops.c index e55d2694c..4e4d8efe0 100644 --- a/src/afs/SOLARIS/osi_vnodeops.c +++ b/src/afs/SOLARIS/osi_vnodeops.c @@ -560,10 +560,6 @@ int afs_putpage(vp, off, len, flags, cred) /* * Putpage (ASYNC) is called every sec to flush out dirty vm pages */ - if (flags == B_ASYNC) { - /* XXX For testing only XXX */ - return (EINVAL); - } AFS_GLOCK(); afs_Trace4(afs_iclSetp, CM_TRACE_PAGEOUT, ICL_TYPE_POINTER, (afs_int32) vp, ICL_TYPE_LONG, (afs_int32) off, ICL_TYPE_LONG, (afs_int32) len, diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 01f885632..e73c1f47b 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -639,7 +639,9 @@ struct vrequest *areq; { #if !defined (AFS_AIX_ENV) && !defined (AFS_HPUX_ENV) && !defined (AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) -#ifdef AFS_DUX40_ENV +#ifdef AFS_DUX50_ENV +#define vno_close(X) vn_close((X), 0, NOCRED) +#elif defined(AFS_DUX40_ENV) #define vno_close vn_close #endif /* We don't need this for AIX since: diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index c66e13583..2b2fd206d 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -713,6 +713,13 @@ void afs_osi_TraverseProcTable() void afs_osi_TraverseProcTable() { struct pid_entry *pe; +#ifdef AFS_DUX50_ENV +extern struct pid_entry *pidtab; +extern int npid; +#define pidNPID (pidtab + npid) +#define PID_LOCK() +#define PID_UNLOCK() +#endif PID_LOCK(); for (pe = pidtab; pe < pidNPID; ++pe) { if (pe->pe_proc != PROC_NULL) diff --git a/src/afs/afs_stats.h b/src/afs/afs_stats.h index 1703b2c3b..a0919dc8b 100644 --- a/src/afs/afs_stats.h +++ b/src/afs/afs_stats.h @@ -838,6 +838,7 @@ struct afs_stats_CMPerf { #define AFS_STATS_FS_RPCIDX_XSTATSVERSION 26 #define AFS_STATS_FS_RPCIDX_GETXSTATS 27 #define AFS_STATS_FS_RPCIDX_XLOOKUP 28 +#define AFS_STATS_FS_RPCIDX_RESIDENCYRPCS 29 #define AFS_STATS_NUM_FS_RPC_OPS 29 diff --git a/src/afs/afs_trace.et b/src/afs/afs_trace.et index cc0e31daa..ad4fc9751 100644 --- a/src/afs/afs_trace.et +++ b/src/afs/afs_trace.et @@ -127,5 +127,7 @@ error_table 2 zcm ec CM_TRACE_READPAGE, "Ireadpage ip 0x%lx pp 0x%x count 0x%x code %x" ec CM_TRACE_UPDATEPAGE, "Iupdatepage ip 0x%lx pp 0x%x count 0x%x code %d" ec CM_TRACE_VM_CLOSE, "VMclose ip 0x%lx mapcnt %d opens %d XoW %d" + ec CM_TRACE_PREFETCHCMD, "PrefetchCmd tvc 0x%x tfid (%d:%d.%d.%d) fid (%d:%d.%d.%d)" + ec CM_TRACE_RESIDCMD, "ResidencyCmd tvc 0x%x command %d fid (%d:%d.%d.%d)" end diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h index 022420734..6139b6a9a 100644 --- a/src/afs/sysincludes.h +++ b/src/afs/sysincludes.h @@ -79,7 +79,10 @@ struct xfs_inode_info {}; #ifdef AFS_SGI64_ENV #include #endif /* AFS_SGI64_ENV */ +#include "../fs/efs_inode.h" +#ifdef AFS_SGI_EFS_IOPS_ENV #include "../sgiefs/efs.h" +#endif #include "../sys/kmem.h" #include "../sys/cred.h" #include "../sys/resource.h"