which included commits to RCS files with non-trunk default branches.
#undef FULL_LISTVOL_SWITCH
#undef INODE_SETATTR_NOT_VOID
+#undef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
#undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
[LINUX_BUILD_VNODE_FROM_INODE(src/config,src/afs/LINUX)]
)
LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+ LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK)
fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
+ AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK)
+ fi
if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM)
fi
sparc-sun-solaris2.9)
AFS_SYSNAME="sun4x_59"
;;
+ i386-pc-solaris2.7)
+ AFS_SYSNAME="sunx86_57"
+ ;;
+ i386-pc-solaris2.8)
+ AFS_SYSNAME="sunx86_58"
+ ;;
+ i386-pc-solaris2.9)
+ AFS_SYSNAME="sunx86_59"
+ ;;
alpha*-dec-osf4.0*)
AFS_SYSNAME="alpha_dux40"
;;
AC_INIT(Makefile.common)
-AM_INIT_AUTOMAKE(openafs-libafs,1.2.5)
+AM_INIT_AUTOMAKE(openafs-libafs,1.2.6)
AC_CONFIG_HEADER(config/afsconfig.h)
define(OPENAFS_CONFIGURE_LIBAFS)
struct rx_call *a_call,
afs_int32 a_index,
char **a_name,
- afs_int32 *a_hosts)
+ serverList *a_hosts)
{
char *t_name;
t_name = (char *)malloc(AFSNAMEMAX);
t_name[0] = '\0';
*a_name = t_name;
- memset(a_hosts, 0, AFSMAXCELLHOSTS * sizeof(afs_int32));
+ a_hosts->serverList_len = 0;
return 0;
}
{
char *t_name;
- t_name = (char *)malloc(AFSNAMEMAX);
if (cm_rootCellp) {
+ t_name = (char *)malloc(strlen(cm_rootCellp->namep)+1);
strcpy(t_name, cm_rootCellp->namep);
} else {
+ t_name = (char *)malloc(1);
t_name[0] = '\0';
}
*a_name = t_name;
//#define NOSERVICE 1
+#define NOMOREFILESFIX 1
+
#include <afs/param.h>
#include <afs/stds.h>
namep += entryLength;
tcounter++; /* which proto entry we're looking at */
}
+#ifndef NOMOREFILESFIX
/*
* NOTE: We can determine what OS (NT4.0, W2K, W9X, etc)
* the client is running by reading the protocol signature.
*/
}
}
+ // NOMOREFILESFIX
+#endif
if (NTProtoIndex != -1) {
protoIndex = NTProtoIndex;
spacep = cm_GetSpace();
smb_StripLastComponent(spacep->data, &lastComp,
(char *)(&p->parmsp[3]));
- if (strcmp(lastComp, "\\desktop.ini") == 0) {
+ /* Make sure that lastComp is not NULL */
+ if (lastComp)
+ if (strcmp(lastComp, "\\desktop.ini") == 0) {
code = cm_NameI(cm_rootSCachep, spacep->data,
CM_FLAG_CASEFOLD
| CM_FLAG_DIRSEARCH
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vm.c,v 1.1.1.5 2002/05/10 23:43:37 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vm.c,v 1.1.1.6 2002/08/02 04:28:49 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
return;
}
#ifdef AFS_DARWIN14_ENV
- if (vp->v_ubcinfo->ui_refcount > 1) {
+ if (vp->v_ubcinfo->ui_refcount > 1 || vp->v_ubcinfo->ui_mapped) {
simple_unlock(&vp->v_interlock);
AFS_RELE(vp);
return;
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DUX/osi_vfsops.c,v 1.1.1.7 2002/05/10 23:43:40 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DUX/osi_vfsops.c,v 1.1.1.8 2002/08/02 04:28:50 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
extern int Afs_xsetgroups(), afs_xioctl(), afs3_syscall();
AFS_GLOCK();
- sysent[AFS_SYSCALL].sy_call = afs3_syscall;
+ ((struct sysent *) (&sysent[AFS_SYSCALL]))->sy_call = afs3_syscall;
#ifdef SY_NARG
- sysent[AFS_SYSCALL].sy_info = 6;
+ ((struct sysent *) (&sysent[AFS_SYSCALL]))->sy_info = 6;
#else
- sysent[AFS_SYSCALL].sy_parallel = 0;
- sysent[AFS_SYSCALL].sy_narg = 6;
+ ((struct sysent *) (&sysent[AFS_SYSCALL]))->sy_parallel = 0;
+ ((struct sysent *) (&sysent[AFS_SYSCALL]))->sy_narg = 6;
#endif
- sysent[SYS_setgroups].sy_call = Afs_xsetgroups;
+
+ ((struct sysent *) (&sysent[SYS_setgroups]))->sy_call =
+ Afs_xsetgroups;
afs_xioctl_func = afsxioctl;
afs_xsetgroups_func = afsxsetgroups;
afs_syscall_func = afssyscall;
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_alloc.c,v 1.1.1.10 2002/05/10 23:44:02 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_alloc.c,v 1.1.1.11 2002/08/02 04:28:55 hartmans Exp $");
#include "../afs/sysincludes.h"
#include "../afs/afsincludes.h"
#include "../afs/afs_atomlist.h"
#include "../afs/afs_lhash.h"
-#define MAX_KMALLOC_SIZE (131072-16) /* Max we can alloc in physmem */
+#define MAX_KMALLOC_SIZE PAGE_SIZE /* Max we should alloc with kmalloc */
#define MAX_BUCKET_LEN 30 /* max. no. of entries per buckets we expect to see */
#define STAT_INTERVAL 8192 /* we collect stats once every STAT_INTERVAL allocs*/
* returns NULL if we failed to allocate memory.
* or pointer to memory if we succeeded.
*/
-static void *linux_alloc(unsigned int asize)
+static void *linux_alloc(unsigned int asize, int drop_glock)
{
void *new = NULL;
- int has_afs_glock = ISAFS_GLOCK();
-
- /* if global lock has been held save this info and unlock it. */
- if (has_afs_glock)
- AFS_GUNLOCK();
+ int max_retry = 10;
+ int haveGlock = ISAFS_GLOCK();
/* if we can use kmalloc use it to allocate the required memory. */
- if (asize < MAX_KMALLOC_SIZE) {
+ while(!new && max_retry)
+ {
+ if (asize <= MAX_KMALLOC_SIZE) {
new = (void *)(unsigned long)kmalloc(asize,
#ifdef GFP_NOFS
GFP_NOFS
);
if (new) /* piggy back alloc type */
(unsigned long)new |= KM_TYPE;
- }
- if (!new) { /* otherwise use vmalloc */
- int max_wait = 10;
- while (!(new = (void *)vmalloc(asize))) {
- if (--max_wait <=0) {
- break;
+ } else {
+ new = (void *)vmalloc(asize);
+ if (new) /* piggy back alloc type */
+ (unsigned long)new |= VM_TYPE;
}
+
+ if (!new) {
#ifdef set_current_state
set_current_state(TASK_INTERRUPTIBLE);
#else
current->state = TASK_INTERRUPTIBLE;
#endif
+ if (drop_glock && haveGlock) AFS_GUNLOCK();
schedule_timeout(HZ);
+ if (drop_glock && haveGlock) AFS_GLOCK();
+#ifdef set_current_state
+ set_current_state(TASK_RUNNING);
+#else
+ current->state = TASK_RUNNING;
+#endif
+ --max_retry;
}
- if (new) /* piggy back alloc type */
- (unsigned long)new |= VM_TYPE;
}
if (new)
memset(MEMADDR(new), 0, asize);
- /* if the global lock had been held, lock it again. */
- if (has_afs_glock)
- AFS_GLOCK();
-
return new;
}
struct semaphore afs_linux_alloc_sem = MUTEX;
#endif
-void *osi_linux_alloc(unsigned int asize)
+void *osi_linux_alloc(unsigned int asize, int drop_glock)
{
void *new = NULL;
struct osi_linux_mem *lmem;
+ new = linux_alloc(asize, drop_glock); /* get a chunk of memory of size asize */
+
+ if (!new) {
+ printf("afs_osi_Alloc: Can't vmalloc %d bytes.\n", asize);
+ return new;
+ }
+
down(&afs_linux_alloc_sem);
- if (allocator_init == 0) { /* allocator hasn't been initialized yet */
+ /* allocator hasn't been initialized yet */
+ if (allocator_init == 0) {
if (linux_alloc_init() == 0) {
goto error;
}
allocator_init = 1; /* initialization complete */
}
-
- up(&afs_linux_alloc_sem);
- new = linux_alloc(asize); /* get a chunk of memory of size asize */
- down(&afs_linux_alloc_sem);
- if (!new) {
- printf("afs_osi_Alloc: Can't vmalloc %d bytes.\n", asize);
- goto error;
- }
/* get an atom to store the pointer to the chunk */
lmem = (struct osi_linux_mem *)afs_atomlist_get(al_mem_pool);
#define _OSI_PROTO_H_
/* osi_alloc.c */
-extern void *osi_linux_alloc(unsigned int size);
+extern void *osi_linux_alloc(unsigned int size, int drop_glock);
extern void osi_linux_free(void *addr);
extern void osi_linux_free_afs_memory(void);
/* Debugging aid */
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_sleep.c,v 1.1.1.8 2002/01/30 14:01:28 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_sleep.c,v 1.1.1.9 2002/08/02 04:28:56 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
-#if defined(AFS_GLOBAL_SUNLOCK)
static int osi_TimedSleep(char *event, afs_int32 ams, int aintok);
-#endif
-
void afs_osi_Wakeup(char *event);
void afs_osi_Sleep(char *event);
static char waitV, dummyV;
-#if ! defined(AFS_GLOBAL_SUNLOCK)
-
-/* call procedure aproc with arock as an argument, in ams milliseconds */
-static struct timer_list *afs_osi_CallProc(void *aproc, void *arock, int ams)
-{
- struct timer_list *timer = NULL;
-
- timer = (struct timer_list*)osi_Alloc(sizeof(struct timer_list));
- if (timer) {
- init_timer(timer);
- timer->expires = (ams*afs_hz)/1000 + 1;
- timer->data = (unsigned long)arock;
- timer->function = aproc;
- add_timer(timer);
- }
- return timer;
-}
-
-/* cancel a timeout, whether or not it has already occurred */
-static int afs_osi_CancelProc(struct timer_list *timer)
-{
- if (timer) {
- del_timer(timer);
- osi_Free(timer, sizeof(struct timer_list));
- }
- return 0;
-}
-
-static AfsWaitHack()
-{
- AFS_STATCNT(WaitHack);
- wakeup(&waitV);
-}
-
-#endif
-
void afs_osi_InitWaitHandle(struct afs_osi_WaitHandle *achandle)
{
AFS_STATCNT(osi_InitWaitHandle);
if (ahandle)
ahandle->proc = (caddr_t) current;
- AFS_ASSERT_GLOCK();
do {
-#if defined(AFS_GLOBAL_SUNLOCK)
- code = osi_TimedSleep(&waitV, ams, 1);
- if (code == EINTR) {
- if (aintok)
- return EINTR;
- }
-#else
- timer = afs_osi_CallProc(AfsWaitHack, (char *) current, ams);
- afs_osi_Sleep(&waitV);
- afs_osi_CancelProc(timer);
-#endif /* AFS_GLOBAL_SUNLOCK */
+ AFS_ASSERT_GLOCK();
+ code = 0;
+ code = osi_TimedSleep(&waitV, ams, aintok);
+
+ if (code) break;
if (ahandle && (ahandle->proc == (caddr_t) 0)) {
/* we've been signalled */
- return EINTR;
+ break;
}
} while (osi_Time() < endTime);
- return 0;
+ return code;
}
AFS_ASSERT_GLOCK();
hashcode = afs_evhash(event);
- newp = osi_AllocSmallSpace(sizeof(afs_event_t));
+ newp = osi_linux_alloc(sizeof(afs_event_t), 0);
afs_evhashcnt++;
newp->next = afs_evhasht[hashcode];
afs_evhasht[hashcode] = newp;
newp->refcount = 0;
}
+#ifndef set_current_state
+#define set_current_state(x) current->state = (x);
+#endif
/* Release the specified event */
#define relevent(evp) ((evp)->refcount--)
-/* afs_osi_Sleep -- waits for an event to be notified. */
-
+/* afs_osi_Sleep -- waits for an event to be notified, ignoring signals.
+ * - NOTE: that on Linux, there are circumstances in which TASK_INTERRUPTIBLE
+ * can wake up, even if all signals are blocked
+ * - TODO: handle signals correctly by passing an indication back to the
+ * caller that the wait has been interrupted and the stack should be cleaned
+ * up preparatory to signal delivery
+ */
void afs_osi_Sleep(char *event)
{
struct afs_event *evp;
int seq;
+#ifdef DECLARE_WAITQUEUE
+ DECLARE_WAITQUEUE(wait, current);
+#else
+ struct wait_queue wait = { current, NULL };
+#endif
evp = afs_getevent(event);
if (!evp) {
- /* Can't block because allocating a new event would require dropping
- * the GLOCK, which may cause us to miss the wakeup. So call the
- * allocator then return immediately. We'll find the new event next
- * time around without dropping the GLOCK. */
afs_addevent(event);
- return;
+ evp = afs_getevent(event);
}
seq = evp->seq;
+ add_wait_queue(&evp->cond, &wait);
while (seq == evp->seq) {
sigset_t saved_set;
+ set_current_state(TASK_INTERRUPTIBLE);
AFS_ASSERT_GLOCK();
AFS_GUNLOCK();
spin_lock_irq(¤t->sigmask_lock);
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
- interruptible_sleep_on(&evp->cond);
+ schedule();
spin_lock_irq(¤t->sigmask_lock);
current->blocked = saved_set;
spin_unlock_irq(¤t->sigmask_lock);
AFS_GLOCK();
}
+ remove_wait_queue(&evp->cond, &wait);
+ set_current_state(TASK_RUNNING);
+
relevent(evp);
}
*/
static int osi_TimedSleep(char *event, afs_int32 ams, int aintok)
{
- long t = ams * HZ / 1000;
+ int code = 0;
+ long ticks = (ams * HZ / 1000) + 1;
struct afs_event *evp;
+#ifdef DECLARE_WAITQUEUE
+ DECLARE_WAITQUEUE(wait, current);
+#else
+ struct wait_queue wait = { current, NULL };
+#endif
evp = afs_getevent(event);
if (!evp) {
- /* Can't block because allocating a new event would require dropping
- * the GLOCK, which may cause us to miss the wakeup. So call the
- * allocator then return immediately. We'll find the new event next
- * time around without dropping the GLOCK. */
afs_addevent(event);
- return EAGAIN;
+ evp = afs_getevent(event);
}
+ add_wait_queue(&evp->cond, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
+ /* always sleep TASK_INTERRUPTIBLE to keep load average
+ from artifically increasing. */
+
AFS_GUNLOCK();
- if (aintok)
- t = interruptible_sleep_on_timeout(&evp->cond, t);
- else
- t = sleep_on_timeout(&evp->cond, t);
+ if (aintok) {
+ if (schedule_timeout(ticks))
+ code = EINTR;
+ } else
+ schedule_timeout(ticks);
AFS_GLOCK();
+ remove_wait_queue(&evp->cond, &wait);
+ set_current_state(TASK_RUNNING);
+
relevent(evp);
- return t ? EINTR : 0;
+ return code;
}
/*
* osi_sysctl.c: Linux sysctl interface to OpenAFS
*
- * $Id: osi_sysctl.c,v 1.1 2002/05/10 23:44:08 hartmans Exp $
+ * $Id: osi_sysctl.c,v 1.1.1.2 2002/08/02 04:28:56 hartmans Exp $
*
* Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
*/
{3, "hm_retry_int",
&hm_retry_int, sizeof(afs_int32), 0644, NULL,
&proc_dointvec},
+ {4, "GCPAGs",
+ &afs_gcpags, sizeof(afs_int32), 0644, NULL,
+ &proc_dointvec},
{0}
};
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_vfsops.c,v 1.1.1.12 2002/05/10 23:44:09 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_vfsops.c,v 1.1.1.13 2002/08/02 04:28:57 hartmans Exp $");
#include "../afs/sysincludes.h"
#include "../afs/afsincludes.h"
VATTR_NULL(&vattr);
afs_CopyOutAttrs(avc, &vattr); /* calls vattr2inode */
}
+
+/* Yet another one for fakestat'ed mountpoints */
+void vcache2fakeinode(struct vcache *rootvp, struct vcache *mpvp)
+{
+ struct vattr vattr;
+
+ VATTR_NULL(&vattr);
+ afs_CopyOutAttrs(rootvp, &vattr);
+ vattr2inode(AFSTOV(mpvp), &vattr);
+}
* Time related macros
*/
#define afs_hz hz
+#ifdef AFS_SUN59_ENV
+#define osi_Time() local_osi_Time()
+extern void gethrestime(timespec_t *);
+static int
+local_osi_Time()
+{
+ timespec_t start;
+ gethrestime(&start);
+ return start.tv_sec;
+}
+#else
#define osi_Time() (hrestime.tv_sec)
+#endif
#undef afs_osi_Alloc_NoSleep
extern void *afs_osi_Alloc_NoSleep(size_t size);
#undef AfsLargeFileUio
#define AfsLargeFileUio(uio) ( (uio)->_uio_offset._p._u ? 1 : 0 )
#undef AfsLargeFileSize
-#define AfsLargeFileSize(pos, off) ( ((offset_t)(pos)+(offset_t)(off) > (offset_t)MAXOFF_T)?1:0)
+#define AfsLargeFileSize(pos, off) ( ((offset_t)(pos)+(offset_t)(off) > (offset_t)0x7fffffff)?1:0)
#endif
#endif /* _OSI_MACHDEP_H_ */
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.1.1.9 2002/05/10 23:44:14 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.1.1.10 2002/08/02 04:28:59 hartmans Exp $");
#if defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
/*
#endif
+/* Translate a faultcode_t as returned by some of the vm routines
+ * into a suitable errno value.
+ */
+static int
+afs_fc2errno(faultcode_t fc)
+{
+ switch (FC_CODE(fc)) {
+ case 0:
+ return 0;
+
+ case FC_OBJERR:
+ return FC_ERRNO(fc);
+
+ default:
+ return EIO;
+ }
+}
+
+
extern struct as kas; /* kernel addr space */
extern unsigned char *afs_indexFlags;
extern afs_lock_t afs_xdcache;
data = segmap_getmap(segkmap, AFSTOV(avc), pageBase);
#endif
#ifndef AFS_SUN5_ENV
- code = as_fault(&kas, data+pageOffset, tsize, F_SOFTLOCK, mode);
+ code = afs_fc2errno(as_fault(&kas, data+pageOffset, tsize,
+ F_SOFTLOCK, mode));
if (code == 0) {
AFS_UIOMOVE(data+pageOffset, tsize, arw, auio, code);
as_fault(&kas, data+pageOffset, tsize, F_SOFTUNLOCK, mode);
AFS_GUNLOCK();
}
if (!created)
- code = segmap_fault(kas.a_hat, segkmap, raddr, rsize, F_SOFTLOCK, mode);
+ code = afs_fc2errno(segmap_fault(kas.a_hat, segkmap, raddr,
+ rsize, F_SOFTLOCK, mode));
}
if (code == 0) {
AFS_UIOMOVE(data+pageOffset, tsize, arw, auio, code);
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_access.c,v 1.1.1.5 2001/07/14 22:19:53 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_access.c,v 1.1.1.6 2002/08/02 04:29:00 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
struct AFS_UCRED *acred; {
register afs_int32 code;
struct vrequest treq;
+ struct afs_fakestat_state fakestate;
OSI_VC_CONVERT(avc)
AFS_STATCNT(afs_access);
afs_Trace3(afs_iclSetp, CM_TRACE_ACCESS, ICL_TYPE_POINTER, avc,
ICL_TYPE_INT32, amode, ICL_TYPE_INT32, avc->m.Length);
+ afs_InitFakeStat(&fakestate);
if (code = afs_InitReq(&treq, acred)) return code;
+ code = afs_EvalFakeStat(&avc, &fakestate, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestate);
+ return code;
+ }
+
code = afs_VerifyVCache(avc, &treq);
if (code) {
+ afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 16);
return code;
}
/* if we're looking for write access and we have a read-only file system, report it */
if ((amode & VWRITE) && (avc->states & CRO)) {
+ afs_PutFakeStat(&fakestate);
return EROFS;
}
code = 1; /* Default from here on in is access ok. */
code = afs_AccessOK(avc, PRSFS_READ, &treq, CHECK_MODE_BITS);
}
}
- if (code)
+ afs_PutFakeStat(&fakestate);
+ if (code) {
return 0; /* if access is ok */
- else {
- code = afs_CheckCode(EACCES, &treq, 17); /* failure code */
- return code;
+ } else {
+ code = afs_CheckCode(EACCES, &treq, 17); /* failure code */
+ return code;
}
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.1.1.9 2002/06/10 11:40:12 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.1.1.10 2002/08/02 04:29:00 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
/* copy out attributes from cache entry */
afs_CopyOutAttrs(avc, attrs)
register struct vattr *attrs;
- register struct vcache *avc; {
+ register struct vcache *avc;
+{
register struct volume *tvp;
register struct cell *tcell;
register afs_int32 i;
+ int fakedir = 0;
AFS_STATCNT(afs_CopyOutAttrs);
+ if (afs_fakestat_enable && avc->mvstat == 1)
+ fakedir = 1;
#if defined(AFS_MACH_ENV )
- attrs->va_mode = vType(avc) | (avc->m.Mode&~VFMT);
+ attrs->va_mode = fakedir ? VDIR | 0755 : vType(avc) | (avc->m.Mode&~VFMT);
#else /* AFS_MACH_ENV */
- attrs->va_type = vType(avc);
+ attrs->va_type = fakedir ? VDIR : vType(avc);
#if defined(AFS_SGI_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_SUN5_ENV)
- attrs->va_mode = (mode_t)(avc->m.Mode & 0xffff);
+ attrs->va_mode = fakedir ? 0755 : (mode_t)(avc->m.Mode & 0xffff);
#else
- attrs->va_mode = avc->m.Mode;
+ attrs->va_mode = fakedir ? VDIR | 0755 : avc->m.Mode;
#endif
#endif /* AFS_MACH_ENV */
if (tcell && (tcell->states & CNoSUID))
attrs->va_mode &= ~(VSUID|VSGID);
}
- attrs->va_uid = avc->m.Owner;
- attrs->va_gid = avc->m.Group; /* yeah! */
+ attrs->va_uid = fakedir ? 0 : avc->m.Owner;
+ attrs->va_gid = fakedir ? 0 : avc->m.Group; /* yeah! */
#if defined(AFS_SUN56_ENV)
attrs->va_fsid = avc->v.v_vfsp->vfs_fsid.val[0];
#else
}
else attrs->va_nodeid = avc->fid.Fid.Vnode + (avc->fid.Fid.Volume << 16);
attrs->va_nodeid &= 0x7fffffff; /* Saber C hates negative inode #s! */
- attrs->va_nlink = avc->m.LinkCount;
- attrs->va_size = avc->m.Length;
+ attrs->va_nlink = fakedir ? 100 : avc->m.LinkCount;
+ attrs->va_size = fakedir ? 4096 : avc->m.Length;
attrs->va_atime.tv_sec = attrs->va_mtime.tv_sec = attrs->va_ctime.tv_sec =
- (int)avc->m.Date;
+ fakedir ? 0 : (int)avc->m.Date;
/* set microseconds to be dataversion # so that we approximate NFS-style
* use of mtime as a dataversion #. We take it mod 512K because
* microseconds *must* be less than a million, and 512K is the biggest
afs_Trace2(afs_iclSetp, CM_TRACE_GETATTR, ICL_TYPE_POINTER, avc,
ICL_TYPE_INT32, avc->m.Length);
+ if (afs_fakestat_enable && avc->mvstat == 1) {
+ struct afs_fakestat_state fakestat;
+
+ code = afs_InitReq(&treq, acred);
+ if (code) return code;
+ afs_InitFakeStat(&fakestat);
+ code = afs_TryEvalFakeStat(&avc, &fakestat, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestat);
+ return code;
+ }
+
+ code = afs_CopyOutAttrs(avc, attrs);
+ afs_PutFakeStat(&fakestat);
+ return code;
+ }
+
#if defined(AFS_SUN5_ENV)
if (flags & ATTR_HINT) {
code = afs_CopyOutAttrs(avc, attrs);
struct vrequest treq;
struct AFSStoreStatus astat;
register afs_int32 code;
+ struct afs_fakestat_state fakestate;
OSI_VC_CONVERT(avc)
AFS_STATCNT(afs_setattr);
afs_Trace2(afs_iclSetp, CM_TRACE_SETATTR, ICL_TYPE_POINTER, avc,
ICL_TYPE_INT32, avc->m.Length);
if (code = afs_InitReq(&treq, acred)) return code;
+
+ afs_InitFakeStat(&fakestate);
+ code = afs_EvalFakeStat(&avc, &fakestate, &treq);
+ if (code)
+ goto done;
+
if (avc->states & CRO) {
code=EROFS;
goto done;
AFS_RWUNLOCK((vnode_t *)avc, VRWLOCK_WRITE);
#endif
done:
+ afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 15);
return code;
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.1.1.7 2002/05/10 23:44:20 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.1.1.8 2002/08/02 04:29:01 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
struct server *hostp=0;
struct vcache *tvc;
struct volume* volp = 0;
+ struct afs_fakestat_state fakestate;
XSTATS_DECLS
OSI_VC_CONVERT(adp)
afs_Trace3(afs_iclSetp, CM_TRACE_CREATE, ICL_TYPE_POINTER, adp,
ICL_TYPE_STRING, aname, ICL_TYPE_INT32, amode);
+ afs_InitFakeStat(&fakestate);
+
#ifdef AFS_SGI65_ENV
/* If avcp is passed not null, it's the old reference to this file.
* We can use this to avoid create races. For now, just decrement
code = EINVAL;
goto done;
}
+ code = afs_EvalFakeStat(&adp, &fakestate, &treq);
+ if (code) goto done;
tagain:
code = afs_VerifyVCache(adp, &treq);
if (code) goto done;
tvc->states |= CCore1;
#endif
+ afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 20);
done2:
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_dirops.c,v 1.1.1.5 2002/05/10 23:44:20 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_dirops.c,v 1.1.1.6 2002/08/02 04:29:01 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
struct AFSCallBack CallBack;
struct AFSVolSync tsync;
afs_int32 now;
+ struct afs_fakestat_state fakestate;
XSTATS_DECLS
OSI_VC_CONVERT(adp)
if (code = afs_InitReq(&treq, acred))
goto done2;
+ afs_InitFakeStat(&fakestate);
if (strlen(aname) > AFSNAMEMAX) {
code = ENAMETOOLONG;
code = EINVAL;
goto done;
}
+ code = afs_EvalFakeStat(&adp, &fakestate, &treq);
+ if (code) goto done;
code = afs_VerifyVCache(adp, &treq);
if (code) goto done;
}
else code = ENOENT;
done:
+ afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 26);
done2:
#ifdef AFS_OSF_ENV
afs_int32 offset, len;
struct AFSFetchStatus OutDirStatus;
struct AFSVolSync tsync;
+ struct afs_fakestat_state fakestate;
XSTATS_DECLS
OSI_VC_CONVERT(adp)
if (code = afs_InitReq(&treq, acred))
goto done2;
+ afs_InitFakeStat(&fakestate);
if (strlen(aname) > AFSNAMEMAX) {
code = ENAMETOOLONG;
goto done;
}
+ code = afs_EvalFakeStat(&adp, &fakestate, &treq);
+ if (code)
+ goto done;
code = afs_VerifyVCache(adp, &treq);
if (code) goto done;
code = 0;
done:
+ afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 27);
done2:
#ifdef AFS_OSF_ENV
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_flock.c,v 1.1.1.9 2002/05/10 23:44:21 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_flock.c,v 1.1.1.10 2002/08/02 04:29:01 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
#ifdef AFS_OSF_ENV
int acmd = 0;
#endif
+ struct afs_fakestat_state fakestate;
AFS_STATCNT(afs_lockctl);
if (code = afs_InitReq(&treq, acred)) return code;
+ afs_InitFakeStat(&fakestate);
+ code = afs_EvalFakeStat(&avc, &fakestate, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestate);
+ return code;
+ }
#ifdef AFS_OSF_ENV
- if (flag & VNOFLCK) return 0;
+ if (flag & VNOFLCK) {
+ afs_PutFakeStat(&fakestate);
+ return 0;
+ }
if (flag & CLNFLCK) {
acmd = LOCK_UN;
} else if ((flag & GETFLCK) || (flag & RGETFLCK)) {
#else
if (acmd == F_GETLK) {
#endif
- if (af->l_type == F_UNLCK)
+ if (af->l_type == F_UNLCK) {
+ afs_PutFakeStat(&fakestate);
return 0;
+ }
#ifndef AFS_OSF_ENV /* getlock is a no-op for osf (for now) */
code = HandleGetLock(avc, af, &treq, clid);
#endif
code = afs_CheckCode(code, &treq, 2); /* defeat buggy AIX optimz */
+ afs_PutFakeStat(&fakestate);
return code;
}
else if ((acmd == F_SETLK) || (acmd == F_SETLKW)
even when they should block */
if (af->l_whence != 0 || af->l_start != 0 || af->l_len != 0) {
DoLockWarning();
+ afs_PutFakeStat(&fakestate);
return 0;
}
/* otherwise we can turn this into a whole-file flock */
if (af->l_type == F_RDLCK) code = LOCK_SH;
else if (af->l_type == F_WRLCK) code = LOCK_EX;
else if (af->l_type == F_UNLCK) code = LOCK_UN;
- else return EINVAL; /* unknown lock type */
+ else {
+ afs_PutFakeStat(&fakestate);
+ return EINVAL; /* unknown lock type */
+ }
if (((acmd == F_SETLK)
#if (defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV)) && !defined(AFS_SUN58_ENV)
|| (acmd == F_RSETLK)
#endif
#endif
code = afs_CheckCode(code, &treq, 3); /* defeat AIX -O bug */
+ afs_PutFakeStat(&fakestate);
return code;
}
+ afs_PutFakeStat(&fakestate);
return EINVAL;
}
struct vrequest treq;
struct vcache *tvc;
int flockDone;
+ struct afs_fakestat_state fakestate;
+ afs_InitFakeStat(&fakestate);
AFS_STATCNT(afs_xflock);
flockDone = 0;
#ifdef AFS_OSF_ENV
#endif /* AFS_FBSD_ENV */
fd = getf(uap->fd);
#endif
- if (!fd) return;
+ if (!fd) {
+ afs_PutFakeStat(&fakestate);
+ return;
+ }
- if (flockDone = afs_InitReq(&treq, u.u_cred)) return flockDone;
+ if (flockDone = afs_InitReq(&treq, u.u_cred)) {
+ afs_PutFakeStat(&fakestate);
+ return flockDone;
+ }
/* first determine whether this is any sort of vnode */
if (fd->f_type == DTYPE_VNODE) {
/* good, this is a vnode; next see if it is an AFS vnode */
tvc = VTOAFS(afs_gntovn)(tvc);
if (!tvc) {
u.u_error = ENOENT;
+ afs_PutFakeStat(&fakestate);
return;
}
#endif
+ code = afs_EvalFakeStat(&tvc, &fakestate, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestate);
+ return code;
+ }
if ((fd->f_flag & (FEXLOCK | FSHLOCK)) && !(uap->com & LOCK_UN)) {
/* First, if fd already has lock, release it for relock path */
#if defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || (defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV))
#else
FP_UNREF(fd);
#endif
+ afs_PutFakeStat(&fakestate);
return code;
#else /* AFS_OSF_ENV */
if (!flockDone)
#else
flock();
#endif
+ afs_PutFakeStat(&fakestate);
return;
#endif
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_link.c,v 1.1.1.5 2002/05/10 23:44:21 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_link.c,v 1.1.1.6 2002/08/02 04:29:02 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
#ifdef AFS_OSF_ENV
afs_link(avc, ndp)
- register struct vcache *avc;
+ struct vcache *avc;
struct nameidata *ndp; {
- register struct vcache *adp = VTOAFS(ndp->ni_dvp);
+ struct vcache *adp = VTOAFS(ndp->ni_dvp);
char *aname = ndp->ni_dent.d_name;
struct ucred *acred = ndp->ni_cred;
#else /* AFS_OSF_ENV */
afs_link(avc, OSI_VC_ARG(adp), aname, acred)
#endif
OSI_VC_DECL(adp);
- register struct vcache *avc;
+ struct vcache *avc;
char *aname;
struct AFS_UCRED *acred;
{
afs_int32 offset, len;
struct AFSFetchStatus OutFidStatus, OutDirStatus;
struct AFSVolSync tsync;
+ struct afs_fakestat_state vfakestate, dfakestate;
XSTATS_DECLS
OSI_VC_CONVERT(adp)
if (code = afs_InitReq(&treq, acred))
goto done2;
+ afs_InitFakeStat(&vfakestate);
+ afs_InitFakeStat(&dfakestate);
+ code = afs_EvalFakeStat(&avc, &vfakestate, &treq);
+ if (code) goto done;
+ code = afs_EvalFakeStat(&adp, &dfakestate, &treq);
+ if (code) goto done;
+
if (avc->fid.Cell != adp->fid.Cell || avc->fid.Fid.Volume != adp->fid.Fid.Volume) {
code = EXDEV;
goto done;
code = 0;
done:
code = afs_CheckCode(code, &treq, 24);
+ afs_PutFakeStat(&vfakestate);
+ afs_PutFakeStat(&dfakestate);
done2:
#ifdef AFS_OSF_ENV
afs_PutVCache(adp, WRITE_LOCK);
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_open.c,v 1.1.1.5 2002/05/10 23:44:23 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_open.c,v 1.1.1.6 2002/08/02 04:29:02 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
{
register afs_int32 code;
struct vrequest treq;
- register struct vcache *tvc;
+ struct vcache *tvc;
int writing;
+ struct afs_fakestat_state fakestate;
AFS_STATCNT(afs_open);
if (code = afs_InitReq(&treq, acred)) return code;
#endif
afs_Trace2(afs_iclSetp, CM_TRACE_OPEN, ICL_TYPE_POINTER, tvc,
ICL_TYPE_INT32, aflags);
+ afs_InitFakeStat(&fakestate);
+ code = afs_EvalFakeStat(&tvc, &fakestate, &treq);
+ if (code) goto done;
code = afs_VerifyVCache(tvc, &treq);
if (code) goto done;
if (aflags & (FWRITE | FTRUNC)) writing = 1;
#endif
ReleaseReadLock(&tvc->lock);
done:
+ afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 4); /* avoid AIX -O bug */
afs_Trace2(afs_iclSetp, CM_TRACE_OPEN, ICL_TYPE_POINTER, tvc,
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.1.1.5 2001/07/14 22:19:56 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.1.1.6 2002/08/02 04:29:03 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
struct vrequest treq;
AFS_STATCNT(afs_UFSRead);
- if (avc->vc_error)
+ if (avc && avc->vc_error)
return EIO;
/* check that we have the latest status info in the vnode cache */
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_remove.c,v 1.1.1.8 2002/06/10 11:40:14 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_remove.c,v 1.1.1.9 2002/08/02 04:29:03 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
afs_int32 offset, len;
struct AFSFetchStatus OutDirStatus;
struct AFSVolSync tsync;
+ struct afs_fakestat_state fakestate;
XSTATS_DECLS
OSI_VC_CONVERT(adp)
tvc = (struct vcache *)ndp->ni_vp; /* should never be null */
#endif
- /* Check if this is dynroot */
- if (afs_IsDynroot(adp)) {
+ if (code = afs_InitReq(&treq, acred)) {
#ifdef AFS_OSF_ENV
afs_PutVCache(adp, 0);
afs_PutVCache(tvc, 0);
#endif
- return afs_DynrootVOPRemove(adp, acred, aname);
+ return code;
}
- if (code = afs_InitReq(&treq, acred)) {
+ afs_InitFakeStat(&fakestate);
+ code = afs_EvalFakeStat(&adp, &fakestate, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestate);
#ifdef AFS_OSF_ENV
- afs_PutVCache(adp, 0);
- afs_PutVCache(tvc, 0);
+ afs_PutVCache(adp, 0);
+ afs_PutVCache(tvc, 0);
#endif
- return code;
+ return code;
+ }
+
+ /* Check if this is dynroot */
+ if (afs_IsDynroot(adp)) {
+ code = afs_DynrootVOPRemove(adp, acred, aname);
+ afs_PutFakeStat(&fakestate);
+#ifdef AFS_OSF_ENV
+ afs_PutVCache(adp, 0);
+ afs_PutVCache(tvc, 0);
+#endif
+ return code;
}
if (strlen(aname) > AFSNAMEMAX) {
+ afs_PutFakeStat(&fakestate);
#ifdef AFS_OSF_ENV
afs_PutVCache(adp, 0);
afs_PutVCache(tvc, 0);
if (code) {
afs_PutVCache(adp, 0);
afs_PutVCache(tvc, 0);
+ afs_PutFakeStat(&fakestate);
return afs_CheckCode(code, &treq, 22);
}
#else /* AFS_OSF_ENV */
tvc = (struct vcache *) 0;
if (code) {
- code = afs_CheckCode(code, &treq, 23);
- return code;
+ code = afs_CheckCode(code, &treq, 23);
+ afs_PutFakeStat(&fakestate);
+ return code;
}
#endif
afs_PutVCache(tvc, 0);
#endif
code = EROFS;
+ afs_PutFakeStat(&fakestate);
return code;
}
#ifdef AFS_OSF_ENV
afs_PutVCache(adp, WRITE_LOCK);
#endif /* AFS_OSF_ENV */
+ afs_PutFakeStat(&fakestate);
return code;
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_rename.c,v 1.1.1.5 2002/05/10 23:44:25 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_rename.c,v 1.1.1.6 2002/08/02 04:29:03 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
/* Note that we don't set CDirty here, this is OK because the rename
* RPC is called synchronously. */
-afsrename(aodp, aname1, andp, aname2, acred)
- register struct vcache *aodp, *andp;
+afsrename(aodp, aname1, andp, aname2, acred, areq)
+ struct vcache *aodp, *andp;
char *aname1, *aname2;
- struct AFS_UCRED *acred; {
- struct vrequest treq;
+ struct AFS_UCRED *acred;
+ struct vrequest *areq;
+{
register struct conn *tc;
register afs_int32 code;
afs_int32 returnCode;
ICL_TYPE_STRING, aname1, ICL_TYPE_POINTER, andp,
ICL_TYPE_STRING, aname2);
- if (code = afs_InitReq(&treq, acred)) return code;
-
if (strlen(aname1) > AFSNAMEMAX || strlen(aname2) > AFSNAMEMAX) {
code = ENAMETOOLONG;
goto done;
/* verify the latest versions of the stat cache entries */
tagain:
- code = afs_VerifyVCache(aodp, &treq);
+ code = afs_VerifyVCache(aodp, areq);
if (code) goto done;
- code = afs_VerifyVCache(andp, &treq);
+ code = afs_VerifyVCache(andp, areq);
if (code) goto done;
/* lock in appropriate order, after some checks */
* fileFid in order to handle ".." invalidation at the very end.
*/
code = 0;
- tdc1 = afs_GetDCache(aodp, 0, &treq, &offset, &len, 0);
+ tdc1 = afs_GetDCache(aodp, 0, areq, &offset, &len, 0);
if (!tdc1) {
code = ENOENT;
}
/* locks are now set, proceed to do the real work */
do {
- tc = afs_Conn(&aodp->fid, &treq, SHARED_LOCK);
+ tc = afs_Conn(&aodp->fid, areq, SHARED_LOCK);
if (tc) {
XSTATS_START_TIME(AFS_STATS_FS_RPCIDX_RENAME);
#ifdef RX_ENABLE_LOCKS
} else code = -1;
} while
- (afs_Analyze(tc, code, &andp->fid, &treq,
+ (afs_Analyze(tc, code, &andp->fid, areq,
AFS_STATS_FS_RPCIDX_RENAME, SHARED_LOCK, (struct cell *)0));
returnCode = code; /* remember for later */
unlinkFid.Cell = aodp->fid.Cell;
tvc = (struct vcache *)0;
if (!unlinkFid.Fid.Unique) {
- tvc = afs_LookupVCache(&unlinkFid, &treq, (afs_int32 *)0, WRITE_LOCK,
+ tvc = afs_LookupVCache(&unlinkFid, areq, (afs_int32 *)0, WRITE_LOCK,
aodp, aname1);
}
if (!tvc) /* lookup failed or wasn't called */
- tvc = afs_GetVCache(&unlinkFid, &treq, (afs_int32 *)0,
+ tvc = afs_GetVCache(&unlinkFid, areq, (afs_int32 *)0,
(struct vcache*)0, WRITE_LOCK);
if (tvc) {
fileFid.Fid.Volume = aodp->fid.Fid.Volume;
fileFid.Cell = aodp->fid.Cell;
if (!fileFid.Fid.Unique)
- tvc = afs_LookupVCache(&fileFid, &treq, (afs_int32 *)0, WRITE_LOCK, andp, aname2);
+ tvc = afs_LookupVCache(&fileFid, areq, (afs_int32 *)0, WRITE_LOCK, andp, aname2);
else
- tvc = afs_GetVCache(&fileFid, &treq, (afs_int32 *)0,
+ tvc = afs_GetVCache(&fileFid, areq, (afs_int32 *)0,
(struct vcache*)0, WRITE_LOCK);
if (tvc && (vType(tvc) == VDIR)) {
ObtainWriteLock(&tvc->lock,152);
}
code = returnCode;
done:
- code = afs_CheckCode(code, &treq, 25);
return code;
}
#ifdef AFS_OSF_ENV
afs_rename(fndp, tndp)
struct nameidata *fndp, *tndp; {
- register struct vcache *aodp = VTOAFS(fndp->ni_dvp);
+ struct vcache *aodp = VTOAFS(fndp->ni_dvp);
char *aname1 = fndp->ni_dent.d_name;
- register struct vcache *andp = VTOAFS(tndp->ni_dvp);
+ struct vcache *andp = VTOAFS(tndp->ni_dvp);
char *aname2 = tndp->ni_dent.d_name;
struct ucred *acred = tndp->ni_cred;
#else /* AFS_OSF_ENV */
afs_rename(OSI_VC_ARG(aodp), aname1, andp, aname2, acred)
#endif
OSI_VC_DECL(aodp);
- register struct vcache *andp;
+ struct vcache *andp;
char *aname1, *aname2;
struct AFS_UCRED *acred; {
#endif
register afs_int32 code;
+ struct afs_fakestat_state ofakestate;
+ struct afs_fakestat_state nfakestate;
+ struct vrequest treq;
OSI_VC_CONVERT(aodp)
- code = afsrename(aodp, aname1, andp, aname2, acred);
+ code = afs_InitReq(&treq, acred);
+ if (code) return code;
+ afs_InitFakeStat(&ofakestate);
+ afs_InitFakeStat(&nfakestate);
+ code = afs_EvalFakeStat(&aodp, &ofakestate, &treq);
+ if (code) goto done;
+ code = afs_EvalFakeStat(&andp, &nfakestate, &treq);
+ if (code) goto done;
+ code = afsrename(aodp, aname1, andp, aname2, acred, &treq);
+done:
+ afs_PutFakeStat(&ofakestate);
+ afs_PutFakeStat(&nfakestate);
#ifdef AFS_OSF_ENV
AFS_RELE(tndp->ni_dvp);
if (tndp->ni_vp != NULL) {
AFS_RELE(fndp->ni_dvp);
AFS_RELE(fndp->ni_vp);
#endif /* AFS_OSF_ENV */
+ code = afs_CheckCode(code, &treq, 25);
return code;
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_symlink.c,v 1.1.1.6 2002/05/10 23:44:25 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_symlink.c,v 1.1.1.7 2002/08/02 04:29:04 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
struct AFSCallBack CallBack;
struct AFSVolSync tsync;
struct volume* volp=0;
+ struct afs_fakestat_state fakestate;
XSTATS_DECLS
OSI_VC_CONVERT(adp)
afs_Trace2(afs_iclSetp, CM_TRACE_SYMLINK, ICL_TYPE_POINTER, adp,
ICL_TYPE_STRING, aname);
+ if (code = afs_InitReq(&treq, acred))
+ goto done2;
+
+ afs_InitFakeStat(&fakestate);
+ code = afs_EvalFakeStat(&adp, &fakestate, &treq);
+ if (code)
+ goto done;
+
if (strlen(aname) > AFSNAMEMAX || strlen(atargetName) > AFSPATHMAX) {
code = ENAMETOOLONG;
goto done2;
goto done2;
}
- if (code = afs_InitReq(&treq, acred))
- goto done2;
-
code = afs_VerifyVCache(adp, &treq);
if (code) {
code = afs_CheckCode(code, &treq, 30);
afs_PutVCache(tvc, WRITE_LOCK);
code = 0;
done:
+ afs_PutFakeStat(&fakestate);
if ( volp )
afs_PutVolume(volp, READ_LOCK);
code = afs_CheckCode(code, &treq, 31);
register afs_int32 code;
struct vrequest treq;
register char *tp;
+ struct afs_fakestat_state fakestat;
OSI_VC_CONVERT(avc)
AFS_STATCNT(afs_readlink);
afs_Trace1(afs_iclSetp, CM_TRACE_READLINK, ICL_TYPE_POINTER, avc);
if (code = afs_InitReq(&treq, acred)) return code;
+ afs_InitFakeStat(&fakestat);
+ code = afs_EvalFakeStat(&avc, &fakestat, &treq);
+ if (code) goto done;
code = afs_VerifyVCache(avc, &treq);
if (code) goto done;
if (vType(avc) != VLNK) {
}
ReleaseWriteLock(&avc->lock);
done:
+ afs_PutFakeStat(&fakestat);
code = afs_CheckCode(code, &treq, 32);
return code;
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.1.1.10 2002/05/10 23:44:26 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.1.1.11 2002/08/02 04:29:04 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
if (filePos > avc->m.Length)
avc->m.Length = filePos;
#endif
-#ifndef AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV)
/*
* If write is implemented via VM, afs_DoPartialWrite() is called from
* the high-level write op.
}
#endif
osi_UFSClose(tfile);
-#ifndef AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV)
/*
* If write is implemented via VM, afs_DoPartialWrite() is called from
* the high-level write op.
afs_int32 flags;
int closeDone;
afs_int32 code = 0;
+ struct afs_fakestat_state fakestat;
AFS_STATCNT(afs_closex);
/* setup the credentials */
if (code = afs_InitReq(&treq, u.u_cred)) return code;
+ afs_InitFakeStat(&fakestat);
closeDone = 0;
/* we're the last one. If we're an AFS vnode, clear the flags,
if (afd->f_type == DTYPE_VNODE) {
tvc = VTOAFS(afd->f_data);
if (IsAfsVnode(AFSTOV(tvc))) {
+ code = afs_EvalFakeStat(&tvc, &fakestat, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestat);
+ return code;
+ }
VN_HOLD(AFSTOV(tvc));
flags = afd->f_flag & (FSHLOCK | FEXLOCK);
afd->f_flag &= ~(FSHLOCK | FEXLOCK);
if (!closeDone) {
code = vno_close(afd);
}
+ afs_PutFakeStat(&fakestat);
return code; /* return code from vnode layer */
}
#endif
afs_int32 aflags;
struct AFS_UCRED *acred;
{
- register afs_int32 code, initreq=0;
+ register afs_int32 code;
register struct brequest *tb;
struct vrequest treq;
#ifdef AFS_SGI65_ENV
struct flid flid;
#endif
+ struct afs_fakestat_state fakestat;
OSI_VC_CONVERT(avc)
AFS_STATCNT(afs_close);
afs_Trace2(afs_iclSetp, CM_TRACE_CLOSE, ICL_TYPE_POINTER, avc,
ICL_TYPE_INT32, aflags);
+ code = afs_InitReq(&treq, acred);
+ if (code) return code;
+ afs_InitFakeStat(&fakestat);
+ code = afs_EvalFakeStat(&avc, &fakestat, &treq);
+ if (code) {
+ afs_PutFakeStat(&fakestat);
+ return code;
+ }
#ifdef AFS_SUN5_ENV
if (avc->flockCount) {
- if (code = afs_InitReq(&treq, acred)) return code;
- initreq = 1;
HandleFlock(avc, LOCK_UN, &treq, 0, 1/*onlymine*/);
}
#endif
#if defined(AFS_SGI_ENV)
- if (!lastclose)
+ if (!lastclose) {
+ afs_PutFakeStat(&fakestat);
return 0;
+ }
#else
#if defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV)
if (count > 1) {
/* The vfs layer may call this repeatedly with higher "count"; only on the last close (i.e. count = 1) we should actually proceed with the close. */
+ afs_PutFakeStat(&fakestat);
return 0;
}
#endif
-#ifdef AFS_SUN5_ENV
- if (!initreq) {
-#endif
-#endif
- if (code = afs_InitReq(&treq, acred)) return code;
-#ifdef AFS_SUN5_ENV
- }
#endif
#ifndef AFS_SUN5_ENV
#if defined(AFS_SGI_ENV)
afs_remunlink(avc, 1); /* ignore any return code */
}
#endif
+ afs_PutFakeStat(&fakestat);
code = afs_CheckCode(code, &treq, 5);
return code;
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_cell.c,v 1.1.1.9 2002/01/22 19:47:57 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_cell.c,v 1.1.1.10 2002/08/02 04:28:38 hartmans Exp $");
#include "../afs/stds.h"
#include "../afs/sysincludes.h" /* Standard vendor system headers */
afs_rwlock_t afs_xcell; /* allocation lock for cells */
struct afs_q CellLRU;
afs_int32 afs_cellindex=0;
+afs_int32 afs_realcellindex=0;
afs_uint32 afs_nextCellNum = 0x100;
-
/* Local variables. */
struct cell *afs_rootcell = 0;
} /*afs_GetCellByIndex*/
+struct cell *afs_GetRealCellByIndex(cellindex, locktype, refresh)
+ register afs_int32 cellindex;
+ afs_int32 locktype;
+ afs_int32 refresh;
+{
+ register struct cell *tc;
+ register struct afs_q *cq, *tq;
+
+ AFS_STATCNT(afs_GetCellByIndex);
+ ObtainWriteLock(&afs_xcell,102);
+ for (cq = CellLRU.next; cq != &CellLRU; cq = tq) {
+ tc = QTOC(cq); tq = QNext(cq);
+ if (tc->realcellIndex == cellindex) {
+ QRemove(&tc->lruq);
+ QAdd(&CellLRU, &tc->lruq);
+ ReleaseWriteLock(&afs_xcell);
+ if (refresh) afs_RefreshCell(tc);
+ return tc;
+ }
+ }
+ ReleaseWriteLock(&afs_xcell);
+ return (struct cell *) 0;
+} /*afs_GetRealCellByIndex*/
+
+
afs_int32 afs_NewCell(acellName, acellHosts, aflags, linkedcname, fsport, vlport, timeout, aliasFor)
int aflags;
char *acellName;
tc->vlport = (vlport ? vlport : AFS_VLPORT);
afs_stats_cmperf.numCellsVisible++;
newc++;
+ if (!aflags & CAlias) {
+ tc->realcellIndex = afs_realcellindex++;
+ } else {
+ tc->realcellIndex = -1;
+ }
}
if (aflags & CLinkedCell) {
tc->timeout = timeout;
/* Allow converting an alias into a real cell */
- if (!(aflags & CAlias)) tc->states &= ~CAlias;
+ if (!(aflags & CAlias)) {
+ tc->states &= ~CAlias;
+ tc->realcellIndex = afs_realcellindex++;
+ }
memset((char *)tc->cellHosts, 0, sizeof(tc->cellHosts));
if (aflags & CAlias) {
for (cellidx = 0; cellidx < maxcellidx; cellidx++) {
c = afs_GetCellByIndex(cellidx, READ_LOCK, 0 /* don't refresh */);
- afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,
- c->cellName, VNUM_FROM_CIDX_RW(cellidx, 0));
+ if (!c) continue;
dotCell = afs_osi_Alloc(strlen(c->cellName) + 2);
strcpy(dotCell, ".");
strcat(dotCell, c->cellName);
+ afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,
+ c->cellName, VNUM_FROM_CIDX_RW(cellidx, 0));
afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,
dotCell, VNUM_FROM_CIDX_RW(cellidx, 1));
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_nfsdisp.c,v 1.1.1.3 2002/05/10 23:43:16 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_nfsdisp.c,v 1.1.1.4 2002/08/02 04:28:40 hartmans Exp $");
+/* Ugly Ugly Ugly but precludes conflicting XDR macros; We want kernel xdr */
+#define __XDR_INCLUDE__
#include "../afs/stds.h"
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#if defined(AFS_SUN55_ENV) && !defined(AFS_NONFSTRANS)
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_osi.c,v 1.1.1.10 2002/05/10 23:43:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_osi.c,v 1.1.1.11 2002/08/02 04:28:40 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
AFS_STATS(afs_stats_cmperf.OutStandingAllocs++);
AFS_STATS(afs_stats_cmperf.OutStandingMemUsage += x);
#ifdef AFS_LINUX20_ENV
- return osi_linux_alloc(x);
+ return osi_linux_alloc(x, 1);
#else
size = x;
tm = (struct osimem *) AFS_KALLOC(size);
}
#endif
+#if defined(AFS_LINUX22_ENV)
+void afs_osi_TraverseProcTable()
+{
+ struct task_struct *p;
+ for_each_task(p) if (p->pid) {
+ if (p->state & TASK_ZOMBIE)
+ continue;
+#if 0
+ if (p->flags & )
+ continue;
+#endif
+ afs_GCPAGs_perproc_func(p);
+ }
+}
+#endif
+
/* return a pointer (sometimes a static copy ) to the cred for a
* given AFS_PROC.
* subsequent calls may overwrite the previously returned value.
return rv;
}
+#elif defined(AFS_LINUX22_ENV)
+const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *pr)
+{
+ struct AFS_UCRED *rv=NULL;
+ static struct AFS_UCRED cr;
+
+ if(pr == NULL) {
+ return NULL;
+ }
+
+ if ((pr->state == TASK_RUNNING) ||
+ (pr->state == TASK_INTERRUPTIBLE) ||
+ (pr->state == TASK_UNINTERRUPTIBLE) ||
+ (pr->state == TASK_STOPPED)) {
+ read_lock(&tasklist_lock);
+ cr.cr_ref=1;
+ cr.cr_uid=pr->uid;
+ cr.cr_ngroups=pr->ngroups;
+ memcpy(cr.cr_groups, pr->groups, NGROUPS * sizeof(gid_t));
+ read_unlock(&tasklist_lock);
+ rv = &cr;
+ }
+
+ return rv;
+}
#else
const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *pr)
{
register struct vrequest *areq, int op, afs_int32 locktype,
struct cell *cellp);
+/* afs_cell.c */
+extern struct cell *afs_GetRealCellByIndex(register afs_int32 cellindex,
+ afs_int32 locktype,
+ afs_int32 refresh);
+
/* afs_conn.c */
extern struct conn *afs_ConnBySA(struct srvAddr *sap, unsigned short aport,
afs_int32 acell, struct unixuser *tu,
afs_int32 C_afs_GetCell; /* afs_resource.c*/
afs_int32 C_afs_GetCellByIndex; /* afs_resource.c*/
afs_int32 C_afs_GetCellByName; /* afs_resource.c*/
+ afs_int32 C_afs_GetRealCellByIndex; /* afs_resource.c*/
afs_int32 C_afs_NewCell; /* afs_resource.c*/
afs_int32 C_afs_GetUser; /* afs_resource.c*/
afs_int32 C_afs_PutUser; /* afs_resource.c*/
ec CM_TRACE_VM_CLOSE, "VMclose ip 0x%lx mapcnt %d opens %d XoW %d"
ec CM_TRACE_PREFETCHCMD, "PrefetchCmd tvc 0x%x tfid (%d:%d.%d.%d) fid (%d:%d.%d.%d)"
ec CM_TRACE_RESIDCMD, "ResidencyCmd tvc 0x%x command %d fid (%d:%d.%d.%d)"
+ ec CM_TRACE_DENTRYDELETE, "d_delete inode 0x%x d_name %s/%s"
+ ec CM_TRACE_DENTRYIPUT, "d_iput inode 0x%x d_name %s/%s"
+ ec CM_TRACE_TRYFLUSHDCACHECHILDREN, "TryFlushDcacheChildren ip 0x%x"
end
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_vcache.c,v 1.1.1.12 2002/05/10 23:43:26 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_vcache.c,v 1.1.1.13 2002/08/02 04:28:44 hartmans Exp $");
#include "../afs/sysincludes.h" /*Standard vendor system headers*/
#include "../afs/afsincludes.h" /*AFS-based standard headers*/
repeat:
next = this_parent->d_subdirs.next;
resume:
- while (next != &this_parent->d_subdirs) {
+ while (next && next != &this_parent->d_subdirs) {
struct list_head *tmp = next;
struct dentry *dchld = list_entry(tmp, struct dentry, d_child);
INIT_LIST_HEAD(&ip->i_devices);
#endif
ip->i_data.host = (void*) ip;
+#ifdef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
+ ip->i_data.gfp_mask = GFP_HIGHUSER;
+#endif
ip->i_mapping = &ip->i_data;
#ifdef STRUCT_INODE_HAS_I_TRUNCATE_SEM
init_rwsem(&ip->i_truncate_sem);
avc->m.Mode |= S_IFDIR;
}
else if (astat->FileType == SymbolicLink) {
- vSetType(avc, VLNK);
- avc->m.Mode |= S_IFLNK;
- if ((avc->m.Mode & 0111) == 0) avc->mvstat = 1;
+ if (afs_fakestat_enable && (avc->m.Mode & 0111) == 0) {
+ vSetType(avc, VDIR);
+ avc->m.Mode |= S_IFDIR;
+ } else {
+ vSetType(avc, VLNK);
+ avc->m.Mode |= S_IFLNK;
+ }
+ if ((avc->m.Mode & 0111) == 0) {
+ avc->mvstat = 1;
+ }
}
avc->anyAccess = astat->AnonymousAccess;
#ifdef badidea
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/afsd/afsd.c,v 1.1.1.13 2002/06/10 11:44:53 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afsd/afsd.c,v 1.1.1.14 2002/08/02 04:33:53 hartmans Exp $");
#define VFS 1
static int enable_afsdb = 0; /* enable AFSDB support */
#endif
static int enable_dynroot = 0; /* enable dynroot support */
+static int enable_fakestat = 0; /* enable fakestat support */
#ifdef notdef
static int inodes = 60; /* VERY conservative, but has to be */
#endif
printf("\t%d out of 3 fields successfully parsed.\n",
parseResult);
- printf("\tcacheMountDir: '%s'\n\tcacheBaseDir: '%s'\n\tcacheBlocks: %d\n",
- cacheMountDir, cacheBaseDir, cacheBlocks);
return(1);
}
/* -dynroot */
enable_dynroot = 1;
}
+ if (as->parms[27].items) {
+ /* -fakestat */
+ enable_fakestat = 1;
+ }
/*
* Pull out all the configuration info for the workstation's AFS cache and
printf("%s: Error enabling dynroot support.\n", rn);
}
+ if (enable_fakestat) {
+ if (afsd_verbose)
+ printf("%s: Enabling fakestat support in kernel.\n", rn);
+ code = call_syscall(AFSOP_SET_FAKESTAT, 1);
+ if (code)
+ printf("%s: Error enabling fakestat support.\n", rn);
+ }
+
/* Initialize AFS daemon threads. */
if (afsd_verbose)
printf("%s: Forking AFS daemon.\n", rn);
), "Enable AFSDB support");
cmd_AddParm(ts, "-files_per_subdir", CMD_SINGLE, CMD_OPTIONAL, "log(2) of the number of cache files per cache subdirectory");
cmd_AddParm(ts, "-dynroot", CMD_FLAG, CMD_OPTIONAL, "Enable dynroot support");
+ cmd_AddParm(ts, "-fakestat", CMD_FLAG, CMD_OPTIONAL, "Enable fakestat support");
return (cmd_Dispatch(argc, argv));
}
+AC_DEFUN(LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, [
+AC_MSG_CHECKING(for gfp_mask in struct address_space)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_gfp_mask,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct address_space _a;
+printf("%d\n", _a.gfp_mask);],
+ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes,
+ac_cv_linux_fs_struct_address_space_has_gfp_mask=no)])
+AC_MSG_RESULT($ac_cv_linux_fs_struct_address_space_has_gfp_mask)
+CPPFLAGS="$save_CPPFLAGS"])
+
AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_BYTES, [
AC_MSG_CHECKING(for i_bytes in struct inode)
save_CPPFLAGS="$CPPFLAGS"
#define AFSOP_AFSDB_HANDLER 30 /* userspace AFSDB lookup handler */
#define AFSOP_SET_DYNROOT 31 /* enable/disable dynroot support */
#define AFSOP_ADDCELLALIAS 32 /* create alias for existing cell */
+#define AFSOP_SET_FAKESTAT 33 /* enable/disable fakestat support */
/* The range 20-30 is reserved for AFS system offsets in the afs_syscall */
#define AFSCALL_PIOCTL 20
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef __SMP__
#define __SMP__
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "alpha_linux_22"
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef __SMP__
#define __SMP__
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "alpha_linux_24"
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef __SMP__
#define __SMP__
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "ia64_linux24"
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef __SMP__
#define __SMP__
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
-
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "parisc_linux24"
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef CONFIG_S390_LOCAL_APIC
#define CONFIG_S390_LOCAL_APIC
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "s390_linux22"
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef CONFIG_S390_LOCAL_APIC
#define CONFIG_S390_LOCAL_APIC
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "s390_linux24"
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#define __SMP__
#define AFS_GLOBAL_SUNLOCK
#endif
* MP to compile for Linux
*/
#ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
#ifndef __SMP__
#define __SMP__
#endif
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "sparc_linux24"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/krb_udp.c,v 1.1.1.11 2001/10/14 18:05:10 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/krb_udp.c,v 1.1.1.12 2002/08/02 04:35:18 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
+#include <errno.h>
#ifdef AFS_NT40_ENV
#include <winsock2.h>
+#include <afs/errmap_nt.h>
#define snprintf _snprintf
#else
#include <sys/socket.h>
code = recvfrom(sock_kerb, packet.data, sizeof(packet.data), 0,
(struct sockaddr *) &packet.from, &fromLen);
if (code < 0) {
+ if (errno == EAGAIN || errno == ECONNREFUSED)
+ goto try_kerb5;
perror ("calling recvfrom");
break;
}
packet.time = 0;
process_udp_request (sock_kerb, &packet);
}
+try_kerb5:
if ((sock_kerb5 >= 0) && FD_ISSET(sock_kerb5, &rfds)) {
code = recvfrom(sock_kerb5, packet.data, sizeof(packet.data), 0,
(struct sockaddr *) &packet.from, &fromLen);
if (code < 0) {
+ if (errno == EAGAIN || errno == ECONNREFUSED)
+ continue;
perror ("calling recvfrom");
break;
}
process_udp_request (sock_kerb5, &packet);
}
}
+ if (sock_kerb >= 0) {
+ close(sock_kerb);
+ sock_kerb = -1;
+ }
+ if (sock_kerb5 >= 0) {
+ close(sock_kerb5);
+ sock_kerb5 = -1;
+ }
+ printf("UDP SocketListener exiting due to error\n");
}
#if MAIN
#
# $ what /opt/langtools/bin/pxdb32
# /opt/langtools/bin/pxdb32:
-# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1 $
+# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.2 $
#
# The problem occurs when -g and -O are both used when compiling des.c.
# The simplest way to work around the problem is to leave out either -g or -O.
syscall.o: ${SYS}/syscall.s
case "$(SYS_NAME)" in \
- sun4x_5*) \
+ sun4x_5*|sunx86_5*) \
/usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
login: ${OBJS} ${LIBS}
case ${SYS_NAME} in \
- sun4x_5? ) ${CC} -g -o $@ ${CFLAGS} ${OBJS} -lc ${LIBS} ${XLIBS} -lcmd;;\
+ sun4x_5? | sunx86_5? ) ${CC} -g -o $@ ${CFLAGS} ${OBJS} -lc ${LIBS} ${XLIBS} -lcmd;;\
*) ${CC} -g -o $@ ${CFLAGS} ${OBJS} ${LIBS} ${XLIBS} ;;\
esac
login.krb: ${KOBJS} ${KLIBS}
case ${SYS_NAME} in \
- sun4x_5? ) ${CC} -g -o $@ ${CFLAGS} ${KOBJS} -lc ${KLIBS} ${XLIBS} -lcmd;;\
+ sun4x_5? | sunx86_5? ) ${CC} -g -o $@ ${CFLAGS} ${KOBJS} -lc ${KLIBS} ${XLIBS} -lcmd;;\
*) ${CC} -g -o $@ ${CFLAGS} ${KOBJS} ${KLIBS} ${XLIBS} ;;\
esac
${AFSLIBS} ${PAMLIBS} @LIB_AFSDB@
KLIBS = ${TOP_LIBDIR}/libkauth.krb.a ${LIBSA} ${TOP_LIBDIR}/libauth.krb.a \
${AFSLIBS} ${PAMLIBS} @LIB_AFSDB@
- SHOBJS = afs_auth.o afs_account.o afs_session.o afs_password.o \
- afs_pam_msg.o afs_message.o afs_util.o AFS_component_version_number.o
+ SHOBJS = afs_account.o afs_session.o afs_password.o \
+ afs_pam_msg.o afs_message.o AFS_component_version_number.o
OBJS = $(SHOBJS) test_pam.o
INCLUDES=-I${TOP_SRCDIR}/config -I${TOP_INCDIR} \
-I/usr/include -I/usr/include/sys
afs_setcred_krb.o: afs_setcred.c afs_pam_msg.h afs_message.h afs_util.h
${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c afs_setcred.c -o afs_setcred_krb.o
-pam_afs.so.1: $(SHOBJS) afs_setcred.o
+afs_auth.o: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
+ ${CC} ${CFLAGS} -c afs_auth.c -o afs_auth.o
+
+afs_auth_krb.o: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
+ ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c afs_auth.c -o afs_auth_krb.o
+
+afs_util.o: afs_util.c afs_util.h
+ ${CC} ${CFLAGS} -c afs_util.c -o afs_util.o
+
+afs_util_krb.o: afs_util.c afs_util.h
+ ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c afs_util.c -o afs_util_krb.o
+
+pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
set -x; \
case "$(SYS_NAME)" in \
hp_ux*) \
- $(LD) $(LDFLAGS) -c mapfile.hp -o $@ afs_setcred.o \
+ $(LD) $(LDFLAGS) -c mapfile.hp -o $@ afs_setcred.o afs_auth.o afs_util.o\
$(SHOBJS) $(LIBS) ;; \
sun*_5*) \
- $(LD) $(LDFLAGS) -M mapfile -o $@ afs_setcred.o \
+ $(LD) $(LDFLAGS) -M mapfile -o $@ afs_setcred.o afs_auth.o afs_util.o\
$(SHOBJS) $(LIBS) ;; \
*linux*) \
- $(CC) $(LDFLAGS) -o $@ afs_setcred.o $(SHOBJS) $(LIBS) ;;\
+ $(CC) $(LDFLAGS) -o $@ afs_setcred.o afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
*fbsd*) \
- $(CC) $(LDFLAGS) -o $@ afs_setcred.o $(SHOBJS) $(LIBS) ;;\
+ $(CC) $(LDFLAGS) -o $@ afs_setcred.o afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
* ) \
echo No link line for system $(SYS_NAME). ;; \
esac
-pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o
+pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
set -x; \
case "$(SYS_NAME)" in \
hp_ux*) \
$(LD) $(LDFLAGS) -c mapfile.hp -o $@ \
- afs_setcred_krb.o $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
+ afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
sun*_5*) \
$(LD) $(LDFLAGS) -M mapfile -o $@ \
- afs_setcred_krb.o $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
+ afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
*linux*) \
- $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o $(SHOBJS) $(KLIBS) ;;\
+ $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
*fbsd*) \
- $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o $(SHOBJS) $(KLIBS) ;;\
+ $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
* ) \
echo No link line for system $(SYS_NAME). ;; \
esac
/* And how to do a good tryenter? */
static inline int MUTEX_TRYENTER(afs_kmutex_t *l)
{
- if (!l->owner) {
- MUTEX_ENTER(l);
- return 1;
- }
- else
- return 0;
+ if (down_trylock(&l->sem))
+ return 0;
+ l->owner = current->pid;
+ return 1;
}
static inline void MUTEX_EXIT(afs_kmutex_t *l)
#endif
#define CV_DESTROY(cv)
-/* CV_WAIT and CV_TIMEDWAIT rely on the fact that the Linux kernel has
- * a global lock. Thus we can safely drop our locks before calling the
- * kernel sleep services.
+/* CV_WAIT and CV_TIMEDWAIT sleep until the specified event occurs, or, in the
+ * case of CV_TIMEDWAIT, until the specified timeout occurs.
+ * - NOTE: that on Linux, there are circumstances in which TASK_INTERRUPTIBLE
+ * can wake up, even if all signals are blocked
+ * - TODO: handle signals correctly by passing an indication back to the
+ * caller that the wait has been interrupted and the stack should be cleaned
+ * up preparatory to signal delivery
*/
static inline int CV_WAIT(afs_kcondvar_t *cv, afs_kmutex_t *l)
{
int isAFSGlocked = ISAFS_GLOCK();
sigset_t saved_set;
+#ifdef DECLARE_WAITQUEUE
+ DECLARE_WAITQUEUE(wait, current);
+#else
+ struct wait_queue wait = { current, NULL };
+#endif
+
+ add_wait_queue(cv, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
if (isAFSGlocked) AFS_GUNLOCK();
MUTEX_EXIT(l);
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
-#if defined(AFS_LINUX24_ENV)
- interruptible_sleep_on((wait_queue_head_t *)cv);
-#else
- interruptible_sleep_on((struct wait_queue**)cv);
-#endif
+ schedule();
+ remove_wait_queue(cv, &wait);
spin_lock_irq(¤t->sigmask_lock);
current->blocked = saved_set;
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
- MUTEX_ENTER(l);
if (isAFSGlocked) AFS_GLOCK();
+ MUTEX_ENTER(l);
return 0;
}
int isAFSGlocked = ISAFS_GLOCK();
long t = waittime * HZ / 1000;
sigset_t saved_set;
+#ifdef DECLARE_WAITQUEUE
+ DECLARE_WAITQUEUE(wait, current);
+#else
+ struct wait_queue wait = { current, NULL };
+#endif
+
+ add_wait_queue(cv, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
if (isAFSGlocked) AFS_GUNLOCK();
MUTEX_EXIT(l);
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
-#if defined(AFS_LINUX24_ENV)
- t = interruptible_sleep_on_timeout((wait_queue_head_t *)cv, t);
-#else
- t = interruptible_sleep_on_timeout((struct wait_queue**)cv, t);
-#endif
+ t = schedule_timeout(t);
+ remove_wait_queue(cv, &wait);
spin_lock_irq(¤t->sigmask_lock);
current->blocked = saved_set;
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
- MUTEX_ENTER(l);
if (isAFSGlocked) AFS_GLOCK();
+ MUTEX_ENTER(l);
return 0;
}
# Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
# Really the xdr stuff should be in its own directory.
#
-XDROBJS = xdr_arrayn.o xdr_rx.o xdr_afsuuid.o
+XDROBJS = xdr.o xdr_array.o xdr_arrayn.o xdr_rx.o xdr_afsuuid.o
RXOBJS = rx_clock.o rx_event.o rx_user.o rx_lwp.o rx.o rx_null.o rx_globals.o \
rx_getaddr.o rx_misc.o rx_packet.o rx_rdwr.o rx_trace.o rx_conncache.o \
#endif
#include <afsconfig.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_clock.c,v 1.1.1.6 2001/10/14 18:06:18 hartmans Exp $");
+#ifdef AFS_SUN59_ENV
+#include <sys/time_impl.h>
+#endif
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_clock.c,v 1.1.1.7 2002/08/02 04:36:19 hartmans Exp $");
#ifdef KERNEL
#ifndef UKERNEL
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_event.c,v 1.1.1.6 2002/05/11 00:01:25 hartmans Exp $");
+#ifdef AFS_SUN59_ENV
+#include <sys/time_impl.h>
+#endif
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_event.c,v 1.1.1.7 2002/08/02 04:36:20 hartmans Exp $");
#ifdef KERNEL
#ifndef UKERNEL
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_lwp.c,v 1.1.1.8 2001/07/14 22:23:31 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_lwp.c,v 1.1.1.9 2002/08/02 04:36:22 hartmans Exp $");
# include <sys/types.h> /* fd_set on older platforms */
# include <errno.h>
#elif defined(AFS_LINUX22_ENV)
/* linux unfortunately returns ECONNREFUSED if the target port
* is no longer in use */
- if (errno != EWOULDBLOCK && errno != ENOBUFS && errno != ECONNREFUSED)
+ /* and EAGAIN if a UDP checksum is incorrect */
+ if (errno != EWOULDBLOCK && errno != ENOBUFS &&
+ errno != ECONNREFUSED && errno != EAGAIN)
#else
if (errno != EWOULDBLOCK && errno != ENOBUFS)
#endif
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_pthread.c,v 1.1.1.8 2001/10/14 18:06:23 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_pthread.c,v 1.1.1.9 2002/08/02 04:36:23 hartmans Exp $");
#include <sys/types.h>
#include <errno.h>
#ifdef AFS_LINUX22_ENV
/* linux unfortunately returns ECONNREFUSED if the target port
* is no longer in use */
- if (ret == -1 && errno != ECONNREFUSED) {
+ /* and EAGAIN if a UDP checksum is incorrect */
+ if (ret == -1 && errno != ECONNREFUSED && errno != EAGAIN) {
#else
if (ret == -1) {
#endif
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/rxkad_common.c,v 1.1.1.9 2002/06/10 11:47:28 hartmans Exp $");
+#ifdef AFS_SUN59_ENV
+#include <sys/time_impl.h>
+#endif
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/rxkad_common.c,v 1.1.1.10 2002/08/02 04:36:36 hartmans Exp $");
#ifdef KERNEL
#ifndef UKERNEL
VOLSER = ../volser
BUCOORDOBJS=ubik_db_if.o ${BUCOORD}/volstub.o ${BUCOORD}/dlq.o \
- ${BUCOORD}/status.o ${BUCOORD}/bucoord_errs.o
+ status.o ${BUCOORD}/bucoord_errs.o
VOLSERLIBOBJ=${VOLSER}/volint.cs.o vsprocs.o ${VOLSER}/vsutils.o \
${VOLSER}/lockprocs.o ${VOLSER}/volint.xdr.o ${VOLSER}/volerr.o \
ubik_db_if.o: ${BUCOORD}/ubik_db_if.c
${CC} ${CFLAGS} -c ${BUCOORD}/ubik_db_if.c
+status.o: ${BUCOORD}/status.c
+ ${CC} ${CFLAGS} -c ${BUCOORD}/status.c
+
vsprocs.o: ${VOLSER}/vsprocs.c
${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c
## License. For details, see the LICENSE file in the top-level source
## directory or online at http://www.openafs.org/dl/license10.html
##
-## openafs-tools, Version 1.2.2 ##
+## openafs-tools, Version 1.2.5 ##
Follow these steps to create a binary distribution RPM for the
openafs-tools-cmd package no Red Hat Linux:
1) Copy the spec file to your SPECS directory.
- cp openafs-tools-cmd-1.2.2-1.spec /usr/src/redhat/SPECS/
+ cp openafs-tools-cmd-1.2.5-1.spec /usr/src/redhat/SPECS/
2) Create the source package by running:
3) Now you can create the RPM:
cd /usr/src/redhat/SPECS
- rpm -ba --clean openafs-tools-cmd-1.2.2-1.i386.rpm
+ rpm -ba --clean openafs-tools-cmd-1.2.5-1.i386.rpm
The RPM is now ready for use in the
/usr/src/redhat/RPMS directory.
rm -f /usr/vice/etc/ThisCell
rm -f /usr/vice/etc/AFSLog
rm -rf /usr/vice/cache
+rm -f $afscodeFileDir/install_output
+rm -f $afscodeFileDir/done.txt
mkdir /usr/vice/cache
+echo "If you were using K5 authentication, make sure you delete all AFS related principals."
echo "Uninstall" > $afscodeFileDir/.afs_state
echo "complete" >> $afscodeFileDir/.afs_state
echo -e "\t-adminPassword (or -p) password: the administrative\n\t password of the cell. Ignored if this is not a server"
echo -e "\t-existingServer (or -e) name: the name of an\n\t existing server already in the cell. Ignored if\n\t this is not an additional server"
echo -e "\t-scriptDirectory (or -d) name: the name of the\n\t directory containing these OpenAFS installation\n\t scripts"
+ echo -e "\t-krb5 (or -k): Set up Kerberos 5 authentication on this\n\t machine. Assumes this machine is a client of a Kerberos\n\t realm that has the same name as the cell being created,\n\t but all caps. Ignored if this is not a first server."
+ echo -e "\t-kadminPassword (or -ka) password: the administrative\n\t password of the kerberos realm. Ignored if the -krb5\n\t flag is not set."
echo -e "\t-noConf (or -n): Do not ask for confirmation before\n\t performing the installation."
echo -e "\thelp: Display this help dialogue"
echo
if [ $# -ne 0 ]; then
shift
fi
- if [ $flag != "-noConf" -a $flag != "-n" ]; then
+ if [ $flag != "-noConf" -a $flag != "-n" -a $flag != "-krb5" -a $flag != "-k" ]; then
val=$1
if [ $# -ne 0 ]; then
shift
else
if [ $flag = "-noConf" -o $flag = "-n" ]; then
noConf=$val
+ else
+ if [ $flag = "-krb5" -o $flag = "-k" ]; then
+ krb5=$val
+ else
+ if [ $flag = "-kadminPassword" -o $flag = "-ka" ]; then
+ kadminPassword=$val
else
echo Invalid flag $flag. Use \"install_afs help\" for syntax.
exit 0;
- fi fi fi fi fi fi fi fi fi fi
+ fi fi fi fi fi fi fi fi fi fi fi fi
done
# Collect variables not given:
done
fi
+if [ $krb5 -ne 0 ]; then
+ while [ -z $kadminPassword ]; do
+ echo -ne "Provide the administrative password of the Kerberos realm: "
+ stty -echo echonl
+ read kadminPassword
+ stty echo
+ echo -ne "Please confirm the password: "
+ stty -echo echonl
+ read kadminPassword2
+ stty echo
+
+ if [ -z $kadminPassword ]; then
+ echo -e "You must give a password"
+ else
+ if [ -z $kadminPassword2 ]; then
+ echo -e "You must confirm the password"
+ adminPassword=""
+ else
+ if [ $kadminPassword != $kadminPassword2 ]; then
+ echo -e "Passwords do not match"
+ kadminPassword=""
+ fi fi fi
+ done
+fi
+
# Make sure the needed files exist:
if [ $serverType -eq $addServer ]; then
while [ ! -e $scriptDir/afs/ -o ! -e $scriptDir/afs/ThisCell -o ! -e $scriptDir/afs/CellServDB -o ! -e $scriptDir/afs/KeyFile -o ! -e $scriptDir/afs/UserList ]; do
echo kill ${bosserver_process%% /*}
kill ${bosserver_process%% /*}
- /usr/afs/bin/kaserver -noauth &
+ if [ -z $krb5 ]; then
+ /usr/afs/bin/kaserver -noauth &
- echo Configuring kaserver
- kas create afs -initial_password $afsPassword -cell $cellName -noauth
- kas examine -name afs -cell $cellName -noauth
- kas create admin -initial_password $adminPassword -cell $cellName -noauth
- kas setfields admin -flags admin -cell $cellName -noauth
- kas examine -name admin -cell $cellName -noauth
+ echo Configuring kaserver
+ kas create afs -initial_password $afsPassword -cell $cellName -noauth
+ kas examine -name afs -cell $cellName -noauth
+ kas create admin -initial_password $adminPassword -cell $cellName -noauth
+ kas setfields admin -flags admin -cell $cellName -noauth
+ kas examine -name admin -cell $cellName -noauth
- kaserver_process=$(ps -Ao pid,cmd | grep kaserver)
- echo kill ${kaserver_process%% /*}
- kill ${kaserver_process%% /*}
+ kaserver_process=$(ps -Ao pid,cmd | grep kaserver)
+ echo kill ${kaserver_process%% /*}
+ kill ${kaserver_process%% /*}
+
+ else
+
+ echo Setting up krb5
+ kadmin -p admin/admin -w $kadminPassword -q "addprinc -pw $adminPassword afs"
+ kadmin -p admin/admin -w $kadminPassword -q "modprinc -kvno 0 afs"
+ kadmin -p admin/admin -w $kadminPassword -q "ktadd -k /etc/krb5.keytab -e des-cbc-crc:afs3 afs"
+ asetkey add 1 /etc/krb5.keytab afs
+ kadmin -p admin/admin -w $kadminPassword -q "ktremove -k /etc/krb5.keytab afs all"
+ kadmin -p admin/admin -w $kadminPassword -q "addprinc -pw $adminPassword admin"
+ kadmin -p admin/admin -w $kadminPassword -q "ktadd -k /etc/krb5.keytab admin"
+
+ fi
echo Bootstrapping ptserver
- echo -e "admin 128/20 1 -204 -204\nsystem:administrators 130/20 -204 -204 -204\n admin 1\n" | pt_util -p /usr/afs/db/prdb.DB0 -w
+ echo -e "admin 128/20 1 -204 -204\nsystem:administrators 130/20 -204 -204 -204\n admin 1\n" | /usr/afs/bin/pt_util -p /usr/afs/db/prdb.DB0 -w
fi
#
echo Starting the Database Server Processes
#
- echo bos create -server $machineName -instance kaserver -type simple -cmd /usr/afs/bin/kaserver -cell $cellName -localauth
- bos create -server $machineName -instance kaserver -type simple -cmd /usr/afs/bin/kaserver -cell $cellName -localauth
+ if [ -z $krb5 ]; then
+ echo bos create -server $machineName -instance kaserver -type simple -cmd /usr/afs/bin/kaserver -cell $cellName -localauth
+ bos create -server $machineName -instance kaserver -type simple -cmd /usr/afs/bin/kaserver -cell $cellName -localauth
+ fi
echo bos create -server $machineName -instance buserver -type simple -cmd /usr/afs/bin/buserver -cell $cellName -localauth
bos create -server $machineName -instance buserver -type simple -cmd /usr/afs/bin/buserver -cell $cellName -localauth
echo bos create -server $machineName -instance ptserver -type simple -cmd /usr/afs/bin/ptserver -cell $cellName -localauth
echo /etc/rc.d/init.d/afs start
/etc/rc.d/init.d/afs start
if [ $serverType -ne $notServer ]; then
- # klog in as admin
- echo klog admin -password
- klog admin -password $adminPassword
+
+ if [ -z $krb5 ]; then
+ # klog in as admin
+ echo klog admin -password
+ klog admin -password $adminPassword
+ else
+ kinit -t /etc/krb5.keytab admin
+ aklog
+ fi
+
# verify klog worked correctly:
echo tokens
tokens
/etc/rc.d/init.d/afs start
cd /afs
- # klog in as admin
- echo klog admin -password
- klog admin -password $adminPassword
+ if [ -z $krb5 ]; then
+ # klog in as admin
+ echo klog admin -password
+ klog admin -password $adminPassword
+ else
+ kinit -t /etc/krb5.keytab admin
+ aklog
+ kadmin -p admin/admin -w $kadminPassword -q "ktremove -k /etc/krb5.keytab admin all"
+ kadmin -p admin/admin -w $kadminPassword -q "cpw -pw $adminPassword admin"
+ fi
# Wait for Ubik to elect a quorum
echo Waiting for a quorum election . . .
echo fs examine /afs/$cellName
fs examine /afs/$cellName
-#
-#
fi
fs checkvolumes
#
cp $mainFileDir/afsinit_server .
cp $mainFileDir/afs_uninstall .
cp $mainFileDir/install_afs .
+cp $mainFileDir/K5_README .
+cp $mainFileDir/check_udebug.pl .
cp $mainFileDir/write_fstab.pl .
cp $mainFileDir/write_pam.pl .
#
cp -f afsinit_server $mainFileDir/
cp -f afs_uninstall $mainFileDir/
cp -f install_afs $mainFileDir/
+cp -f K5_README $mainFileDir/
cp -f check_udebug.pl $mainFileDir/
cp -f write_fstab.pl $mainFileDir/
cp -f write_pam.pl $mainFileDir/
## License. For details, see the LICENSE file in the top-level source
## directory or online at http://www.openafs.org/dl/license10.html
##
-## openafs-tools, Version 1.2.2 ##
+## openafs-tools, Version 1.2.5 ##
####################### TABLE OF CONTENTS ###########################
openafs-server-1.2.2-rh6.2.1.i386.rpm
Red Hat 7.1:
openafs-kernel-1.2.2-rh7.1.1.i386.rpm
- openafs-1.2.2-rh7.11..i386.rpm
+ openafs-1.2.2-rh7.1.1.i386.rpm
openafs-client-1.2.2-rh7.1.1.i386.rpm
openafs-server-1.2.2-rh7.1.1.i386.rpm
Once these are downloaded, install them (using an rpm -i or rpm -U
c) OpenAFS Tools
Now all that's left to do is install the OpenAFS Tools rpm. The
-file you need is openafs-tools-1.1.1-1.i386.rpm. Install it using
+file you need is openafs-tools-1.2.2-1.i386.rpm. Install it using
an rpm -i or rpm -U command. This will create several directories
and populate your system with necessary files. The main directories
created and populated is:
on the command line, you will be prompted for them interactively.
To get a rundown on how to use install_afs, execute:
/usr/afs/tools/install/install_afs help
-Once configured correctly, this machine will run the installation
-program (the same one run by the web interface), and restart your
-computer.
+
+If you are creating an additional server or not a server, OpenAFS
+Tools will ensure that you have all the required files on your
+system. These are files needed by the OpenAFS installation program
+to connect you to cells that already exist. You must get these files
+manually from an existing server, as we have not yet implemented
+a secure way of doing this automatically. For additional servers,
+the files you need to copy are:
+ - Copy the /usr/afs/etc/ThisCell file from the existing server
+to /usr/afs/tools/install/afs/ThisCell on your machine.
+ - Copy the /usr/afs/etc/CellServDB file from the existing server
+to /usr/afs/tools/install/afs/CellServDB on your machine.
+ - Copy the /usr/afs/etc/KeyFile file from the existing server
+to /usr/afs/tools/install/afs/KeyFile on your machine.
+ - Copy the /usr/afs/etc/UserList file from the existing server
+to /usr/afs/tools/install/afs/UserList on your machine.
+ - Copy the /usr/vice/etc/CellServDB file from the existing server
+to /usr/afs/tools/install/vice/CellServDB on your machine.
+
+ For client-only installation, you need the following file:
+ - Copy the /usr/vice/etc/CellServDB file from the existing server
+to /usr/afs/tools/install/vice/CellServDB on your machine.
b) OpenAFS Uninstallation
- Installation starts with the script install_afs. The first thing
it does is ensure that the files needed for setting up additional
servers and/or clients exist in the appropriate places (see section
-3.a.i for a description of these files). Then, after indicating to
+3.a for a description of these files). Then, after indicating to
the state file that installation has begun, it begins installing
OpenAFS.
- For clients, it then enables Pam Login Authentication using
Currently we use the administrative password for the afs account
password. The admin account is now added to the bos server database
and a pts entry is created as well. Also, the afs account password
-is added as a key for the server. The kaserver proces is terminated.
+is added as a key for the server. The kaserver process is terminated.
The pts database is then bootstrapped to add the administrator to it.
- For first servers, a normal bosserver is started. It then
creates the database server processes (kaserver, buserver, ptserver,
b) OpenAFS Uninstallation
- Uninstallation has only two files: the main script and the
-redirection script.
+ Uninstallation has only one file:
/usr/afs/tools/install/afs_uninstall
Here is a brief summary of what it does to uninstall OpenAFS:
- First it indicates to the state file that uninstallation has
/* afs installation dir names */
#define AFSDIR_ETC_DIR "etc"
#define AFSDIR_BIN_DIR "bin"
+#define AFSDIR_SERVER_ETC_DIR "etc"
+#define AFSDIR_SERVER_BIN_DIR "bin"
+#define AFSDIR_CLIENT_ETC_DIR "etc"
#define AFSDIR_CORES_DIR "cores"
#define AFSDIR_DB_DIR "db"
#define AFSDIR_LOGS_DIR "logs"
#define AFSDIR_BACKUP_DIR "backup"
#define AFSDIR_MIGR_DIR "local/migrate"
#define AFSDIR_BIN_FILE_DIR "local/migrate/bin_files"
+#define AFSDIR_BOSCONFIG_DIR "local"
+#define AFSDIR_BOSSERVER_DIR "bin"
/* file names */
#define AFSDIR_THISCELL_FILE "ThisCell"
#define AFSDIR_CELLSERVDB_FILE "CellServDB"
+#define AFSDIR_CELLALIAS_FILE "CellAlias"
#define AFSDIR_KEY_FILE "KeyFile"
#define AFSDIR_ULIST_FILE "UserList"
#define AFSDIR_NOAUTH_FILE "NoAuth"
AFSDIR_SERVER_MIGRATE_DIRPATH_ID,
AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID,
AFSDIR_SERVER_BIN_FILE_DIRPATH_ID,
+ AFSDIR_CLIENT_CELLALIAS_FILEPATH_ID,
AFSDIR_PATHSTRING_MAX } afsdir_id_t;
/* getDirPath() returns a pointer to a string from an internal array of path strings
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/util/uuid.c,v 1.1.1.7 2001/10/14 18:07:05 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/util/uuid.c,v 1.1.1.8 2002/08/02 04:37:25 hartmans Exp $");
#ifdef KERNEL
#include "../afs/sysincludes.h"
return (0);
}
+#if !defined(KERNEL) && !defined(UKERNEL)
+/*
+ * Converts a string UUID to binary representation.
+ */
+
+int
+afsUUID_from_string(const char *str, afsUUID *uuid)
+{
+ unsigned int time_low, time_mid, time_hi_and_version;
+ unsigned int clock_seq_hi_and_reserved, clock_seq_low;
+ unsigned int node[6];
+ int i;
+
+ i = sscanf(str, "%08x-%04x-%04x-%02x-%02x-%02x%02x%02x%02x%02x%02x",
+ &time_low,
+ &time_mid,
+ &time_hi_and_version,
+ &clock_seq_hi_and_reserved,
+ &clock_seq_low,
+ &node[0], &node[1], &node[2], &node[3], &node[4], &node[5]);
+ if (i != 11)
+ return -1;
+
+ uuid->time_low = time_low;
+ uuid->time_mid = time_mid;
+ uuid->time_hi_and_version = time_hi_and_version;
+ uuid->clock_seq_hi_and_reserved = clock_seq_hi_and_reserved;
+ uuid->clock_seq_low = clock_seq_low;
+
+ for (i = 0; i < 6; i++)
+ uuid->node[i] = node[i];
+
+ return 0;
+}
+
+/*
+ * Converts a UUID from binary representation to a string representation.
+ */
+
+int
+afsUUID_to_string(const afsUUID *uuid, char *str, size_t strsz)
+{
+ snprintf(str, strsz,
+ "%08x-%04x-%04x-%02x-%02x-%02x%02x%02x%02x%02x%02x",
+ uuid->time_low,
+ uuid->time_mid,
+ uuid->time_hi_and_version,
+ (unsigned char)uuid->clock_seq_hi_and_reserved,
+ (unsigned char)uuid->clock_seq_low,
+ (unsigned char)uuid->node[0],
+ (unsigned char)uuid->node[1],
+ (unsigned char)uuid->node[2],
+ (unsigned char)uuid->node[3],
+ (unsigned char)uuid->node[4],
+ (unsigned char)uuid->node[5]);
+
+ return 0;
+}
+#endif
+
afs_int32 afs_uuid_create (uuid)
afsUUID *uuid; {
uuid_address_t eaddr;
for f in kdump.IP??; \
do ${INSTALL} -s $$f ${DEST}/etc/$$f || exit $$? ; \
done ;; \
- sun4x_5[789] ) \
+ sun*_5[789] ) \
${INSTALLex} -f kdump.sh.solaris7 $@; \
${INSTALL} -s -f $? ${DEST}/etc/kdump32;; \
*linux* ) \
case ${SYS_NAME} in \
sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_54 | sun4c_54 | sun4m_54 | sunx86_54) \
${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libkvm.a -lelf ${XLIBS} ;; \
- sun4x_5? ) \
+ sun*_5? ) \
${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBELFA} ${XLIBKVM} ${XLIBS} ;; \
sgi_6? ) \
for f in ../libafs/STATIC.IP*/CPU_KDEFS; \
for f in kdump.IP??; \
do ${INSTALL} -s $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
done ;; \
- sun4x_5[789] ) \
+ sun*_5[789] ) \
${INSTALLex} -f kdump.sh.solaris7 $@; \
${INSTALL} -s -f $? ${DESTDIR}${sbindir}/kdump32;; \
*linux* ) \
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/fssync.c,v 1.1.1.5 2001/09/11 14:35:42 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/fssync.c,v 1.1.1.6 2002/08/02 04:37:35 hartmans Exp $");
#include <sys/types.h>
#include <stdio.h>
int fd;
{
byte rc = FSYNC_OK;
- int n, i;
+ int n, i, ack = 1;
Error error;
struct command command;
int leaveonline;
vp->specialStatus = VMOVED;
VPutVolume_r(vp);
}
+#ifdef AFS_NT40_ENV
+ send(fd, &rc, 1, 0);
+#else
+ write(fd, &rc, 1);
+#endif
+ ack = 0;
if (V_BreakVolumeCallbacks) {
Log("fssync: volume %u moved to %x; breaking all call backs\n",
command.volume, command.reason);
break;
case FSYNC_RESTOREVOLUME:
/* if the volume is being restored, break all callbacks on it*/
+#ifdef AFS_NT40_ENV
+ send(fd, &rc, 1, 0);
+#else
+ write(fd, &rc, 1);
+#endif
+ ack = 0;
if (V_BreakVolumeCallbacks) {
VOL_UNLOCK
VATTACH_UNLOCK
}
VOL_UNLOCK
VATTACH_UNLOCK
+ if (ack) {
#ifdef AFS_NT40_ENV
- send(fd, &rc, 1, 0);
+ send(fd, &rc, 1, 0);
#else
- write(fd, &rc, 1);
+ write(fd, &rc, 1);
#endif
+ }
}
static void FSYNC_Drop(fd)
*/
struct DiskPartition {
struct DiskPartition *next;
- char name[32]; /* Mounted partition name */
- char devName[32]; /* Device mounted on */
+ char *name; /* Mounted partition name */
+ char *devName; /* Device mounted on */
Device device; /* device number */
int lock_fd; /* File descriptor of this partition if locked; otherwise -1;
Not used by the file server */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vos.c,v 1.1.1.9 2002/01/22 19:55:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vos.c,v 1.1.1.10 2002/08/02 04:37:52 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
};
+struct hostent *hostutil_GetHostByName(register char *ahost);
+
#define COMMONPARMS cmd_Seek(ts, 12);\
cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");\
cmd_AddParm(ts, "-noauth", CMD_FLAG, CMD_OPTIONAL, "don't authenticate");\
return 0;
}
-static ListAddrs(as)
-register struct cmd_syndesc *as;
-
+static void
+print_addrs(const bulkaddrs *addrs, const afsUUID *m_uuid, int nentries, int print, int noresolve)
{
afs_int32 vcode;
afs_int32 i, j;
struct VLCallBack unused;
- afs_int32 nentries, *addrp;
- bulkaddrs addrs, m_addrs;
+ afs_int32 *addrp;
+ bulkaddrs m_addrs;
ListAddrByAttributes m_attrs;
- afsUUID m_uuid;
- afs_int32 m_unique, m_nentries, *m_addrp;
- afs_int32 base, index;
+ afs_int32 m_unique, m_nentries, *m_addrp;
+ afs_int32 base, index;
+ char buf[1024];
- /* Get the list of non multihomed fileservers */
- addrs.bulkaddrs_val = 0;
- addrs.bulkaddrs_len = 0;
- vcode = ubik_Call_New(VL_GetAddrs, cstruct, 0,
- 0, 0, &unused, &nentries, &addrs);
- if (vcode) {
- fprintf(STDERR,"vos: could not list the server addresses\n");
- PrintError("",vcode);
- return( vcode );
+ if (print) {
+ afsUUID_to_string(m_uuid, buf, sizeof(buf));
+ printf("UUID: %s\n", buf);
}
/* print out the list of all the server */
- addrp = (afs_int32 *)addrs.bulkaddrs_val;
+ addrp = (afs_int32 *)addrs->bulkaddrs_val;
for (i=0; i<nentries; i++, addrp++) {
/* If it is a multihomed address, then we will need to
* get the addresses for this multihomed server from
m_addrp = (afs_int32 *)m_addrs.bulkaddrs_val;
for (j=0; j<m_nentries; j++, m_addrp++) {
*m_addrp = htonl(*m_addrp);
- printf("%s ", hostutil_GetNameByINet(*m_addrp));
+ if (noresolve) {
+ char hoststr[16];
+ printf("%s ", afs_inet_ntoa_r(*m_addrp,hoststr));
+ } else {
+ printf("%s ", hostutil_GetNameByINet(*m_addrp));
+ }
}
if (j==0) {
printf("<unknown>\n");
/* Otherwise, it is a non-multihomed entry and contains
* the IP address of the server - print it.
*/
- printf ("%s\n", hostutil_GetNameByINet(htonl(*addrp)));
+ *addrp = htonl(*addrp);
+ if (noresolve) {
+ char hoststr[16];
+ printf("%s\n", afs_inet_ntoa_r(*addrp,hoststr));
+ } else {
+ printf("%s\n", hostutil_GetNameByINet(*addrp));
+ }
+ }
+
+ if (print) {
+ printf("\n");
+ }
+ return;
+}
+
+static ListAddrs(as)
+register struct cmd_syndesc *as;
+{
+ afs_int32 vcode;
+ afs_int32 i, j, noresolve=0, printuuid=0;
+ struct VLCallBack unused;
+ afs_int32 nentries, *addrp;
+ bulkaddrs addrs, m_addrs;
+ ListAddrByAttributes m_attrs;
+ afsUUID m_uuid, askuuid;
+ afs_int32 m_unique, m_nentries, *m_addrp;
+ afs_int32 base, index;
+
+ memset(&m_attrs, 0, sizeof(struct ListAddrByAttributes));
+ m_attrs.Mask = VLADDR_INDEX;
+
+ memset(&m_addrs, 0, sizeof(bulkaddrs));
+ memset(&askuuid, 0, sizeof(afsUUID));
+ if (as->parms[0].items) {
+ /* -uuid */
+ afsUUID_from_string(as->parms[0].items->data, &askuuid);
+ m_attrs.Mask = VLADDR_UUID;
+ m_attrs.uuid = askuuid;
+ }
+ if (as->parms[1].items) {
+ /* -host */
+ struct hostent *he;
+ afs_int32 saddr;
+ he = hostutil_GetHostByName((char*)as->parms[1].items->data);
+ if (he == (struct hostent *)0) {
+ fprintf(stderr,
+ "Can't get host info for '%s'\n",
+ as->parms[1].items->data);
+ exit(-1);
+ }
+ memcpy(&saddr, he->h_addr, 4);
+ m_attrs.Mask = VLADDR_IPADDR;
+ m_attrs.ipaddr = ntohl(saddr);
}
+ if (as->parms[2].items) {
+ noresolve=1;
+ }
+ if (as->parms[3].items) {
+ printuuid=1;
+ }
+
+ m_nentries = 0;
+ m_addrs.bulkaddrs_val = 0;
+ m_addrs.bulkaddrs_len = 0;
+ i=1;
+ while (1) {
+ m_attrs.index = i;
- if (addrs.bulkaddrs_val) {
- free (addrs.bulkaddrs_val);
+ vcode = ubik_Call_New(VL_GetAddrsU, cstruct, 0, &m_attrs, &m_uuid,
+ &m_unique, &m_nentries, &m_addrs);
+ if(vcode == VL_NOENT)
+ break;
+
+ if (vcode) {
+ fprintf(STDERR,"vos: could not list the server addresses\n");
+ PrintError("",vcode);
+ return( vcode );
+ }
+
+ print_addrs(&m_addrs, &m_uuid, m_nentries, printuuid, noresolve);
+ i++;
+
+ if ((as->parms[1].items)||(as->parms[0].items))
+ break;
}
+
return 0;
}
COMMONPARMS;
ts = cmd_CreateSyntax("listaddrs", ListAddrs, 0, "list the IP address of all file servers registered in the VLDB");
+ cmd_AddParm(ts, "-uuid", CMD_SINGLE, CMD_OPTIONAL, "uuid of server");
+ cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_OPTIONAL, "address of host");
+ cmd_AddParm(ts, "-noresolve", CMD_FLAG, CMD_OPTIONAL, "don't resolve addresses");
+ cmd_AddParm(ts, "-printuuid", CMD_FLAG, CMD_OPTIONAL, "print uuid of hosts");
COMMONPARMS;
code = cmd_Dispatch(argc, argv);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/xstat/xstat_cm_test.c,v 1.1.1.5 2001/09/11 14:36:04 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/xstat/xstat_cm_test.c,v 1.1.1.6 2002/08/02 04:37:58 hartmans Exp $");
#include "xstat_cm.h" /*Interface for xstat_cm module*/
#include <cmd.h> /*Command line interpreter*/
printf("\t%10d afs_GetCell\n", cmp->callInfo.C_afs_GetCell);
printf("\t%10d afs_GetCellByIndex\n", cmp->callInfo.C_afs_GetCellByIndex);
printf("\t%10d afs_GetCellByName\n", cmp->callInfo.C_afs_GetCellByName);
+ printf("\t%10d afs_GetRealCellByIndex\n", cmp->callInfo.C_afs_GetRealCellByIndex);
printf("\t%10d afs_NewCell\n", cmp->callInfo.C_afs_NewCell);
printf("\t%10d CheckVLDB\n", cmp->callInfo.C_CheckVLDB);
printf("\t%10d afs_GetVolume\n", cmp->callInfo.C_afs_GetVolume);