Make typedefs of AFS_UCRED and AFS_PROC, with a corresponding name change.
The names afs_ucred_t and afs_proc_t are chosen since these appear to be
the best available choices. The names cannot actually collide with anything
which POSIX might later introduce. For UKERNEL, the preprocessor is used
to redirect references. This seems not easily avoidable at present.
LICENSE BSD
Reviewed-on: http://gerrit.openafs.org/645
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct vfs *afs_cacheVfsp;
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
struct vattr tvattr;
register afs_int32 code;
struct osi_stat tstat;
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
unsigned int resid;
register afs_int32 code;
register afs_int32 cnt1 = 0;
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
unsigned int resid;
register afs_int32 code;
AFS_STATCNT(osi_Write);
extern long time;
#define osi_Time() (time)
-#define AFS_UCRED struct ucred
-#define AFS_PROC struct proc
+typedef struct ucred afs_ucred_t;
+typedef struct proc afs_proc_t;
#define afs_bufferpages v.v_bufhw
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
if (avc->segid) {
ReleaseWriteLock(&avc->lock);
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
if (avc->segid) {
vm_flushp(avc->segid, 0, MAXFSIZE / PAGESIZE - 1);
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
if (avc->segid) {
int firstpage = (alen + PAGESIZE - 1) / PAGESIZE;
int
afs_inactive(struct vcache *avc,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
afs_InactiveVCache(avc, acred);
}
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
afs_osi_cred.cr_ref++;
afs_osi_cred.cr_ngroups = 1;
afs_osicred_initialized = 1;
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
struct vattr tvattr;
register afs_int32 code;
struct osi_stat tstat;
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
afs_size_t resid;
register afs_int32 code;
#ifdef AFS_DARWIN80_ENV
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
afs_size_t resid;
register afs_int32 code;
#ifdef AFS_DARWIN80_ENV
extern int hz;
#endif
-#define AFS_UCRED struct ucred
-
-#define AFS_PROC struct proc
+typedef struct ucred afs_ucred_t;
+typedef struct proc afs_proc_t;
#define osi_vnhold(avc,r) VN_HOLD(AFSTOV(avc))
#define VN_HOLD(vp) darwin_vn_hold(vp)
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
struct vnode *vp = AFSTOV(avc);
void *object;
this, and also making sure that ubc's idea of the filesize is right more
often */
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
struct vnode *vp = AFSTOV(avc);
void *object;
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
struct vnode *vp = AFSTOV(avc);
#ifdef AFS_DARWIN80_ENV
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
#define osi_Time() time_second
#define afs_hz hz
-#define AFS_UCRED struct ucred
-#define AFS_PROC struct proc
+typedef struct ucred afs_ucred_t;
+typedef struct proc afs_proc_t;
#define afs_bufferpages bufpages
#ifndef iodone
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
struct vnode *vp;
struct vm_object *obj;
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
struct vnode *vp;
struct vm_object *obj;
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
vnode_pager_setsize(AFSTOV(avc), alen);
}
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct vfs *afs_cacheVfsp;
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
struct vattr tvattr;
register afs_int32 code;
struct osi_stat tstat;
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
long resid;
register afs_int32 code;
register afs_int32 cnt1 = 0;
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
long resid;
register afs_int32 code;
AFS_STATCNT(osi_Write);
extern struct timeval time;
#define osi_Time() (time.tv_sec)
-#define AFS_UCRED struct ucred
-#define AFS_PROC proc_t
+typedef struct ucred afs_ucred_t;
+typedef proc_t afs_proc_t;
#define osi_vnhold(avc, r) do { VN_HOLD(AFSTOV(avc)); } while(0)
#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,aresid) \
* re-obtained.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
struct vnode *vp = AFSTOV(avc);
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
; /* Nothing here yet */
}
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
; /* Nothing here yet */
}
afs_lockf(vp, flag, len, cred, fp, LB, UB)
struct vnode *vp;
int flag;
- AFS_UCRED *cred;
+ afs_ucred_t *cred;
struct file *fp;
k_off_t len, LB, UB;
{
afs_inactive(avc, acred)
register struct vcache *avc;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
struct vnode *vp = AFSTOV(avc);
ulong_t context;
int
-mp_afs_open(register struct vnode **avcp, int aflags, AFS_UCRED *acred)
+mp_afs_open(register struct vnode **avcp, int aflags, afs_ucred_t *acred)
{
register int code;
}
int
-mp_afs_close(register struct vnode *avcp, int aflags, AFS_UCRED *acred)
+mp_afs_close(register struct vnode *avcp, int aflags, afs_ucred_t *acred)
{
register int code;
int
mp_afs_rdwr(register struct vnode *avcp, struct uio *uio, enum uio_rw arw,
- int aio, AFS_UCRED *acred)
+ int aio, afs_ucred_t *acred)
{
register int code;
long save_resid;
int
mp_afs_getattr(register struct vnode *avcp, struct vattr *attrs,
- AFS_UCRED *acred, enum vsync unused1)
+ afs_ucred_t *acred, enum vsync unused1)
{
register int code;
int
mp_afs_setattr(register struct vnode *avcp, register struct vattr *attrs,
- AFS_UCRED *acred, int unused1)
+ afs_ucred_t *acred, int unused1)
{
register int code;
}
int
-mp_afs_access(register struct vnode *avcp, int mode, AFS_UCRED *acred)
+mp_afs_access(register struct vnode *avcp, int mode, afs_ucred_t *acred)
{
register int code;
int
mp_afs_lookup(register struct vnode *adp, char *aname,
- register struct vnode **avcp, AFS_UCRED *acred,
+ register struct vnode **avcp, afs_ucred_t *acred,
struct vnode *unused1)
{
register int code;
int
mp_afs_create(register struct vnode *adp, char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vnode **avcp,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
mp_afs_remove(register struct vnode *adp, char *aname,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
mp_afs_link(register struct vnode *avc, register struct vnode *adp,
- char *aname, AFS_UCRED *acred)
+ char *aname, afs_ucred_t *acred)
{
register int code;
int
mp_afs_rename(register struct vnode *aodp, char *aname1,
register struct vnode *andp, char *aname2,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
mp_afs_mkdir(register struct vnode *adp, char *aname, struct vattr *attrs,
- register struct vnode **avcp, AFS_UCRED *acred)
+ register struct vnode **avcp, afs_ucred_t *acred)
{
register int code;
int
-mp_afs_rmdir(register struct vnode *adp, char *aname, AFS_UCRED *acred)
+mp_afs_rmdir(register struct vnode *adp, char *aname, afs_ucred_t *acred)
{
register int code;
int
mp_afs_readdir(register struct vnode *avc, struct uio *auio,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
mp_afs_symlink(register struct vnode *adp, char *aname, struct vattr *attrs,
- char *atargetName, AFS_UCRED *acred)
+ char *atargetName, afs_ucred_t *acred)
{
register int code;
int
mp_afs_readlink(register struct vnode *avc, struct uio *auio,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
}
int
-mp_afs_fsync(register struct vnode *avc, AFS_UCRED *acred, int unused1)
+mp_afs_fsync(register struct vnode *avc, afs_ucred_t *acred, int unused1)
{
register int code;
int
-mp_afs_inactive(register struct vnode *avc, AFS_UCRED *acred)
+mp_afs_inactive(register struct vnode *avc, afs_ucred_t *acred)
{
register int code;
int
mp_afs_lockctl(struct vnode *avc, struct flock *af, int cmd,
- AFS_UCRED *acred, struct file *unused1, off_t unused2,
+ afs_ucred_t *acred, struct file *unused1, off_t unused2,
off_t unused3)
{
register int code;
int
mp_afs_readdir2(register struct vnode *avc, struct uio *auio,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* afs statistics */
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
int afs_osicred_initialized = 0;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
struct vattr tvattr;
register afs_int32 code;
struct osi_stat tstat;
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
ssize_t resid;
register afs_int32 code;
register afs_int32 cnt1 = 0;
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
ssize_t resid;
register afs_int32 code;
AFS_STATCNT(osi_Write);
#define osi_Time() (time)
/* This gets redefined from ucred to cred in osi_vfs.h, just do it right */
-#define AFS_UCRED struct cred
-
-#define AFS_PROC struct proc
+typedef struct cred afs_ucred_t;
+typedef struct proc afs_proc_t;
#undef gop_lookupname
#define gop_lookupname(fnamep,segflg,followlink,compvpp) lookupname((fnamep),(segflg),(followlink),NULL,(compvpp), NULL)
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
ReleaseWriteLock(&avc->lock);
AFS_GUNLOCK();
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
vnode_t *vp = (vnode_t *) avc;
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
PTOSSVP(&avc->v, (off_t) alen, (off_t) MAXLONG);
}
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
struct group_info *cr_group_info;
struct afs_cred *cr_next;
} cred_t;
-#define AFS_UCRED struct afs_cred
-#define AFS_PROC struct task_struct
+
+typedef struct afs_cred afs_ucred_t;
+typedef struct task_struct afs_proc_t;
+
#if !defined(current_cred)
#define current_gid() (current->gid)
#define current_uid() (current->uid)
#include <linux/smp_lock.h>
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
void
afs_osi_SetTime(osi_timeval_t * tvp)
{
struct nfs_server_thread *ns;
struct afs_exporter *outexp;
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
struct sockaddr_in *addr;
int code;
#endif
-int osi_linux_nfs_initreq(struct vrequest *av, AFS_UCRED *cr, int *code)
+int osi_linux_nfs_initreq(struct vrequest *av, afs_ucred_t *cr, int *code)
{
struct nfs_server_thread *ns;
* However, we need to define them in order to resolve the reference,
* unless we want to move afs_InitReq out of afs_osi_pag.c.
*/
-int osi_linux_nfs_initreq(struct vrequest *av, AFS_UCRED *cr, int *code)
+int osi_linux_nfs_initreq(struct vrequest *av, afs_ucred_t *cr, int *code)
{
*code = EACCES;
return 1;
int
afs_nfsclient_reqhandler(struct afs_exporter *exporter,
- AFS_UCRED **cred,
+ afs_ucred_t **cred,
afs_int32 host, afs_int32 *pagparam,
struct afs_exporter **outexporter)
{
extern void crset(cred_t * cr);
/* osi_nfssrv.c */
-extern int osi_linux_nfs_initreq(struct vrequest *av, AFS_UCRED *cr,
+extern int osi_linux_nfs_initreq(struct vrequest *av, afs_ucred_t *cr,
int *code);
extern void osi_linux_nfssrv_init(void);
extern void osi_linux_nfssrv_shutdown(void);
/* osi_vm.c */
extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
-extern void osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred,
+extern void osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred,
int sync);
extern void osi_VM_FSyncInval(struct vcache *avc);
extern void osi_VM_StoreAllSegments(struct vcache *avc);
-extern void osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp);
+extern void osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp);
extern void osi_VM_Truncate(struct vcache *avc, int alen,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
/* osi_vfsops.c */
extern void vattr2inode(struct inode *ip, struct vattr *vp);
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
struct inode *ip = AFSTOV(avc);
* then these callers should be updated.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
struct inode *ip = AFSTOV(avc);
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
vmtruncate(AFSTOV(avc), alen);
}
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
int cr_ngroups;
struct afs_cred *cr_next;
} cred_t;
-#define AFS_UCRED struct afs_cred
-#define AFS_PROC struct task_struct
+
+typedef struct afs_cred afs_ucred_t;
+typedef struct task_struct afs_proc_t;
+
#if !defined(current_cred)
#define current_gid() (current->gid)
#define current_uid() (current->uid)
#endif
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
void
afs_osi_SetTime(osi_timeval_t * tvp)
extern void crset(cred_t * cr);
/* osi_nfssrv.c */
-extern int osi_linux_nfs_initreq(struct vrequest *av, AFS_UCRED *cr,
+extern int osi_linux_nfs_initreq(struct vrequest *av, afs_ucred_t *cr,
int *code);
extern void osi_linux_nfssrv_init(void);
extern void osi_linux_nfssrv_shutdown(void);
/* osi_vm.c */
extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
-extern void osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred,
+extern void osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred,
int sync);
extern void osi_VM_FSyncInval(struct vcache *avc);
extern void osi_VM_StoreAllSegments(struct vcache *avc);
-extern void osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp);
+extern void osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp);
extern void osi_VM_Truncate(struct vcache *avc, int alen,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
/* osi_vfsops.c */
extern void vattr2inode(struct inode *ip, struct vattr *vp);
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
struct inode *ip = AFSTOV(avc);
* then these callers should be updated.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct inode *ip = AFSTOV(avc);
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
vmtruncate(AFSTOV(avc), alen);
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
struct vattr tvattr;
register afs_int32 code;
struct osi_stat tstat;
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
unsigned int resid;
register afs_int32 code;
register afs_int32 cnt1 = 0;
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
unsigned int resid;
register afs_int32 code;
AFS_STATCNT(osi_Write);
#define osi_Time() (time.tv_sec)
#define afs_hz hz
-#define AFS_UCRED struct ucred
-#define AFS_PROC struct proc
+typedef struct ucred afs_ucred_t;
+typedef struct proc afs_proc_t;
#define afs_bufferpages bufpages
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
#ifdef SECRETLY_OSF1
ReleaseWriteLock(&avc->lock);
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
#ifdef SECRETLY_OSF1
ubc_flush_dirty(((struct vnode *)avc)->v_object, 0);
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
#ifdef SECRETLY_OSF1
ubc_invalidate(((struct vnode *)avc)->v_object, alen, MAXINT - alen,
mp_afs_open(avcp, aflags, acred)
struct vcache **avcp;
afs_int32 aflags;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
int code;
AFS_GLOCK();
mp_afs_access(avc, amode, acred)
struct vcache *avc;
afs_int32 amode;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
int code;
AFS_GLOCK();
mp_afs_getattr(avc, attrs, acred)
struct vcache *avc;
struct vattr *attrs;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
int code;
AFS_GLOCK();
mp_afs_setattr(avc, attrs, acred)
struct vcache *avc;
struct vattr *attrs;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
int code;
AFS_GLOCK();
mp_afs_fsync(avc, fflags, acred, waitfor)
struct vcache *avc;
int fflags;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
int waitfor;
{
int code;
mp_afs_readdir(avc, auio, acred, eofp)
struct vcache *avc;
struct uio *auio;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
int *eofp;
{
int code;
mp_afs_readlink(avc, auio, acred)
struct vcache *avc;
struct uio *auio;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
int code;
AFS_GLOCK();
mp_afs_lockctl(avc, af, flag, acred, clid, offset)
struct vcache *avc;
struct eflock *af;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
int flag;
pid_t clid;
off_t offset;
mp_afs_inactive(avc, acred)
register struct vcache *avc;
- AFS_UCRED *acred;
+ afs_ucred_t *acred;
{
AFS_GLOCK();
afs_InactiveVCache(avc, acred);
int afs_osicred_initialized;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
#endif /* AFS_OBSD42_ENV */
/* proc, cred */
-#define AFS_PROC struct proc
-#define AFS_UCRED struct ucred
+typedef struct proc afs_proc_t;
+typedef struct ucred afs_ucred_t;
+
#define afs_suser(x) afs_osi_suser(osi_curcred())
#define getpid() curproc
#define osi_curcred() (curproc->p_cred->pc_ucred)
* be some pages around when we return, newly created by concurrent activity.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
ReleaseWriteLock(&avc->lock);
osi_VM_FlushVCache(avc, NULL);
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
struct vnode *vp = AFSTOV(avc);
* it only works on Solaris.
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
uvm_vnp_setsize(AFSTOV(avc), alen);
}
extern int
afs_lockctl(struct vcache *avc, struct AFS_FLOCK *af, int acmd,
- AFS_UCRED *acred, pid_t clid);
+ afs_ucred_t *acred, pid_t clid);
/*
* Advisory record locking support (fcntl() POSIX style)
int afs_osicred_initialized = 0;
-AFS_UCRED afs_osi_cred;
+afs_ucred_t afs_osi_cred;
afs_lock_t afs_xosi; /* lock is for tvattr */
extern struct osi_dev cacheDev;
extern struct vfs *afs_cacheVfsp;
}
if (!afs_osicred_initialized) {
/* valid for alpha_osf, SunOS, Ultrix */
- memset((char *)&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset((char *)&afs_osi_cred, 0, sizeof(afs_ucred_t));
crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */
afs_osicred_initialized = 1;
}
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
struct vattr tvattr;
register afs_int32 code;
struct osi_stat tstat;
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
#if defined(AFS_SUN57_ENV)
ssize_t resid;
#else
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- AFS_UCRED *oldCred;
+ afs_ucred_t *oldCred;
#if defined(AFS_SUN57_ENV)
ssize_t resid;
#else
getinode(vfsp, dev, inode, ipp, credp, perror)
struct vfs *vfsp;
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
struct inode **ipp;
dev_t dev;
ino_t inode;
/* get an existing inode. Common code for iopen, iread/write, iinc/dec. */
igetinode(vfsp, dev, inode, ipp, credp, perror)
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
struct inode **ipp;
struct vfs *vfsp;
dev_t dev;
#ifdef AFS_SUN510_ENV
dnlc_enter(ITOV(ip), "a", ITOV(ip));
#else
- dnlc_enter(ITOV(ip), "a", ITOV(ip), (AFS_UCRED *)0);
+ dnlc_enter(ITOV(ip), "a", ITOV(ip), (afs_ucred_t *)0);
#endif
}
afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp,
credp)
rval_t *rvp;
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
long near_inode, param1, param2, param3, param4;
dev_t dev;
{
afs_syscall_iopen(dev, inode, usrmod, rvp, credp)
rval_t *rvp;
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
int inode, usrmod;
dev_t dev;
{
afs_syscall_iincdec(dev, inode, inode_p1, amount, rvp, credp)
rval_t *rvp;
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
int inode, inode_p1, amount;
dev_t dev;
{
#define NFSSRV "/kernel/misc/nfssrv"
#define NFSSRV_V9 "/kernel/misc/sparcv9/nfssrv"
-#define AFS_UCRED struct cred
-#define AFS_PROC struct proc
+typedef struct cred afs_ucred_t;
+typedef struct proc afs_proc_t;
/*
* Time related macros
#else
u_int * lenp,
#endif
- int flags, AFS_UCRED *credp);
+ int flags, afs_ucred_t *credp);
int
afs_mount(struct vfs *afsp, struct vnode *amvp, struct mounta *uap,
- AFS_UCRED *credp)
+ afs_ucred_t *credp)
{
AFS_GLOCK();
#if defined(AFS_SUN58_ENV)
int
-afs_unmount(struct vfs *afsp, int flag, AFS_UCRED *credp)
+afs_unmount(struct vfs *afsp, int flag, afs_ucred_t *credp)
#else
int
-afs_unmount(struct vfs *afsp, AFS_UCRED *credp)
+afs_unmount(struct vfs *afsp, afs_ucred_t *credp)
#endif
{
AFS_GLOCK();
}
int
-afs_sync(struct vfs *afsp, short flags, AFS_UCRED *credp)
+afs_sync(struct vfs *afsp, short flags, afs_ucred_t *credp)
{
return 0;
}
* re-obtained.
*/
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
AFS_GUNLOCK();
#if defined(AFS_SUN56_ENV)
* Locking: No lock is held, not even the global lock.
*/
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
extern int afs_pvn_vptrunc;
* be called first, since it causes a pagein.
*/
void
-osi_VM_PreTruncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_PreTruncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
page_t *pp;
int pageOffset = (alen & PAGEOFFSET);
* Pageins are blocked (activeV is raised).
*/
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
/*
* It's OK to specify afs_putapage here, even though we aren't holding
int
afs_addmap(register struct vnode *avp, offset_t offset, struct as *asp,
caddr_t addr, int length, int prot, int maxprot, int flags,
- AFS_UCRED *credp)
+ afs_ucred_t *credp)
{
/* XXX What should we do here?? XXX */
return (0);
int
afs_delmap(register struct vnode *avp, offset_t offset, struct as *asp,
caddr_t addr, int length, int prot, int maxprot, int flags,
- AFS_UCRED *credp)
+ afs_ucred_t *credp)
{
/* XXX What should we do here?? XXX */
return (0);
#ifdef AFS_SUN510_ENV
int
afs_vmread(register struct vnode *avp, struct uio *auio, int ioflag,
- AFS_UCRED *acred, caller_context_t *ct)
+ afs_ucred_t *acred, caller_context_t *ct)
#else
int
afs_vmread(register struct vnode *avp, struct uio *auio, int ioflag,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#endif
{
register int code;
#ifdef AFS_SUN510_ENV
int
afs_vmwrite(register struct vnode *avp, struct uio *auio, int ioflag,
- AFS_UCRED *acred, caller_context_t *ct)
+ afs_ucred_t *acred, caller_context_t *ct)
#else
int
afs_vmwrite(register struct vnode *avp, struct uio *auio, int ioflag,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#endif
{
register int code;
int
afs_getpage(struct vnode *vp, offset_t off, u_int len, u_int *protp,
struct page *pl[], u_int plsz, struct seg *seg, caddr_t addr,
- enum seg_rw rw, AFS_UCRED *acred)
+ enum seg_rw rw, afs_ucred_t *acred)
{
register afs_int32 code = 0;
AFS_STATCNT(afs_getpage);
#if defined(AFS_SUN56_ENV)
afs_GetOnePage(struct vnode *vp, u_offset_t off, u_int alen, u_int *protp,
struct page *pl[], u_int plsz, struct seg *seg, caddr_t addr,
- enum seg_rw rw, AFS_UCRED *acred)
+ enum seg_rw rw, afs_ucred_t *acred)
#else
afs_GetOnePage(struct vnode *vp, u_int off, u_int alen, u_int *protp,
struct page *pl[], u_int plsz, struct seg *seg, caddr_t addr,
- enum seg_rw rw, AFS_UCRED *acred)
+ enum seg_rw rw, afs_ucred_t *acred)
#endif
{
register struct page *page;
int
afs_putpage(struct vnode *vp, offset_t off, u_int len, int flags,
- AFS_UCRED *cred)
+ afs_ucred_t *cred)
{
struct vcache *avc;
struct page *pages;
int
#if defined(AFS_SUN58_ENV)
afs_putapage(struct vnode *vp, struct page *pages, u_offset_t * offp,
- size_t * lenp, int flags, AFS_UCRED *credp)
+ size_t * lenp, int flags, afs_ucred_t *credp)
#elif defined(AFS_SUN56_ENV)
afs_putapage(struct vnode *vp, struct page *pages, u_offset_t * offp,
- u_int * lenp, int flags, AFS_UCRED *credp)
+ u_int * lenp, int flags, afs_ucred_t *credp)
#else
afs_putapage(struct vnode *vp, struct page *pages, u_int * offp,
- u_int * lenp, int flags, AFS_UCRED *credp)
+ u_int * lenp, int flags, afs_ucred_t *credp)
#endif
{
struct buf *tbuf;
int
afs_nfsrdwr(register struct vcache *avc, struct uio *auio, enum uio_rw arw,
- int ioflag, AFS_UCRED *acred)
+ int ioflag, afs_ucred_t *acred)
{
register afs_int32 code;
afs_int32 code2;
}
int
-afs_map(struct vnode *vp, offset_t off, struct as *as, caddr_t *addr, u_int len, u_char prot, u_char maxprot, u_int flags, AFS_UCRED *cred)
+afs_map(struct vnode *vp, offset_t off, struct as *as, caddr_t *addr, u_int len, u_char prot, u_char maxprot, u_int flags, afs_ucred_t *cred)
{
struct segvn_crargs crargs;
register afs_int32 code;
int
#ifdef AFS_SUN511_ENV
afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register AFS_UCRED *credp, caller_context_t *ct)
+ register afs_ucred_t *credp, caller_context_t *ct)
#else
afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register AFS_UCRED *credp)
+ register afs_ucred_t *credp)
#endif /* AFS_SUN511_ENV */
{
AFS_STATCNT(afs_cntl);
int
#ifdef AFS_SUN59_ENV
afs_frlock(struct vnode *vnp, int cmd, struct flock64 *ap, int flag,
- offset_t off, struct flk_callback *flkcb, AFS_UCRED *credp)
+ offset_t off, struct flk_callback *flkcb, afs_ucred_t *credp)
#elif defined(AFS_SUN56_ENV)
afs_frlock(struct vnode *vnp, int cmd, struct flock64 *ap, int flag,
- offset_t off, AFS_UCRED *credp)
+ offset_t off, afs_ucred_t *credp)
#else
afs_frlock(struct vnode *vnp, int cmd, struct flock *ap, int flag,
- offset_t off, AFS_UCRED *credp)
+ offset_t off, afs_ucred_t *credp)
#endif
{
register afs_int32 code = 0;
int
#if defined(AFS_SUN56_ENV)
afs_space(struct vnode *vnp, int cmd, struct flock64 *ap, int flag,
- offset_t off, AFS_UCRED *credp)
+ offset_t off, afs_ucred_t *credp)
#else
afs_space(struct vnode *vnp, int cmd, struct flock *ap, int flag,
- offset_t off, AFS_UCRED *credp)
+ offset_t off, afs_ucred_t *credp)
#endif
{
register afs_int32 code = EINVAL;
#ifdef AFS_GLOBAL_SUNLOCK
extern int gafs_open(register struct vcache **avcp, afs_int32 aflags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_close(register struct vcache *avc, afs_int32 aflags,
- int count, offset_t offset, AFS_UCRED *acred);
+ int count, offset_t offset, afs_ucred_t *acred);
extern int afs_ioctl(struct vnode *vnp, int com, int arg, int flag,
cred_t *credp, int *rvalp);
extern int gafs_access(register struct vcache *avc, register afs_int32 amode,
- int flags, AFS_UCRED *acred);
+ int flags, afs_ucred_t *acred);
extern int gafs_getattr(register struct vcache *avc,
register struct vattr *attrs, int flags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_setattr(register struct vcache *avc,
register struct vattr *attrs, int flags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_lookup(register struct vcache *adp, char *aname,
register struct vcache **avcp, struct pathname *pnp,
- int flags, struct vnode *rdir, AFS_UCRED *acred);
+ int flags, struct vnode *rdir, afs_ucred_t *acred);
extern int gafs_remove(register struct vcache *adp, char *aname,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_link(register struct vcache *adp, register struct vcache *avc,
- char *aname, AFS_UCRED *acred);
+ char *aname, afs_ucred_t *acred);
extern int gafs_rename(register struct vcache *aodp, char *aname1,
register struct vcache *andp, char *aname2,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_symlink(register struct vcache *adp, char *aname,
struct vattr *attrs, register char *atargetName,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_rmdir(register struct vcache *adp, char *aname,
- struct vnode *cdirp, AFS_UCRED *acred);
+ struct vnode *cdirp, afs_ucred_t *acred);
extern int gafs_mkdir(register struct vcache *adp, char *aname,
struct vattr *attrs, register struct vcache **avcp,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int
#ifdef AFS_SUN53_ENV
-gafs_fsync(register struct vcache *avc, int flag, AFS_UCRED *acred);
+gafs_fsync(register struct vcache *avc, int flag, afs_ucred_t *acred);
#else
-gafs_fsync(register struct vcache *avc, AFS_UCRED *acred);
+gafs_fsync(register struct vcache *avc, afs_ucred_t *acred);
#endif
extern int gafs_readlink(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_readdir(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred, int *eofp);
+ afs_ucred_t *acred, int *eofp);
extern void gafs_inactive(register struct vcache *avc,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int gafs_fid(struct vcache *avc, struct fid **fidpp);
extern int gafs_create(register struct vcache *adp, char *aname,
struct vattr *attrs, enum vcexcl aexcl, int amode,
- struct vcache **avcp, AFS_UCRED *acred);
+ struct vcache **avcp, afs_ucred_t *acred);
#ifdef AFS_SUN511_ENV
extern int afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register AFS_UCRED *credp, caller_context_t *ct);
+ register afs_ucred_t *credp, caller_context_t *ct);
#else
extern int afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register AFS_UCRED *credp);
+ register afs_ucred_t *credp);
#endif /* AFS_SUN511_ENV */
#if defined(AFS_SUN511_ENV)
int
gafs_open(register struct vcache **avcp, afs_int32 aflags,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
gafs_close(register struct vcache *avc, afs_int32 aflags, int count,
- offset_t offset, AFS_UCRED *acred)
+ offset_t offset, afs_ucred_t *acred)
{
register int code;
int
gafs_getattr(register struct vcache *avc, register struct vattr *attrs,
- int flags, AFS_UCRED *acred)
+ int flags, afs_ucred_t *acred)
{
register int code;
int
gafs_setattr(register struct vcache *avc, register struct vattr *attrs,
- int flags, AFS_UCRED *acred)
+ int flags, afs_ucred_t *acred)
{
register int code;
int
gafs_access(register struct vcache *avc, register afs_int32 amode, int flags,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
gafs_lookup(register struct vcache *adp, char *aname,
register struct vcache **avcp, struct pathname *pnp, int flags,
- struct vnode *rdir, AFS_UCRED *acred)
+ struct vnode *rdir, afs_ucred_t *acred)
{
register int code;
int
gafs_create(register struct vcache *adp, char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vcache **avcp,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
}
int
-gafs_remove(register struct vcache *adp, char *aname, AFS_UCRED *acred)
+gafs_remove(register struct vcache *adp, char *aname, afs_ucred_t *acred)
{
register int code;
int
gafs_link(register struct vcache *adp, register struct vcache *avc,
- char *aname, AFS_UCRED *acred)
+ char *aname, afs_ucred_t *acred)
{
register int code;
int
gafs_rename(register struct vcache *aodp, char *aname1,
register struct vcache *andp, char *aname2,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
gafs_mkdir(register struct vcache *adp, char *aname, struct vattr *attrs,
- register struct vcache **avcp, AFS_UCRED *acred)
+ register struct vcache **avcp, afs_ucred_t *acred)
{
register int code;
int
gafs_rmdir(register struct vcache *adp, char *aname, struct vnode *cdirp,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register int code;
int
gafs_readdir(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred, int *eofp)
+ afs_ucred_t *acred, int *eofp)
{
register int code;
int
gafs_symlink(register struct vcache *adp, char *aname, struct vattr *attrs,
- register char *atargetName, AFS_UCRED *acred)
+ register char *atargetName, afs_ucred_t *acred)
{
register int code;
int
-gafs_readlink(register struct vcache *avc, struct uio *auio, AFS_UCRED *acred)
+gafs_readlink(register struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
{
register int code;
int
#ifdef AFS_SUN53_ENV
-gafs_fsync(register struct vcache *avc, int flag, AFS_UCRED *acred)
+gafs_fsync(register struct vcache *avc, int flag, afs_ucred_t *acred)
#else
-gafs_fsync(register struct vcache *avc, AFS_UCRED *acred)
+gafs_fsync(register struct vcache *avc, afs_ucred_t *acred)
#endif
{
register int code;
}
int
-afs_inactive(struct vcache *avc, AFS_UCRED *acred)
+afs_inactive(struct vcache *avc, afs_ucred_t *acred)
{
struct vnode *vp = AFSTOV(avc);
if (afs_shuttingdown)
}
void
-gafs_inactive(register struct vcache *avc, AFS_UCRED *acred)
+gafs_inactive(register struct vcache *avc, afs_ucred_t *acred)
{
AFS_GLOCK();
(void)afs_inactive(avc, acred);
}
void
-osi_FlushPages(register struct vcache *avc, AFS_UCRED *credp)
+osi_FlushPages(register struct vcache *avc, afs_ucred_t *credp)
{
ObtainSharedLock(&avc->lock, 555);
if ((hcmp((avc->f.m.DataVersion), (avc->mapDV)) <= 0)
}
static int
-afs_getgroups(AFS_UCRED *cred, gid_t * gidset)
+afs_getgroups(afs_ucred_t *cred, gid_t * gidset)
{
int ngrps, savengrps;
gid_t *gp;
static int
-afs_setgroups(AFS_UCRED **cred, int ngroups, gid_t * gidset,
+afs_setgroups(afs_ucred_t **cred, int ngroups, gid_t * gidset,
int change_parent)
{
gid_t *gp;
if (ngroups > NGROUPS_MAX)
return EINVAL;
if (!change_parent)
- *cred = (AFS_UCRED *)crcopy(*cred);
+ *cred = (afs_ucred_t *)crcopy(*cred);
(*cred)->cr_ngroups = ngroups;
gp = (*cred)->cr_groups;
while (ngroups--)
#define OSI_WAITHASH_SIZE 128 /* must be power of two */
#define MAX_HOSTADDR 32
-#define AFS_UCRED struct usr_ucred
+/* XXX
+ *
+ * UKERNEL cannot trivially make use of typedef for afs_ucred_t and
+ * afs_proc_t, as in the present design, the types are already introduced
+ * with incorrect reference, so fall back to preprocessor for now
+ */
-#define AFS_PROC struct usr_proc
+#define afs_ucred_t struct usr_ucred
+#define afs_proc_t struct usr_proc
#define AFS_KALLOC(A) afs_osi_Alloc(A)
#include "afs/afs_stats.h" /* statistics */
void
-osi_VM_Truncate(struct vcache *avc, int alen, AFS_UCRED *acred)
+osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred)
{
return;
}
}
void
-osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred, int sync)
+osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
return;
}
void
-osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp)
+osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
return;
}
}
int
-afs_inactive(struct vcache *avc, AFS_UCRED *acred)
+afs_inactive(struct vcache *avc, afs_ucred_t *acred)
{
if (afs_shuttingdown)
return 0;
#define vattr usr_vattr
#define buf usr_buf
#define statfs usr_statfs
-#define ucred usr_ucred
+/* #define ucred usr_ucred */
#define user usr_user
-#define proc usr_proc
+/* #define proc usr_proc */
#define file usr_file
#define dirent usr_dirent
#define flock usr_flock
((sizeof (struct usr_dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3))
struct vcache;
-#define AFS_UCRED struct usr_ucred
+#define afs_ucred_t struct usr_ucred
#define AFS_FLOCK flock
struct usr_vnodeops {
- int (*vn_open) (struct vcache **, afs_int32, AFS_UCRED *);
- int (*vn_close) (struct vcache *, afs_int32, AFS_UCRED *);
+ int (*vn_open) (struct vcache **, afs_int32, afs_ucred_t *);
+ int (*vn_close) (struct vcache *, afs_int32, afs_ucred_t *);
int (*vn_rdwr) (struct usr_vnode *avc, struct usr_uio *uio,
int rw, int io, struct usr_ucred *cred);
int (*vn_ioctl) (void);
int (*vn_select) (void);
- int (*vn_getattr) (struct vcache *avc, struct vattr *, AFS_UCRED *);
- int (*vn_setattr) (struct vcache *avc, struct vattr *, AFS_UCRED *);
- int (*vn_access) (struct vcache *avc, afs_int32, AFS_UCRED *);
+ int (*vn_getattr) (struct vcache *avc, struct vattr *, afs_ucred_t *);
+ int (*vn_setattr) (struct vcache *avc, struct vattr *, afs_ucred_t *);
+ int (*vn_access) (struct vcache *avc, afs_int32, afs_ucred_t *);
int (*vn_lookup) (struct vcache *adp, char *, struct vcache **,
- AFS_UCRED *, int);
+ afs_ucred_t *, int);
int (*vn_create) (struct vcache *adp, char *, struct vattr *,
- enum vcexcl, int, struct vcache **, AFS_UCRED *);
- int (*vn_remove) (struct vcache *adp, char *, AFS_UCRED *);
+ enum vcexcl, int, struct vcache **, afs_ucred_t *);
+ int (*vn_remove) (struct vcache *adp, char *, afs_ucred_t *);
int (*vn_link) (struct vcache *avc, struct vcache *adp, char *,
- AFS_UCRED *);
+ afs_ucred_t *);
int (*vn_rename) (struct vcache *aodp, char *, struct vcache *, char *,
- AFS_UCRED *);
+ afs_ucred_t *);
int (*vn_mkdir) (struct vcache *adp, char *, struct vattr *,
- struct vcache **, AFS_UCRED *);
- int (*vn_rmdir) (struct vcache *adp, char *, AFS_UCRED *);
- int (*vn_readdir) (struct vcache *avc, struct uio *, AFS_UCRED *);
+ struct vcache **, afs_ucred_t *);
+ int (*vn_rmdir) (struct vcache *adp, char *, afs_ucred_t *);
+ int (*vn_readdir) (struct vcache *avc, struct uio *, afs_ucred_t *);
int (*vn_symlink) (struct vcache *adp, char *, struct vattr *, char *,
- AFS_UCRED *);
- int (*vn_readlink) (struct vcache *avc, struct uio *, AFS_UCRED *);
- int (*vn_fsync) (struct vcache *avc, AFS_UCRED *);
- int (*vn_inactive) (struct vcache *avc, AFS_UCRED *acred);
+ afs_ucred_t *);
+ int (*vn_readlink) (struct vcache *avc, struct uio *, afs_ucred_t *);
+ int (*vn_fsync) (struct vcache *avc, afs_ucred_t *);
+ int (*vn_inactive) (struct vcache *avc, afs_ucred_t *acred);
int (*vn_bmap) (void);
int (*vn_strategy) (void);
int (*vn_bread) (void);
int (*vn_brelse) (void);
int (*vn_lockctl) (struct vcache *, struct AFS_FLOCK *, int,
- AFS_UCRED *);
+ afs_ucred_t *);
int (*vn_fid) (struct vcache *avc, struct fid **);
};
#if defined(AFS_SUN5_ENV) || (defined(AFS_SGI_ENV) && !defined(AFS_SGI65_ENV))
int
afs_access(OSI_VC_DECL(avc), register afs_int32 amode, int flags,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
int
afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#endif
{
register afs_int32 code;
*/
int
afs_getRights(OSI_VC_DECL(avc), register afs_int32 arights,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register afs_int32 code;
struct vrequest treq;
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
int
afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, int flags,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
int
-afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, AFS_UCRED *acred)
+afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, afs_ucred_t *acred)
#endif
{
afs_int32 code;
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
int
afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs, int flags,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
int
afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#endif
{
struct vrequest treq;
#ifdef AFS_SGI64_ENV
int
afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, int flags,
- int amode, struct vcache **avcp, AFS_UCRED *acred)
+ int amode, struct vcache **avcp, afs_ucred_t *acred)
#else /* AFS_SGI64_ENV */
int
afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vcache **avcp,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#endif /* AFS_SGI64_ENV */
{
afs_int32 origCBs, origZaps, finalZaps;
int
afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
- register struct vcache **avcp, AFS_UCRED *acred)
+ register struct vcache **avcp, afs_ucred_t *acred)
{
struct vrequest treq;
register afs_int32 code;
/* don't set CDirty in here because RPC is called synchronously */
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
-afs_rmdir(OSI_VC_DECL(adp), char *aname, AFS_UCRED *acred)
+afs_rmdir(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred)
#endif
{
struct vrequest treq;
flid_t flid;
get_current_flid(&flid);
# else
- AFS_PROC *procp = OSI_GET_CURRENT_PROCP();
+ afs_proc_t *procp = OSI_GET_CURRENT_PROCP();
# endif
if (slp) {
lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp, int clid)
{
# if !defined(AFS_AIX32_ENV)
- AFS_PROC *procp = u.u_procp;
+ afs_proc_t *procp = u.u_procp;
# endif
if (slp) {
#else
#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#ifdef AFS_SGI64_ENV
- AFS_PROC *procp = curprocp;
+ afs_proc_t *procp = curprocp;
#else /* AFS_SGI64_ENV */
- AFS_PROC *procp = u.u_procp;
+ afs_proc_t *procp = u.u_procp;
#endif /* AFS_SGI64_ENV */
#endif
#endif
#ifdef AFS_OSF_ENV
int afs_lockctl(struct vcache * avc, struct eflock * af, int flag,
- AFS_UCRED * acred, pid_t clid, off_t offset)
+ afs_ucred_t * acred, pid_t clid, off_t offset)
#elif defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
- AFS_UCRED * acred, pid_t clid)
+ afs_ucred_t * acred, pid_t clid)
#else
u_int clid = 0;
int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
- AFS_UCRED * acred)
+ afs_ucred_t * acred)
#endif
{
struct vrequest treq;
extern struct fileops afs_fileops;
int
-afs_xflock(AFS_PROC *p, void *args, int *retval)
+afs_xflock(afs_proc_t *p, void *args, int *retval)
#else /* AFS_OSF_ENV */
int
afs_xflock(void)
int
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#endif
{
struct vrequest treq;
int
#ifdef AFS_OSF_ENV
-afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, AFS_UCRED *acred, int opflag, int wantparent)
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acred, int opflag, int wantparent)
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct pathname *pnp, int flags, struct vnode *rdir, AFS_UCRED *acred)
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct pathname *pnp, int flags, struct vnode *rdir, afs_ucred_t *acred)
#elif defined(UKERNEL)
-afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, AFS_UCRED *acred, int flags)
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acred, int flags)
#else
-afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, AFS_UCRED *acred)
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acred)
#endif
{
struct vrequest treq;
int
#ifdef AFS_SGI64_ENV
afs_open(bhv_desc_t * bhv, struct vcache **avcp, afs_int32 aflags,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
-afs_open(struct vcache **avcp, afs_int32 aflags, AFS_UCRED *acred)
+afs_open(struct vcache **avcp, afs_int32 aflags, afs_ucred_t *acred)
#endif
{
register afs_int32 code;
/* Forward declarations */
void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
- AFS_UCRED *acred, struct vrequest *areq);
+ afs_ucred_t *acred, struct vrequest *areq);
int
afs_MemRead(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred, daddr_t albn, struct buf **abpp,
+ afs_ucred_t *acred, daddr_t albn, struct buf **abpp,
int noLock)
{
afs_size_t totalLength;
*/
void
afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
- AFS_UCRED *acred, struct vrequest *areq)
+ afs_ucred_t *acred, struct vrequest *areq)
{
register struct dcache *tdc;
afs_size_t offset;
int
afs_UFSRead(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred, daddr_t albn, struct buf **abpp,
+ afs_ucred_t *acred, daddr_t albn, struct buf **abpp,
int noLock)
{
afs_size_t totalLength;
int
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_readdir(OSI_VC_DECL(avc), struct uio *auio, AFS_UCRED *acred,
+afs_readdir(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred,
int *eofp)
#else
#if defined(AFS_HPUX100_ENV)
-afs_readdir2(OSI_VC_DECL(avc), struct uio *auio, AFS_UCRED *acred)
+afs_readdir2(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred)
#else
-afs_readdir(OSI_VC_DECL(avc), struct uio *auio, AFS_UCRED *acred)
+afs_readdir(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred)
#endif
#endif
{
#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
#ifdef AFS_OSF_ENV
int
-afs1_readdir(struct vcache *avc, struct uio *auio, AFS_UCRED *acred,
+afs1_readdir(struct vcache *avc, struct uio *auio, afs_ucred_t *acred,
int *eofp)
#else
int
-afs1_readdir(struct vcache *avc, struct uio *auio, AFS_UCRED *acred)
+afs1_readdir(struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
#endif
{
struct vrequest treq;
int
afsremove(register struct vcache *adp, register struct dcache *tdc,
- register struct vcache *tvc, char *aname, AFS_UCRED *acred,
+ register struct vcache *tvc, char *aname, afs_ucred_t *acred,
struct vrequest *treqp)
{
register afs_int32 code = 0;
/* Note that we don't set CDirty here, this is OK because the unlink
* RPC is called synchronously */
int
-afs_remove(OSI_VC_DECL(adp), char *aname, AFS_UCRED *acred)
+afs_remove(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred)
{
struct vrequest treq;
register struct dcache *tdc;
int
afs_remunlink(register struct vcache *avc, register int doit)
{
- AFS_UCRED *cred;
+ afs_ucred_t *cred;
char *unlname;
struct vcache *adp;
struct vrequest treq;
int
afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
- char *aname2, AFS_UCRED *acred, struct vrequest *areq)
+ char *aname2, afs_ucred_t *acred, struct vrequest *areq)
{
register struct afs_conn *tc;
register afs_int32 code = 0;
int
#if defined(AFS_SGI_ENV)
-afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, char *aname2, struct pathname *npnp, AFS_UCRED *acred)
+afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, char *aname2, struct pathname *npnp, afs_ucred_t *acred)
#else
-afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, char *aname2, AFS_UCRED *acred)
+afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, char *aname2, afs_ucred_t *acred)
#endif
{
register afs_int32 code;
#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-int afs_ustrategy(register struct buf *abp, AFS_UCRED *credp)
+int afs_ustrategy(register struct buf *abp, afs_ucred_t *credp)
#else
int afs_ustrategy(register struct buf *abp)
#endif
#ifdef AFS_AIX41_ENV
struct ucred *credp;
#else
- AFS_UCRED *credp = u.u_cred;
+ afs_ucred_t *credp = u.u_cred;
#endif
#endif
/* don't set CDirty in here because RPC is called synchronously */
int
afs_symlink(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
- char *atargetName, AFS_UCRED *acred)
+ char *atargetName, afs_ucred_t *acred)
{
afs_uint32 now = 0;
struct vrequest treq;
}
int
-afs_readlink(OSI_VC_DECL(avc), struct uio *auio, AFS_UCRED *acred)
+afs_readlink(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred)
{
register afs_int32 code;
struct vrequest treq;
avc->opens--;
avc->execsOrWriters--;
AFS_RELE(AFSTOV(avc)); /* VN_HOLD at set CCore(afs_FakeClose) */
- crfree((AFS_UCRED *)avc->linkData); /* "crheld" in afs_FakeClose */
+ crfree((afs_ucred_t *)avc->linkData); /* "crheld" in afs_FakeClose */
avc->linkData = NULL;
}
int
afs_MemWrite(register struct vcache *avc, struct uio *auio, int aio,
- AFS_UCRED *acred, int noLock)
+ afs_ucred_t *acred, int noLock)
{
afs_size_t totalLength;
afs_size_t transferLength;
/* called on writes */
int
afs_UFSWrite(register struct vcache *avc, struct uio *auio, int aio,
- AFS_UCRED *acred, int noLock)
+ afs_ucred_t *acred, int noLock)
{
afs_size_t totalLength;
afs_size_t transferLength;
int
#if defined(AFS_SGI65_ENV)
afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#elif defined(AFS_SGI64_ENV)
afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose,
- off_t offset, AFS_UCRED *acred, struct flid *flp)
+ off_t offset, afs_ucred_t *acred, struct flid *flp)
#elif defined(AFS_SGI_ENV)
afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose
- off_t offset, AFS_UCRED *acred)
+ off_t offset, afs_ucred_t *acred)
#elif defined(AFS_SUN5_ENV)
afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count, offset_t offset,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
#else
-afs_close(OSI_VC_DECL(avc), afs_int32 aflags, AFS_UCRED *acred)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, afs_ucred_t *acred)
#endif
{
register afs_int32 code;
int
#ifdef AFS_OSF_ENV
-afs_fsync(OSI_VC_DECL(avc), int fflags, AFS_UCRED *acred, int waitfor)
+afs_fsync(OSI_VC_DECL(avc), int fflags, afs_ucred_t *acred, int waitfor)
#else /* AFS_OSF_ENV */
#if defined(AFS_SGI_ENV) || defined(AFS_SUN53_ENV)
-afs_fsync(OSI_VC_DECL(avc), int flag, AFS_UCRED *acred
+afs_fsync(OSI_VC_DECL(avc), int flag, afs_ucred_t *acred
#ifdef AFS_SGI65_ENV
, off_t start, off_t stop
#endif /* AFS_SGI65_ENV */
)
#else /* !OSF && !SUN53 && !SGI */
-afs_fsync(OSI_VC_DECL(avc), AFS_UCRED *acred)
+afs_fsync(OSI_VC_DECL(avc), afs_ucred_t *acred)
#endif
#endif
{
#define BUWAIT 4 /* someone is waiting for BUVALID */
struct brequest {
struct vcache *vc; /* vnode to use, with vrefcount bumped */
- AFS_UCRED *cred; /* credentials to use for operation */
+ afs_ucred_t *cred; /* credentials to use for operation */
afs_size_t size_parm[BPARMS]; /* random parameters */
void *ptr_parm[BPARMS]; /* pointer parameters */
afs_int32 code; /* return code */
#endif /* AFS_SGI_ENV */
afs_int32 vc_error; /* stash write error for this vnode. */
int xlatordv; /* Used by nfs xlator */
- AFS_UCRED *uncred;
+ afs_ucred_t *uncred;
int asynchrony; /* num kbytes to store behind */
#ifdef AFS_SUN5_ENV
short multiPage; /* count of multi-page getpages in progress */
* existing VM pages for the file. We keep track of the number of
* times we go back and forth from caching to bypass.
*/
-void afs_TransitionToBypass(register struct vcache *avc, register AFS_UCRED *acred, int aflags)
+void afs_TransitionToBypass(register struct vcache *avc, register afs_ucred_t *acred, int aflags)
{
afs_int32 code;
* throw out any existing VM pages for the file. We keep track of
* the number of times we go back and forth from caching to bypass.
*/
-void afs_TransitionToCaching(register struct vcache *avc, register AFS_UCRED *acred, int aflags)
+void afs_TransitionToCaching(register struct vcache *avc, register afs_ucred_t *acred, int aflags)
{
int resetDesire = 0;
int setManual = 0;
afs_int32
afs_ReadNoCache(register struct vcache *avc,
register struct nocache_read_request *bparms,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
afs_int32 code;
afs_int32 bcnt;
/* Cannot have static linkage--called from BPrefetch (afs_daemons) */
afs_int32
afs_PrefetchNoCache(register struct vcache *avc,
- register AFS_UCRED *acred,
+ register afs_ucred_t *acred,
register struct nocache_read_request *bparms)
{
uio_t *auio;
extern int cache_bypass_strategy;
extern int cache_bypass_threshold;
-void afs_TransitionToBypass(register struct vcache *, register AFS_UCRED *, int);
-void afs_TransitionToCaching(register struct vcache *, register AFS_UCRED *, int);
+void afs_TransitionToBypass(register struct vcache *, register afs_ucred_t *, int);
+void afs_TransitionToCaching(register struct vcache *, register afs_ucred_t *, int);
/* Cache strategy permits vnode transition between caching and no-cache--
* currently, this means LARGE_FILES_BYPASS_CACHE. Currently, no pioctl permits
/* dispatch a no-cache read request */
afs_int32
afs_ReadNoCache(register struct vcache *avc, register struct nocache_read_request *bparms,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
/* no-cache prefetch routine */
afs_int32
-afs_PrefetchNoCache(register struct vcache *avc, register AFS_UCRED *acred,
+afs_PrefetchNoCache(register struct vcache *avc, register afs_ucred_t *acred,
struct nocache_read_request *bparms);
afs_int32 len);
int (*close) (struct osi_file * fp);
int (*vread) (register struct vcache * avc, struct uio * auio,
- AFS_UCRED * acred, daddr_t albn, struct buf ** abpp,
+ afs_ucred_t * acred, daddr_t albn, struct buf ** abpp,
int noLock);
int (*vwrite) (register struct vcache * avc, struct uio * auio, int aio,
- AFS_UCRED * acred, int noLock);
+ afs_ucred_t * acred, int noLock);
struct dcache *(*GetDSlot) (register afs_int32 aslot,
register struct dcache * tmpdc);
struct volume *(*GetVolSlot) (void);
struct brequest *
afs_BQueue(register short aopcode, register struct vcache *avc,
- afs_int32 dontwait, afs_int32 ause, AFS_UCRED *acred,
+ afs_int32 dontwait, afs_int32 ause, afs_ucred_t *acred,
afs_size_t asparm0, afs_size_t asparm1, void *apparm0)
{
register int i;
}
if (tb->cred) {
crfree(tb->cred);
- tb->cred = (AFS_UCRED *)0;
+ tb->cred = (afs_ucred_t *)0;
}
afs_BRelease(tb); /* this grabs and releases afs_xbrs lock */
MObtainWriteLock(&afs_xbrs, 305);
* Both pvnLock and lock are write held.
*/
void
-afs_TryToSmush(register struct vcache *avc, AFS_UCRED *acred, int sync)
+afs_TryToSmush(register struct vcache *avc, afs_ucred_t *acred, int sync)
{
register struct dcache *tdc;
register int index;
afs_int32 afs_ConflictPolicy = SERVER_WINS;
-static void afs_DisconDiscardAllShadows(int, AFS_UCRED *);
+static void afs_DisconDiscardAllShadows(int, afs_ucred_t *);
void afs_DbgListDirEntries(struct VenusFid *afid);
* - Reorder vhash and dcaches in their hashes, using the newly acquired fid.
*/
int afs_ProcessOpCreate(struct vcache *avc, struct vrequest *areq,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
char *tname = NULL, *ttargetName = NULL;
struct AFSStoreStatus InStatus;
* \note For now, it's the request from the PDiscon pioctl.
*
*/
-int afs_ResyncDisconFiles(struct vrequest *areq, AFS_UCRED *acred)
+int afs_ResyncDisconFiles(struct vrequest *areq, afs_ucred_t *acred)
{
struct afs_conn *tc;
struct vcache *tvc;
*/
static void
-afs_DisconDiscardAllShadows(int squash, AFS_UCRED *acred) {
+afs_DisconDiscardAllShadows(int squash, afs_ucred_t *acred) {
struct vcache *tvc;
while (!QEmpty(&afs_disconShadow)) {
*
*/
void
-afs_DisconDiscardAll(AFS_UCRED *acred) {
+afs_DisconDiscardAll(afs_ucred_t *acred) {
struct vcache *tvc;
ObtainWriteLock(&afs_disconDirtyLock, 717);
* Remove a temporary symlink entry from /afs.
*/
int
-afs_DynrootVOPRemove(struct vcache *avc, AFS_UCRED *acred, char *aname)
+afs_DynrootVOPRemove(struct vcache *avc, afs_ucred_t *acred, char *aname)
{
struct afs_dynSymlink **tpps;
struct afs_dynSymlink *tps;
* Create a temporary symlink entry in /afs.
*/
int
-afs_DynrootVOPSymlink(struct vcache *avc, AFS_UCRED *acred,
+afs_DynrootVOPSymlink(struct vcache *avc, afs_ucred_t *acred,
char *aname, char *atargetName)
{
struct afs_dynSymlink *tps;
static void
afs_procsize_init(void)
{
- AFS_PROC *p0; /* pointer to process 0 */
- AFS_PROC *pN; /* pointer to process 0's first child */
+ afs_proc_t *p0; /* pointer to process 0 */
+ afs_proc_t *pN; /* pointer to process 0's first child */
#ifdef AFS_AIX51_ENV
struct pvproc *pV;
#endif
ptrdiff_t pN_offset;
int procsize;
- p0 = (AFS_PROC *)v.vb_proc;
+ p0 = (afs_proc_t *)v.vb_proc;
if (!p0) {
afs_gcpags = AFS_GCPAGS_EPROC0;
return;
*/
int
afs_nfsclient_reqhandler(struct afs_exporter *exporter,
- AFS_UCRED **cred,
+ afs_ucred_t **cred,
afs_int32 host, afs_int32 *pagparam,
struct afs_exporter **outexporter)
{
*/
int
afs_iauth_verify(long id, fsid_t * fsidp, long host, int uid,
- AFS_UCRED *credp, struct exportinfo *exp)
+ afs_ucred_t *credp, struct exportinfo *exp)
{
int code;
struct nfsclientpag *nfs_pag;
int
afs_nfs2_dispatcher(int type, afs_int32 which, char *argp,
struct exportinfo **expp, struct svc_req *rp,
- AFS_UCRED *crp)
+ afs_ucred_t *crp)
{
afs_int32 call = 0;
afs_int32 code = 0;
afs_nfs2_getattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_setattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_SETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_lookup(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_LOOKUP, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_readlink(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_READLINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_read(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_READ, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_write(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_WRITE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_create(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_CREATE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_remove(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_REMOVE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_rename(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_RENAME, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_link(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_LINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_symlink(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_SYMLINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_mkdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_MKDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_rmdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_RMDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_readdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_READDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_statfs(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_STATFS, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_acl2_getacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_setacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_SETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_getattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_access(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_ACCESS, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETXATTRDIR, (char *)args, &exp, rp, crp);
if (call > 1)
int
afs_nfs3_dispatcher(int type, afs_int32 which, char *argp,
struct exportinfo **expp, struct svc_req *rp,
- AFS_UCRED *crp)
+ afs_ucred_t *crp)
{
afs_int32 call = 0;
afs_int32 code = 0;
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_SETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_LOOKUP, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_ACCESS, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READLINK, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs3_dispatcher(0, NFSPROC3_READ, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_WRITE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_CREATE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_MKDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_SYMLINK, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_MKNOD, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_REMOVE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_RMDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_RENAME, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs3_dispatcher(0, NFSPROC3_LINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READDIRPLUS, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_FSSTAT, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_FSINFO, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_PATHCONF, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_COMMIT, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_getacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_GETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_setacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_SETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- AFS_UCRED *svcred = curthread->t_cred;
- curthread->t_cred = (AFS_UCRED *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_GETXATTRDIR, (char *)args, &exp, rp, crp);
if (call > 1)
flid_t osi_flid;
#endif
-AFS_UCRED *afs_osi_credp;
+afs_ucred_t *afs_osi_credp;
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
kmutex_t afs_global_lock;
#if defined(AFS_XBSD_ENV) && !defined(AFS_FBSD50_ENV)
struct lock afs_global_lock;
-AFS_PROC *afs_global_owner;
+afs_proc_t *afs_global_owner;
#endif
#ifdef AFS_FBSD50_ENV
struct mtx afs_global_mtx;
/* Can't just invent one, must use crget() because of mutex */
afs_osi_credp = crdup(osi_curcred());
#else
- memset(&afs_osi_cred, 0, sizeof(AFS_UCRED));
+ memset(&afs_osi_cred, 0, sizeof(afs_ucred_t));
#if defined(AFS_LINUX26_ENV)
afs_osi_cred.cr_group_info = groups_alloc(0);
#endif
/* Declare any structures which use these macros after the OSI implementation
* has had the opportunity to redefine them.
*/
-extern AFS_UCRED afs_osi_cred, *afs_osi_credp;
+extern afs_ucred_t afs_osi_cred, *afs_osi_credp;
#ifndef osi_curcred
#define osi_curcred() (u.u_cred)
void
afs_osi_TraverseProcTable(void)
{
- AFS_PROC *prp;
+ afs_proc_t *prp;
for (prp = practive; prp != NULL; prp = prp->p_next) {
afs_GCPAGs_perproc_func(prp);
}
static int
SGI_ProcScanFunc(proc_t * p, void *arg, int mode)
{
- afs_int32(*perproc_func) (AFS_PROC *) = arg;
+ afs_int32(*perproc_func) (afs_proc_t *) = arg;
int code = 0;
/* we pass in the function pointer for arg,
* mode ==0 for startup call, ==1 for each valid proc,
void
afs_osi_TraverseProcTable(void)
{
- AFS_PROC *p;
+ afs_proc_t *p;
int i;
/*
#ifndef AFS_AIX51_ENV
simple_lock(&proc_tbl_lock);
#endif
- for (p = (AFS_PROC *)v.vb_proc, i = 0; p < max_proc;
- p = (AFS_PROC *)((char *)p + afs_gcpags_procsize), i++) {
+ for (p = (afs_proc_t *)v.vb_proc, i = 0; p < max_proc;
+ p = (afs_proc_t *)((char *)p + afs_gcpags_procsize), i++) {
#ifdef AFS_AIX51_ENV
if (p->p_pvprocp->pv_stat == SNONE)
void
afs_osi_TraverseProcTable(void)
{
- AFS_PROC *p;
+ afs_proc_t *p;
LIST_FOREACH(p, &allproc, p_list) {
if (p->p_stat == SIDL)
continue;
#endif
/* return a pointer (sometimes a static copy ) to the cred for a
- * given AFS_PROC.
+ * given afs_proc_t.
* subsequent calls may overwrite the previously returned value.
*/
#if defined(AFS_SGI65_ENV)
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * p)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * p)
{
return NULL;
}
#elif defined(AFS_HPUX_ENV)
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * p)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * p)
{
if (!p)
return;
* around calls to this function.
*/
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * pproc)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * pproc)
{
- AFS_UCRED *pcred = 0;
+ afs_ucred_t *pcred = 0;
/*
* pointer to process user structure valid in *our*
/* simple_unlock(&proc_tbl_lock); */
if (xm == XMEM_SUCC) {
- static AFS_UCRED cred;
+ static afs_ucred_t cred;
/*
* What locking should we use to protect access to the user
}
#elif defined(AFS_OSF_ENV)
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * pr)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * pr)
{
- AFS_UCRED *rv = NULL;
+ afs_ucred_t *rv = NULL;
if (pr == NULL) {
return NULL;
return rv;
}
#elif defined(AFS_DARWIN80_ENV)
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * pr)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * pr)
{
- AFS_UCRED *rv = NULL;
- static AFS_UCRED cr;
+ afs_ucred_t *rv = NULL;
+ static afs_ucred_t cr;
struct ucred *pcred;
if (pr == NULL) {
return &cr;
}
#elif defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * pr)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * pr)
{
- AFS_UCRED *rv = NULL;
- static AFS_UCRED cr;
+ afs_ucred_t *rv = NULL;
+ static afs_ucred_t cr;
if (pr == NULL) {
return NULL;
}
#elif defined(AFS_LINUX22_ENV)
#if !defined(LINUX_KEYRING_SUPPORT) && (!defined(STRUCT_TASK_HAS_CRED) || defined(EXPORTED_RCU_READ_LOCK))
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * pr)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * pr)
{
- AFS_UCRED *rv = NULL;
- static AFS_UCRED cr;
+ afs_ucred_t *rv = NULL;
+ static afs_ucred_t cr;
if (pr == NULL) {
return NULL;
}
#endif
#else
-const AFS_UCRED *
-afs_osi_proc2cred(AFS_PROC * pr)
+const afs_ucred_t *
+afs_osi_proc2cred(afs_proc_t * pr)
{
- AFS_UCRED *rv = NULL;
+ afs_ucred_t *rv = NULL;
if (pr == NULL) {
return NULL;
static int afs_pag_timewarn = 0;
static int
-afs_pag_sleep(AFS_UCRED **acred)
+afs_pag_sleep(afs_ucred_t **acred)
{
int rv = 0;
}
static int
-afs_pag_wait(AFS_UCRED **acred)
+afs_pag_wait(afs_ucred_t **acred)
{
if (afs_pag_sleep(acred)) {
if (!afs_pag_sleepcnt) {
int
#if defined(AFS_SUN5_ENV)
-afs_setpag(AFS_UCRED **credpp)
+afs_setpag(afs_ucred_t **credpp)
#elif defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_setpag(AFS_PROC *p, void *args, int *retval)
+afs_setpag(afs_proc_t *p, void *args, int *retval)
#else
afs_setpag(void)
#endif
{
#if defined(AFS_SUN5_ENV)
- AFS_UCRED **acred = *credpp;
+ afs_ucred_t **acred = *credpp;
#elif defined(AFS_OBSD_ENV)
- AFS_UCRED **acred = &p->p_ucred;
+ afs_ucred_t **acred = &p->p_ucred;
#else
- AFS_UCRED **acred = NULL;
+ afs_ucred_t **acred = NULL;
#endif
int code = 0;
}
#elif defined(AFS_LINUX20_ENV)
{
- AFS_UCRED *credp = crref();
+ afs_ucred_t *credp = crref();
code = AddPag(genpag(), &credp);
crfree(credp);
}
#elif defined(AFS_DARWIN80_ENV)
{
- AFS_UCRED *credp = kauth_cred_proc_ref(p);
+ afs_ucred_t *credp = kauth_cred_proc_ref(p);
code = AddPag(p, genpag(), &credp);
crfree(credp);
}
#elif defined(AFS_DARWIN_ENV)
{
- AFS_UCRED *credp = crdup(p->p_cred->pc_ucred);
+ afs_ucred_t *credp = crdup(p->p_cred->pc_ucred);
code = AddPag(p, genpag(), &credp);
crfree(credp);
}
*/
int
#if defined(AFS_SUN5_ENV)
-afs_setpag_val(AFS_UCRED **credpp, int pagval)
+afs_setpag_val(afs_ucred_t **credpp, int pagval)
#elif defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_setpag_val(AFS_PROC *p, void *args, int *retval, int pagval)
+afs_setpag_val(afs_proc_t *p, void *args, int *retval, int pagval)
#else
afs_setpag_val(int pagval)
#endif
{
#if defined(AFS_SUN5_ENV)
- AFS_UCRED **acred = *credp;
+ afs_ucred_t **acred = *credp;
#elif defined(AFS_OBSD_ENV)
- AFS_UCRED **acred = &p->p_ucred;
+ afs_ucred_t **acred = &p->p_ucred;
#else
- AFS_UCRED **acred = NULL;
+ afs_ucred_t **acred = NULL;
#endif
int code = 0;
}
#elif defined(AFS_LINUX20_ENV)
{
- AFS_UCRED *credp = crref();
+ afs_ucred_t *credp = crref();
code = AddPag(pagval, &credp);
crfree(credp);
}
afs_getpag_val(void)
{
int pagvalue;
- AFS_UCRED *credp = u.u_cred;
+ afs_ucred_t *credp = u.u_cred;
gid_t gidset0, gidset1;
#ifdef AFS_SUN510_ENV
const gid_t *gids;
/* Note - needs to be available on AIX, others can be static - rework this */
#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
-AddPag(AFS_PROC *p, afs_int32 aval, AFS_UCRED **credpp)
+AddPag(afs_proc_t *p, afs_int32 aval, afs_ucred_t **credpp)
#else
int
-AddPag(afs_int32 aval, AFS_UCRED **credpp)
+AddPag(afs_int32 aval, afs_ucred_t **credpp)
#endif
{
afs_int32 code;
int
-afs_InitReq(register struct vrequest *av, AFS_UCRED *acred)
+afs_InitReq(register struct vrequest *av, afs_ucred_t *acred)
{
#if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS)
int code;
afs_int32
-PagInCred(AFS_UCRED *cred)
+PagInCred(afs_ucred_t *cred)
{
afs_int32 pag;
#if !defined(AFS_LINUX26_ONEGROUP_ENV)
us, of course).
*/
void
-osi_FlushPages(register struct vcache *avc, AFS_UCRED *credp)
+osi_FlushPages(register struct vcache *avc, afs_ucred_t *credp)
{
#ifdef AFS_FBSD70_ENV
int vfslocked;
* Locking: the vcache entry lock is held. It is dropped and re-obtained.
*/
void
-osi_ReleaseVM(struct vcache *avc, AFS_UCRED *acred)
+osi_ReleaseVM(struct vcache *avc, afs_ucred_t *acred)
{
#ifdef AFS_SUN5_ENV
AFS_GUNLOCK();
#ifdef AFS_SUN5_ENV
afs_syscall_pioctl(path, com, cmarg, follow, rvp, credp)
rval_t *rvp;
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
#else
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_syscall_pioctl(path, com, cmarg, follow, credp)
- AFS_UCRED *credp;
+ afs_ucred_t *credp;
#else
afs_syscall_pioctl(path, com, cmarg, follow)
#endif
}
-int afspag_PUnlog(char *ain, afs_int32 ainSize, AFS_UCRED **acred)
+int afspag_PUnlog(char *ain, afs_int32 ainSize, afs_ucred_t **acred)
{
register afs_int32 i;
register struct unixuser *tu;
}
-int afspag_PSetTokens(char *ain, afs_int32 ainSize, AFS_UCRED **acred)
+int afspag_PSetTokens(char *ain, afs_int32 ainSize, afs_ucred_t **acred)
{
afs_int32 i;
register struct unixuser *tu;
if (set_parent_pag) {
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#if defined(AFS_DARWIN_ENV)
- AFS_PROC *p = current_proc(); /* XXX */
+ afs_proc_t *p = current_proc(); /* XXX */
#else
- AFS_PROC *p = curproc; /* XXX */
+ afs_proc_t *p = curproc; /* XXX */
#endif
#ifndef AFS_DARWIN80_ENV
uprintf("Process %d (%s) tried to change pags in PSetTokens\n",
}
-int afspag_PSetSysName(char *ain, afs_int32 ainSize, AFS_UCRED **acred)
+int afspag_PSetSysName(char *ain, afs_int32 ainSize, afs_ucred_t **acred)
{
int setsysname, count, t;
char *cp, *setp;
#define DECL_PIOCTL(x) static int x(struct vcache *avc, int afun, struct vrequest *areq, \
char *ain, char *aout, afs_int32 ainSize, afs_int32 *aoutSize, \
- AFS_UCRED **acred)
+ afs_ucred_t **acred)
/* Prototypes for pioctl routines */
DECL_PIOCTL(PGetFID);
/* Prototypes for private routines */
#ifdef AFS_NEED_CLIENTCONTEXT
static int HandleClientContext(struct afs_ioctl *ablob, int *com,
- AFS_UCRED **acred,
- AFS_UCRED *credp);
+ afs_ucred_t **acred,
+ afs_ucred_t *credp);
#endif
int HandleIoctl(register struct vcache *avc, register afs_int32 acom,
struct afs_ioctl *adata);
int afs_HandlePioctl(struct vnode *avp, afs_int32 acom,
register struct afs_ioctl *ablob, int afollow,
- AFS_UCRED **acred);
+ afs_ucred_t **acred);
static int Prefetch(uparmtype apath, struct afs_ioctl *adata, int afollow,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
typedef int (*pioctlFunction) (struct vcache *, int, struct vrequest *,
char *, char *, afs_int32, afs_int32 *,
- AFS_UCRED **);
+ afs_ucred_t **);
static pioctlFunction VpioctlSw[] = {
PBogus, /* 0 */
{
#elif defined(AFS_OSF_ENV)
int
-afs_xioctl(AFS_PROC *p, void *args, long *retval)
+afs_xioctl(afs_proc_t *p, void *args, long *retval)
{
struct a {
long fd;
afs_xioctl(struct thread *td, register struct ioctl_args *uap,
register_t *retval)
{
- AFS_PROC *p = td->td_proc;
+ afs_proc_t *p = td->td_proc;
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
struct ioctl_args {
int fd;
};
int
-afs_xioctl(AFS_PROC *p, register struct ioctl_args *uap, register_t *retval)
+afs_xioctl(afs_proc_t *p, register struct ioctl_args *uap, register_t *retval)
{
#elif defined(AFS_LINUX22_ENV)
struct afs_ioctl_sys {
}
#elif defined(AFS_OSF_ENV)
-afs_pioctl(AFS_PROC *p, void *args, int *retval)
+afs_pioctl(afs_proc_t *p, void *args, int *retval)
{
struct a {
char *path;
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
-afs_pioctl(AFS_PROC *p, void *args, int *retval)
+afs_pioctl(afs_proc_t *p, void *args, int *retval)
{
struct a {
char *path;
int
#ifdef AFS_SUN5_ENV
afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
- rval_t *vvp, AFS_UCRED *credp)
+ rval_t *vvp, afs_ucred_t *credp)
#else
#ifdef AFS_DARWIN100_ENV
afs_syscall64_pioctl(user_addr_t path, unsigned int com, user_addr_t cmarg,
- int follow, AFS_UCRED *credp)
+ int follow, afs_ucred_t *credp)
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
- AFS_UCRED *credp)
+ afs_ucred_t *credp)
#else
afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
#endif
{
struct afs_ioctl data;
#ifdef AFS_NEED_CLIENTCONTEXT
- AFS_UCRED *tmpcred = NULL;
+ afs_ucred_t *tmpcred = NULL;
#endif
#if defined(AFS_NEED_CLIENTCONTEXT) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- AFS_UCRED *foreigncreds = NULL;
+ afs_ucred_t *foreigncreds = NULL;
#endif
register afs_int32 code = 0;
struct vnode *vp = NULL;
#ifdef AFS_DARWIN100_ENV
int
afs_syscall_pioctl(char * path, unsigned int com, caddr_t cmarg,
- int follow, AFS_UCRED *credp)
+ int follow, afs_ucred_t *credp)
{
return afs_syscall64_pioctl(CAST_USER_ADDR_T(path), com,
CAST_USER_ADDR_T((unsigned int)cmarg), follow,
int
afs_HandlePioctl(struct vnode *avp, afs_int32 acom,
register struct afs_ioctl *ablob, int afollow,
- AFS_UCRED **acred)
+ afs_ucred_t **acred)
{
struct vcache *avc;
struct vrequest treq;
afs_uint32 pag;
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#if defined(AFS_DARWIN_ENV)
- AFS_PROC *p = current_proc(); /* XXX */
+ afs_proc_t *p = current_proc(); /* XXX */
#else
- AFS_PROC *p = curproc; /* XXX */
+ afs_proc_t *p = curproc; /* XXX */
#endif
#ifndef AFS_DARWIN80_ENV
uprintf("Process %d (%s) tried to change pags in PSetTokens\n",
static int
Prefetch(uparmtype apath, struct afs_ioctl *adata, int afollow,
- AFS_UCRED *acred)
+ afs_ucred_t *acred)
{
register char *tp;
register afs_int32 code;
#define PIOCTL_HEADER 6
static int
HandleClientContext(struct afs_ioctl *ablob, int *com,
- AFS_UCRED **acred, AFS_UCRED *credp)
+ afs_ucred_t **acred, AFS_UCRED *credp)
{
char *ain, *inData;
afs_uint32 hostaddr;
afs_int32 uid, g0, g1, i, code, pag, exporter_type, isroot = 0;
struct afs_exporter *exporter, *outexporter;
- AFS_UCRED *newcred;
+ afs_ucred_t *newcred;
struct unixuser *au;
afs_uint32 comp = *com & 0xff00;
afs_uint32 h, l;
extern struct brequest *afs_BQueue(register short aopcode,
register struct vcache *avc,
afs_int32 dontwait, afs_int32 ause,
- AFS_UCRED *acred,
+ afs_ucred_t *acred,
afs_size_t asparm0, afs_size_t asparm1,
void *apparm0);
extern void afs_SetCheckServerNATmode(int isnat);
extern int afs_MaybeFreeDiscardedDCache(void);
extern int afs_RefDCache(struct dcache *adc);
extern void afs_TryToSmush(register struct vcache *avc,
- AFS_UCRED *acred, int sync);
+ afs_ucred_t *acred, int sync);
extern void updateV2DC(int lockVc, struct vcache *v, struct dcache *d,
int src);
extern void afs_WriteThroughDSlots(void);
extern int afs_InitDynroot(void);
extern int afs_SetDynrootEnable(int enable);
extern int afs_GetDynrootEnable(void);
-extern int afs_DynrootVOPRemove(struct vcache *avc, AFS_UCRED *acred,
+extern int afs_DynrootVOPRemove(struct vcache *avc, afs_ucred_t *acred,
char *aname);
-extern int afs_DynrootVOPSymlink(struct vcache *avc, AFS_UCRED *acred,
+extern int afs_DynrootVOPSymlink(struct vcache *avc, afs_ucred_t *acred,
char *aname, char *atargetName);
/* afs_error.c */
extern struct afs_exporter *afs_nfsexporter;
extern void afs_nfsclient_init(void);
extern int afs_nfsclient_reqhandler(struct afs_exporter *exporter,
- AFS_UCRED **cred,
+ afs_ucred_t **cred,
afs_int32 host, afs_int32 *pagparam,
struct afs_exporter **outexporter);
extern void shutdown_nfsclnt(void);
extern void shutdown_osinet(void);
extern int afs_osi_suser(void *credp);
extern void afs_osi_TraverseProcTable(void);
-#if defined(KERNEL) && !defined(UKERNEL) && defined(AFS_PROC)
-extern const AFS_UCRED *afs_osi_proc2cred(AFS_PROC * pr);
+#if defined(KERNEL) && !defined(UKERNEL)
+extern const afs_ucred_t *afs_osi_proc2cred(afs_proc_t * pr);
#endif
/* afs_osi_alloc.c */
/* afs_osi_pag.c */
#if defined(AFS_SUN5_ENV)
-extern int afs_setpag(AFS_UCRED **credpp);
+extern int afs_setpag(afs_ucred_t **credpp);
#elif defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-extern int afs_setpag(AFS_PROC *p, void *args, int *retval);
+extern int afs_setpag(afs_proc_t *p, void *args, int *retval);
#else
extern int afs_setpag(void);
#endif
extern afs_uint32 genpag(void);
extern afs_uint32 getpag(void);
#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-extern int AddPag(AFS_PROC *p, afs_int32 aval, AFS_UCRED **credpp);
+extern int AddPag(afs_proc_t *p, afs_int32 aval, afs_ucred_t **credpp);
#else
-extern int AddPag(afs_int32 aval, AFS_UCRED **credpp);
+extern int AddPag(afs_int32 aval, afs_ucred_t **credpp);
#endif
-extern int afs_InitReq(register struct vrequest *av, AFS_UCRED *acred);
+extern int afs_InitReq(register struct vrequest *av, afs_ucred_t *acred);
#if defined(UKERNEL)
extern afs_uint32 afs_get_pag_from_groups(gid_t g0a, gid_t g1a);
#else
#endif
#endif
extern void afs_get_groups_from_pag(afs_uint32 pag, gid_t * g0p, gid_t * g1p);
-extern afs_int32 PagInCred(AFS_UCRED *cred);
+extern afs_int32 PagInCred(afs_ucred_t *cred);
/* afs_osi_uio.c */
extern int afsio_copy(struct uio *ainuio, struct uio *aoutuio,
/* afs_osi_vm.c */
extern int osi_Active(register struct vcache *avc);
extern void osi_FlushPages(register struct vcache *avc,
- AFS_UCRED *credp);
+ afs_ucred_t *credp);
extern void osi_FlushText_really(register struct vcache *vp);
extern int osi_VMDirty_p(struct vcache *avc);
#ifndef UKERNEL
-extern void osi_ReleaseVM(struct vcache *avc, AFS_UCRED *acred);
+extern void osi_ReleaseVM(struct vcache *avc, afs_ucred_t *acred);
#endif
/* ARCH/osi_inode.c */
#ifdef AFS_SUN5_ENV
extern int afs_syscall_icreate(dev_t, long, long, long, long, long,
- rval_t *, AFS_UCRED *);
-extern int afs_syscall_iopen(dev_t, int, int, rval_t *, AFS_UCRED *);
+ rval_t *, afs_ucred_t *);
+extern int afs_syscall_iopen(dev_t, int, int, rval_t *, afs_ucred_t *);
extern int afs_syscall_iincdec(dev_t, int, int, int, rval_t *,
- AFS_UCRED *);
+ afs_ucred_t *);
#elif defined(AFS_SGI65_ENV)
extern int afs_syscall_icreate(afs_uint32, afs_uint32, afs_uint32, afs_uint32, afs_uint32, afs_uint32, rval_t *);
extern int afs_syscall_iopen(int, ino_t, int, rval_t *);
/* ARCH/osi_groups.c */
#if defined(UKERNEL)
-extern int usr_setpag(struct usr_ucred **cred, afs_uint32 pagvalue,
+extern int usr_setpag(afs_ucred_t **cred, afs_uint32 pagvalue,
afs_uint32 * newpag, int change_parent);
#else
# if defined AFS_XBSD_ENV
# if !defined(AFS_DFBSD_ENV)
-extern int setpag(AFS_PROC *proc, struct ucred **cred, afs_uint32 pagvalue,
+extern int setpag(afs_proc_t *proc, struct ucred **cred, afs_uint32 pagvalue,
afs_uint32 * newpag, int change_parent);
# endif
# endif
/* ARCH/osi_vm.c */
extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
extern void osi_VM_StoreAllSegments(struct vcache *avc);
-extern void osi_VM_TryToSmush(struct vcache *avc, AFS_UCRED *acred,
+extern void osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred,
int sync);
-extern void osi_VM_FlushPages(struct vcache *avc, AFS_UCRED *credp);
+extern void osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp);
extern void osi_VM_Truncate(struct vcache *avc, int alen,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern void osi_VM_TryReclaim(struct vcache *avc, int *slept);
extern void osi_VM_NukePages(struct vnode *vp, off_t offset, off_t size);
extern int osi_VM_Setup(struct vcache *avc, int force);
#ifdef AFS_SUN5_ENV
extern int osi_VM_GetDownD(struct vcache *avc, struct dcache *adc);
extern void osi_VM_PreTruncate(struct vcache *avc, int alen,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
extern struct vfs_ubcops afs_ubcops;
#endif
#endif
-extern int afs_inactive(struct vcache *avc, AFS_UCRED *acred);
+extern int afs_inactive(struct vcache *avc, afs_ucred_t *acred);
/* afs_osifile.c */
extern afs_rwlock_t afs_xpagcell;
extern afs_rwlock_t afs_xpagsys;
extern int afspag_PUnlog(char *ain, afs_int32 ainSize,
- AFS_UCRED **acred);
+ afs_ucred_t **acred);
extern int afspag_PSetTokens(char *ain, afs_int32 ainSize,
- AFS_UCRED **acred);
+ afs_ucred_t **acred);
extern int afspag_PSetSysName(char *ain, afs_int32 ainSize,
- AFS_UCRED **acred);
+ afs_ucred_t **acred);
/* afs_pioctl.c */
extern struct VenusFid afs_rootFid;
#if defined(AFS_DARWIN100_ENV)
extern int afs_syscall64_pioctl(user_addr_t path, unsigned int com,
user_addr_t cmarg, int follow, \
- AFS_UCRED *credp);
+ afs_ucred_t *credp);
#endif
#ifdef AFS_SUN5_ENV
extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
- int follow, rval_t *rvp, AFS_UCRED *credp);
+ int follow, rval_t *rvp, afs_ucred_t *credp);
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
- int follow, AFS_UCRED *credp);
+ int follow, afs_ucred_t *credp);
#else
extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
int follow);
afs_size_t alen, struct vrequest *areq);
extern int afs_TruncateAllSegments(register struct vcache *avc,
afs_size_t alen, struct vrequest *areq,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
/* afs_server.c */
extern afs_rwlock_t afs_xsrvAddr;
#ifdef UKERNEL
extern void uafs_Shutdown(void);
extern void osi_ReleaseVM(struct vcache *avc, int len,
- struct usr_ucred *credp);
+ afs_ucred_t *credp);
extern int osi_GetTime(struct timeval *tv);
extern int iodone(struct usr_buf *bp);
extern int usr_ioctl(void);
struct usr_vnode **compvpp);
extern int usr_uiomove(char *kbuf, int n, int rw, struct usr_uio *uio);
extern int afs_osi_VOP_RDWR(struct usr_vnode *vnodeP, struct usr_uio *uioP,
- int rw, int flags, struct usr_ucred *credP);
+ int rw, int flags, afs_ucred_t *credP);
#endif
afs_int32 locktype);
#if AFS_GCPAGS
extern afs_int32 afs_GCPAGs(afs_int32 * ReleasedCount);
-extern void afs_GCPAGs_perproc_func(AFS_PROC * pproc);
+extern void afs_GCPAGs_perproc_func(afs_proc_t * pproc);
#endif /* AFS_GCPAGS */
extern void afs_ComputePAGStats(void);
extern void afs_PutUser(register struct unixuser *au, afs_int32 locktype);
struct AFSFetchStatus *Outsp);
extern afs_int32 afs_FlushVCBs(afs_int32 lockit);
-extern void afs_InactiveVCache(struct vcache *avc, AFS_UCRED *acred);
+extern void afs_InactiveVCache(struct vcache *avc, afs_ucred_t *acred);
extern struct vcache *afs_LookupVCache(struct VenusFid *afid,
struct vrequest *areq,
afs_int32 * cached, struct vcache *adp,
struct AFSCallBack *CallBackp,
struct server **serverp,
struct AFSVolSync *tsyncp);
-extern void afs_ResetVCache(struct vcache *, AFS_UCRED *);
+extern void afs_ResetVCache(struct vcache *, afs_ucred_t *);
extern afs_int32 afs_NFSFindVCache(struct vcache **avcp,
struct VenusFid *afid);
extern void afs_vcacheInit(int astatSize);
struct vrequest *areq, afs_int32 check_mode_bits);
#if defined(AFS_SUN5_ENV) || (defined(AFS_SGI_ENV) && !defined(AFS_SGI65_ENV))
extern int afs_access(OSI_VC_DECL(avc), register afs_int32 amode, int flags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
extern int afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
extern int afs_getRights(OSI_VC_DECL(avc), register afs_int32 arights,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
/* VNOPS/afs_vnop_attrs.c */
extern int afs_CopyOutAttrs(register struct vcache *avc,
register struct vattr *attrs);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, int flags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
extern int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
extern int afs_VAttrToAS(register struct vcache *avc,
register struct vattr *av,
register struct AFSStoreStatus *as);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs,
- int flags, AFS_UCRED *acred);
+ int flags, afs_ucred_t *acred);
#else
extern int afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
/* VNOPS/afs_vnop_create.c */
#ifdef AFS_SGI64_ENV
extern int afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
int flags, int amode, struct vcache **avcp,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else /* AFS_SGI64_ENV */
extern int afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vcache **avcp,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif /* AFS_SGI64_ENV */
#endif /* AFS_OSF_ENV */
extern int afs_LocalHero(register struct vcache *avc,
/* VNOPS/afs_vnop_dirops.c */
extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
- register struct vcache **avcp, AFS_UCRED *acred);
+ register struct vcache **avcp, afs_ucred_t *acred);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
-extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, AFS_UCRED *acred);
+extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred);
#endif
struct fid;
#ifdef AFS_OSF_ENV
extern int afs_lockctl(struct vcache * avc, struct eflock * af, int flag,
- AFS_UCRED * acred, pid_t clid, off_t offset);
+ afs_ucred_t * acred, pid_t clid, off_t offset);
#elif defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
- AFS_UCRED * acred, pid_t clid);
+ afs_ucred_t * acred, pid_t clid);
#else
extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
- AFS_UCRED * acred);
+ afs_ucred_t * acred);
#endif
/* VNOPS/afs_vnop_link.c */
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
extern int afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
/* VNOPS/afs_vnop_lookup.c */
struct vrequest *areqp);
#ifdef AFS_OSF_ENV
extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
- AFS_UCRED *acred, int opflag, int wantparent);
+ afs_ucred_t *acred, int opflag, int wantparent);
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
struct pathname *pnp, int flags, struct vnode *rdir,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#elif defined(UKERNEL)
extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
- AFS_UCRED *acred, int flags);
+ afs_ucred_t *acred, int flags);
#else
extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
/* VNOPS/afs_vnop_open.c */
#ifdef AFS_SGI64_ENV
extern int afs_open(bhv_desc_t * bhv, struct vcache **avcp, afs_int32 aflags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
extern int afs_open(struct vcache **avcp, afs_int32 aflags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
extern afs_int32 nihints;
extern afs_int32 usedihint;
extern int afs_MemRead(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred, daddr_t albn,
+ afs_ucred_t *acred, daddr_t albn,
struct buf **abpp, int noLock);
extern int afs_UFSRead(register struct vcache *avc, struct uio *auio,
- AFS_UCRED *acred, daddr_t albn,
+ afs_ucred_t *acred, daddr_t albn,
struct buf **abpp, int noLock);
extern void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
- AFS_UCRED *acred, struct vrequest *areq);
+ afs_ucred_t *acred, struct vrequest *areq);
/* VNOPS/afs_vnop_readdir.c */
extern int afs_rd_stash_i;
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
- AFS_UCRED *acred, int *eofp);
+ afs_ucred_t *acred, int *eofp);
#elif defined(AFS_HPUX100_ENV)
extern int afs_readdir2(OSI_VC_DECL(avc), struct uio *auio,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
/* VNOPS/afs_vnop_remove.c */
extern int afsremove(register struct vcache *adp, register struct dcache *tdc,
register struct vcache *tvc, char *aname,
- AFS_UCRED *acred, struct vrequest *treqp);
+ afs_ucred_t *acred, struct vrequest *treqp);
extern int afs_remunlink(register struct vcache *avc, register int doit);
-extern int afs_remove(OSI_VC_DECL(adp), char *aname, AFS_UCRED *acred);
+extern int afs_remove(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred);
extern char *afs_newname(void);
/* VNOPS/afs_vnop_rename.c */
extern int afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
- char *aname2, AFS_UCRED *acred,
+ char *aname2, afs_ucred_t *acred,
struct vrequest *areq);
#ifdef AFS_SGI_ENV
extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
char *aname2, struct pathname *npnp,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#else
extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
- char *aname2, AFS_UCRED *acred);
+ char *aname2, afs_ucred_t *acred);
#endif
/* VNOPS/afs_vnop_strategy.c */
#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-extern int afs_ustrategy(register struct buf *adp, AFS_UCRED *credp);
+extern int afs_ustrategy(register struct buf *adp, afs_ucred_t *credp);
#else
extern int afs_ustrategy(register struct buf *adp);
#endif
struct vrequest *areq);
extern int afs_symlink(OSI_VC_DECL(adp), char *aname,
struct vattr *attrs, char *atargetName,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern int afs_readlink(OSI_VC_DECL(avc), struct uio *auio,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
/* VNOPS/afs_vnop_write.c */
extern int afs_MemWrite(register struct vcache *avc, struct uio *auio,
- int aio, AFS_UCRED *acred, int noLock);
+ int aio, afs_ucred_t *acred, int noLock);
extern int afs_StoreOnLastReference(register struct vcache *avc,
register struct vrequest *treq);
extern int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
- int aio, AFS_UCRED *acred, int noLock);
+ int aio, afs_ucred_t *acred, int noLock);
extern int afs_DoPartialWrite(register struct vcache *avc,
struct vrequest *areq);
extern int afs_closex(register struct file *afd);
#ifdef AFS_SGI65_ENV
extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
- lastclose_t lastclose, AFS_UCRED *acred);
+ lastclose_t lastclose, afs_ucred_t *acred);
#elif defined(AFS_SGI64_ENV)
extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
lastclose_t lastclose, off_t offset,
- AFS_UCRED *acred, struct flid *flp);
+ afs_ucred_t *acred, struct flid *flp);
#elif defined(AFS_SGI_ENV)
extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
lastclose_t lastclose, off_t offset,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#elif defined(AFS_SUN5_ENV)
extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count,
- offset_t offset, AFS_UCRED *acred);
+ offset_t offset, afs_ucred_t *acred);
#else
extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
#endif
#ifdef AFS_OSF_ENV
-extern int afs_fsync(OSI_VC_DECL(avc), int fflags, AFS_UCRED *acred,
+extern int afs_fsync(OSI_VC_DECL(avc), int fflags, afs_ucred_t *acred,
int waitfor);
#elif defined(AFS_SGI65_ENV)
-extern int afs_fsync(OSI_VC_DECL(avc), int flags, AFS_UCRED *acred,
+extern int afs_fsync(OSI_VC_DECL(avc), int flags, afs_ucred_t *acred,
off_t start, off_t stop);
#elif defined(AFS_SGI_ENV) || defined(AFS_SUN53_ENV)
-extern int afs_fsync(OSI_VC_DECL(avc), int flag, AFS_UCRED *acred);
+extern int afs_fsync(OSI_VC_DECL(avc), int flag, afs_ucred_t *acred);
#else
-extern int afs_fsync(OSI_VC_DECL(avc), AFS_UCRED *acred);
+extern int afs_fsync(OSI_VC_DECL(avc), afs_ucred_t *acred);
#endif
/* Blow away pages; for now, only for Solaris */
#if (defined(AFS_SUN5_ENV))
if (WriteLocked(&avc->lock))
- osi_ReleaseVM(avc, (AFS_UCRED *)0);
+ osi_ReleaseVM(avc, (afs_ucred_t *)0);
#endif
/*
* Block out others from screwing with this table; is a read lock
*/
int
afs_TruncateAllSegments(register struct vcache *avc, afs_size_t alen,
- struct vrequest *areq, AFS_UCRED *acred)
+ struct vrequest *areq, afs_ucred_t *acred)
{
register struct dcache *tdc;
register afs_int32 code;
afs_int32 syscall;
};
int
-afs3_syscall(AFS_PROC *p, void *args, unsigned int *retval)
+afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval)
{
struct afssysa64 *uap64 = NULL;
struct afssysa *uap = NULL;
#ifdef AFS_FBSD50_ENV
struct thread *p;
#else
- AFS_PROC *p;
+ afs_proc_t *p;
#endif
void *args;
long *retval;
*/
#if !defined(LINUX_KEYRING_SUPPORT) && (!defined(STRUCT_TASK_HAS_CRED) || defined(EXPORTED_RCU_READ_LOCK))
void
-afs_GCPAGs_perproc_func(AFS_PROC * pproc)
+afs_GCPAGs_perproc_func(afs_proc_t * pproc)
{
afs_int32 pag, hash, uid;
- const AFS_UCRED *pcred;
+ const afs_ucred_t *pcred;
afs_GCPAGs_perproc_count++;
* \param acred
*/
void
-afs_InactiveVCache(struct vcache *avc, AFS_UCRED *acred)
+afs_InactiveVCache(struct vcache *avc, afs_ucred_t *acred)
{
AFS_STATCNT(afs_inactive);
if (avc->f.states & CDirty) {
register int i;
register struct afs_conn *tc;
register afs_int32 code;
- AFS_UCRED *cred = NULL;
+ afs_ucred_t *cred = NULL;
struct vrequest treq, ureq;
struct AFSVolSync tsync;
int didCore;
if (tvc->f.states & CCore) {
tvc->f.states &= ~CCore;
/* XXXX Find better place-holder for cred XXXX */
- cred = (AFS_UCRED *)tvc->linkData;
+ cred = (afs_ucred_t *)tvc->linkData;
tvc->linkData = NULL; /* XXX */
afs_InitReq(&ureq, cred);
afs_Trace2(afs_iclSetp, CM_TRACE_ACTCCORE,
* \note avc must be write locked on entry
*/
void
-afs_ResetVCache(struct vcache *avc, AFS_UCRED *acred) {
+afs_ResetVCache(struct vcache *avc, afs_ucred_t *acred) {
ObtainWriteLock(&afs_xcbhash, 456);
afs_DequeueCallback(avc);
avc->f.states &= ~(CStatd | CDirty); /* next reference will re-stat */
register struct AFSStoreStatus *astatus,
struct vattr *attrs);
extern int afs_ResyncDisconFiles(struct vrequest *areq,
- AFS_UCRED *acred);
+ afs_ucred_t *acred);
extern void afs_RemoveAllConns(void);
extern void afs_GenFakeFid(struct VenusFid *afid, afs_uint32 avtype,
int lock);
struct AFSFetchStatus *Outsp,
struct AFSCallBack *acb,
afs_uint32 start);
-extern void afs_DisconDiscardAll(AFS_UCRED *);
+extern void afs_DisconDiscardAll(afs_ucred_t *);
#define AFS_IS_DISCONNECTED (afs_is_disconnected)
#define AFS_IS_DISCON_RW (afs_is_discon_rw)
struct exporterops {
int (*export_reqhandler) (struct afs_exporter *exp,
- AFS_UCRED **cred,
+ afs_ucred_t **cred,
afs_uint32 host,
afs_int32 pag,
struct afs_exporter **expp);
short count; /* count of excl locks */
char flags; /* bit 1: is anyone waiting? */
char spare; /* for later */
- char *proc; /* process holding the lock, really an AFS_PROC * */
+ char *proc; /* process holding the lock, really an afs_proc_t * */
};
#ifndef AFS_NOBOZO_LOCK
typedef struct afs_bozoLock afs_bozoLock_t;
#define MyPidxx (u.u_kthreadp)
#define MyPidxx2Pid(x) (x ? kt_tid(x) : 0)
#else
-typedef AFS_PROC * afs_lock_tracker_t;
+typedef afs_proc_t * afs_lock_tracker_t;
#define MyPidxx (u.u_procp)
#define MyPidxx2Pid(x) (x ? (afs_int32)p_pid(x) : 0)
#endif
typedef enum {
AFS_PEER_STATS,
- AFS_PROCESS_STATS
+ afs_proc_tESS_STATS
} afs_stat_type_t, *afs_stat_type_p;
static afs_stat_type_t
if (!strcmp(type, "peer")) {
rc = AFS_PEER_STATS;
} else if (!strcmp(type, "process")) {
- rc = AFS_PROCESS_STATS;
+ rc = afs_proc_tESS_STATS;
} else {
ERR_EXT("stat_type must be process or peer");
}