2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 * afs_init.c - initialize AFS client.
16 #include <afsconfig.h>
17 #include "afs/param.h"
23 #include "afs/sysincludes.h" /* Standard vendor system headers */
24 #include "afsincludes.h" /* Afs-based standard headers */
25 #include "afs/afs_stats.h" /* afs statistics */
27 /* Exported variables */
28 struct osi_dev cacheDev; /*Cache device */
29 afs_int32 cacheInfoModTime; /*Last time cache info modified */
30 #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
31 struct mount *afs_cacheVfsp = 0;
32 #elif defined(AFS_LINUX20_ENV)
33 struct super_block *afs_cacheSBp = 0;
35 struct vfs *afs_cacheVfsp = 0;
37 afs_rwlock_t afs_puttofileLock; /* not used */
38 char *afs_sysname = 0; /* So that superuser may change the
39 * local value of @sys */
40 char *afs_sysnamelist[MAXNUMSYSNAMES]; /* For support of a list of sysname */
41 int afs_sysnamecount = 0;
42 int afs_sysnamegen = 0;
43 struct volume *Initialafs_freeVolList;
44 int afs_memvolumes = 0;
45 #if defined(AFS_XBSD_ENV)
46 static struct vnode *volumeVnode;
48 #if defined(AFS_DISCON_ENV)
49 afs_rwlock_t afs_discon_lock;
50 extern afs_rwlock_t afs_DDirtyVCListLock;
54 * Initialization order is important. Must first call afs_CacheInit,
55 * then cache file and volume file initialization routines. Next, the
56 * individual cache entry initialization routines are called.
66 * astatSize : The number of stat cache (vnode) entries to
68 * afiles : The number of disk files to allocate to the cache
69 * ablocks : The max number of 1 Kbyte blocks that all of
70 * the files in the cache may occupy.
71 * aDentries : Number of dcache entries to allocate.
72 * aVolumes : Number of volume cache entries to allocate.
73 * achunk : Power of 2 to make the chunks.
74 * aflags : Flags passed in.
75 * inodes : max inodes to pin down in inode[]
76 * users : what should size of per-user access cache be?
79 * This routine should only be called at initialization time, since
80 * it reclaims no resources and doesn't sufficiently synchronize
81 * with other processes.
84 struct cm_initparams cm_initParams;
85 static int afs_cacheinit_flag = 0;
87 afs_CacheInit(afs_int32 astatSize, afs_int32 afiles, afs_int32 ablocks,
88 afs_int32 aDentries, afs_int32 aVolumes, afs_int32 achunk,
89 afs_int32 aflags, afs_int32 ninodes, afs_int32 nusers)
92 register struct volume *tv;
94 AFS_STATCNT(afs_CacheInit);
96 * Jot down the epoch time, namely when this incarnation of the
97 * Cache Manager started.
99 afs_stats_cmperf.epoch = pag_epoch = osi_Time();
101 afs_stats_cmperf.sysName_ID = SYS_NAME_ID;
103 afs_stats_cmperf.sysName_ID = SYS_NAME_ID_UNDEFINED;
104 #endif /* SYS_NAME_ID */
106 printf("Starting AFS cache scan...");
107 if (afs_cacheinit_flag)
109 afs_cacheinit_flag = 1;
110 cacheInfoModTime = 0;
115 LOCK_INIT(&afs_ftf, "afs_ftf");
116 AFS_RWLOCK_INIT(&afs_xaxs, "afs_xaxs");
117 #ifdef AFS_DISCON_ENV
118 AFS_RWLOCK_INIT(&afs_discon_lock, "afs_discon_lock");
119 AFS_RWLOCK_INIT(&afs_DDirtyVCListLock, "afs_DDirtyVCListLock");
124 * create volume list structure
128 else if (aVolumes > 32767)
131 tv = (struct volume *)afs_osi_Alloc(aVolumes * sizeof(struct volume));
132 for (i = 0; i < aVolumes - 1; i++)
133 tv[i].next = &tv[i + 1];
134 tv[aVolumes - 1].next = NULL;
135 afs_freeVolList = Initialafs_freeVolList = tv;
136 afs_memvolumes = aVolumes;
138 afs_cacheFiles = afiles;
139 afs_cacheStats = astatSize;
140 afs_vcacheInit(astatSize);
141 afs_dcacheInit(afiles, ablocks, aDentries, achunk, aflags);
142 #ifdef AFS_64BIT_CLIENT
143 #ifdef AFS_VM_RDWR_ENV
144 afs_vmMappingEnd = AFS_CHUNKBASE(0x7fffffff);
145 #endif /* AFS_VM_RDWR_ENV */
146 #endif /* AFS_64BIT_CLIENT */
148 #if defined(AFS_AIX_ENV) && !defined(AFS_AIX51_ENV)
150 static void afs_procsize_init(void);
156 /* Save the initialization parameters for later pioctl queries. */
157 cm_initParams.cmi_version = CMI_VERSION;
158 cm_initParams.cmi_nChunkFiles = afiles;
159 cm_initParams.cmi_nStatCaches = astatSize;
160 cm_initParams.cmi_nDataCaches = aDentries;
161 cm_initParams.cmi_nVolumeCaches = aVolumes;
162 cm_initParams.cmi_firstChunkSize = AFS_FIRSTCSIZE;
163 cm_initParams.cmi_otherChunkSize = AFS_OTHERCSIZE;
164 cm_initParams.cmi_cacheSize = afs_cacheBlocks;
165 cm_initParams.cmi_setTime = afs_setTime;
166 cm_initParams.cmi_memCache = (aflags & AFSCALL_INIT_MEMCACHE) ? 1 : 0;
174 * afs_ComputeCacheParams
177 * Set some cache parameters.
184 afs_ComputeCacheParms(void)
186 register afs_int32 i;
187 afs_int32 afs_maxCacheDirty;
190 * Don't allow more than 2/3 of the files in the cache to be dirty.
192 afs_maxCacheDirty = (2 * afs_cacheFiles) / 3;
195 * Also, don't allow more than 2/3 of the total space get filled
196 * with dirty chunks. Compute the total number of chunks required
197 * to fill the cache, make sure we don't set out limit above 2/3 of
198 * that. If the cache size is greater than 1G, avoid overflow at
199 * the expense of precision on the chunk size.
201 if (afs_cacheBlocks & 0xffe00000) {
202 i = afs_cacheBlocks / (AFS_FIRSTCSIZE >> 10);
204 i = (afs_cacheBlocks << 10) / AFS_FIRSTCSIZE;
207 if (afs_maxCacheDirty > i)
208 afs_maxCacheDirty = i;
209 if (afs_maxCacheDirty < 1)
210 afs_maxCacheDirty = 1;
211 afs_stats_cmperf.cacheMaxDirtyChunks = afs_maxCacheDirty;
212 } /*afs_ComputeCacheParms */
218 * Look up inode given a file name.
219 * Optionally return the vnode too.
220 * If the vnode is not returned, we rele it.
223 LookupInodeByPath(char *filename, ino_t * inode, struct vnode **fvpp)
227 #ifdef AFS_LINUX22_ENV
229 code = gop_lookupname(filename, AFS_UIOSYS, 0, &dp);
232 *inode = dp->d_inode->i_ino;
235 struct vnode *filevp;
236 code = gop_lookupname(filename, AFS_UIOSYS, 0, &filevp);
239 *inode = afs_vnodeToInumber(filevp);
245 #endif /* AFS_LINUX22_ENV */
251 afs_InitCellInfo(char *afile)
255 #if defined(LINUX_USE_FH)
258 int max_len = sizeof(struct fid);
262 #ifdef AFS_CACHE_VNODE_PATH
263 return afs_cellname_init(AFS_CACHE_CELLS_INODE, code);
264 #elif defined(LINUX_USE_FH)
265 code = gop_lookupname(afile, AFS_UIOSYS, 0, &dp);
266 fh_type = osi_get_fh(dp, &fh, &max_len);
267 return afs_cellname_init(&fh, fh_type, code);
269 code = LookupInodeByPath(afile, &inode, NULL);
270 return afs_cellname_init(inode, code);
278 * Set up the volume info storage file.
281 * afile : the file to be declared to be the volume info storage
282 * file for AFS. It must be already truncated to 0 length.
285 * This function is called only during initialization.
287 * WARNING: Data will be written to this file over time by AFS.
291 afs_InitVolumeInfo(char *afile)
294 struct osi_file *tfile;
295 #if defined(LINUX_USE_FH)
296 int max_len = sizeof(struct fid);
300 AFS_STATCNT(afs_InitVolumeInfo);
301 #if defined(AFS_XBSD_ENV)
303 * On Open/Free/NetBSD, we can get into big trouble if we don't hold the volume file
304 * vnode. SetupVolume holds afs_xvolume lock exclusive.
305 * SetupVolume->GetVolSlot->UFSGetVolSlot->{GetVolCache or WriteVolCache}
306 * ->osi_UFSOpen->VFS_VGET()->ffs_vget->getnewvnode->vgone on some vnode.
307 * If it's AFS, then ->vclean->afs_nbsd_reclaim->FlushVCache->QueueVCB->
308 * GetVolume->FindVolume-> waits on afs_xvolume lock !
310 * In general, anything that's called with afs_xvolume locked must not
311 * end up calling getnewvnode(). The only cases I've found so far
312 * are things which try to get the volumeInode, and since we keep
315 code = LookupInodeByPath(afile, &volumeInode, &volumeVnode);
316 #elif defined(AFS_CACHE_VNODE_PATH)
317 volumeInode = AFS_CACHE_VOLUME_INODE;
318 #elif defined(LINUX_USE_FH)
319 code = gop_lookupname(afile, AFS_UIOSYS, 0, &dp);
320 volumeinfo_fh_type = osi_get_fh(dp, &volumeinfo_fh, &max_len);
322 code = LookupInodeByPath(afile, &volumeInode, NULL);
326 #if defined(LINUX_USE_FH)
327 tfile = osi_UFSOpen_fh(&volumeinfo_fh, volumeinfo_fh_type);
329 tfile = afs_CFileOpen(volumeInode);
331 afs_CFileTruncate(tfile, 0);
332 afs_CFileClose(tfile);
340 * Set up the given file as the AFS cache info file.
343 * afile : Name of the file assumed to be the cache info file
344 * for the Cache Manager; it will be used as such.
345 * Side Effects: This sets afs_fragsize, which is used in the cache usage
346 * calculations such as in afs_adjustsize()
349 * This function is called only during initialization. The given
350 * file should NOT be truncated to 0 lenght; its contents descrebe
351 * what data is really in the cache.
353 * WARNING: data will be written to this file over time by AFS.
355 * NOTE: Starting to use separate osi_InitCacheInfo() routines to clean up
360 afs_InitCacheInfo(register char *afile)
362 register afs_int32 code;
363 struct osi_stat tstat;
364 register struct osi_file *tfile;
365 struct afs_fheader theader;
366 #ifndef AFS_LINUX22_ENV
367 struct vnode *filevp;
371 AFS_STATCNT(afs_InitCacheInfo);
372 if (cacheDiskType != AFS_FCACHE_TYPE_UFS)
373 osi_Panic("afs_InitCacheInfo --- called for non-ufs cache!");
374 #ifdef AFS_LINUX22_ENV
375 code = osi_InitCacheInfo(afile);
379 code = gop_lookupname(afile, AFS_UIOSYS, 0, &filevp);
383 #if defined(AFS_SUN56_ENV)
385 #elif defined(AFS_HPUX102_ENV)
387 #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) ||defined(AFS_HPUX100_ENV)
389 #elif defined(AFS_DUX40_ENV)
391 #elif defined(AFS_DARWIN80_ENV)
397 #if defined(AFS_SGI_ENV)
399 VFS_STATVFS(filevp->v_vfsp, &st, NULL, code);
402 if (!VFS_STATFS(filevp->v_vfsp, &st, NULL))
403 #endif /* AFS_SGI65_ENV */
404 #elif defined(AFS_SUN5_ENV) || defined(AFS_HPUX100_ENV)
405 if (!VFS_STATVFS(filevp->v_vfsp, &st))
406 #elif defined(AFS_OSF_ENV)
408 VFS_STATFS(filevp->v_vfsp, code);
410 st = filevp->v_vfsp->m_stat;
412 #elif defined(AFS_AIX41_ENV)
413 if (!VFS_STATFS(filevp->v_vfsp, &st, &afs_osi_cred))
414 #elif defined(AFS_LINUX20_ENV)
419 VFS_STATFS(filevp->v_vfsp, &st);
422 #elif defined(AFS_DARWIN80_ENV)
423 afs_cacheVfsp = vnode_mount(filevp);
424 if (afs_cacheVfsp && ((st = *(vfs_statfs(afs_cacheVfsp))),1))
425 #elif defined(AFS_DARWIN_ENV)
426 if (!VFS_STATFS(filevp->v_mount, &st, current_proc()))
427 #elif defined(AFS_FBSD50_ENV)
428 if (!VFS_STATFS(filevp->v_mount, &st, curthread))
429 #elif defined(AFS_XBSD_ENV)
430 if (!VFS_STATFS(filevp->v_mount, &st, curproc))
432 if (!VFS_STATFS(filevp->v_vfsp, &st))
434 #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX100_ENV)
435 afs_fsfragsize = st.f_frsize - 1;
437 afs_fsfragsize = st.f_bsize - 1;
440 #if defined(AFS_LINUX20_ENV)
441 cacheInode = filevp->i_ino;
442 afs_cacheSBp = filevp->i_sb;
443 #elif defined(AFS_XBSD_ENV)
444 cacheInode = VTOI(filevp)->i_number;
445 cacheDev.mp = filevp->v_mount;
446 cacheDev.held_vnode = filevp;
447 vref(filevp); /* Make sure mount point stays busy. XXX */
448 #if !defined(AFS_OBSD_ENV)
449 afs_cacheVfsp = filevp->v_vfsp;
452 #if defined(AFS_SGI62_ENV) || defined(AFS_HAVE_VXFS) || defined(AFS_DARWIN_ENV)
453 afs_InitDualFSCacheOps(filevp);
455 #ifndef AFS_CACHE_VNODE_PATH
456 #ifndef AFS_DARWIN80_ENV
457 afs_cacheVfsp = filevp->v_vfsp;
459 cacheInode = afs_vnodeToInumber(filevp);
461 cacheInode = AFS_CACHE_ITEMS_INODE;
463 cacheDev.dev = afs_vnodeToDev(filevp);
464 #endif /* AFS_LINUX20_ENV */
466 #endif /* AFS_LINUX22_ENV */
467 #if defined(LINUX_USE_FH)
468 tfile = osi_UFSOpen_fh(&cacheitems_fh, cacheitems_fh_type);
470 tfile = osi_UFSOpen(cacheInode);
472 afs_osi_Stat(tfile, &tstat);
473 cacheInfoModTime = tstat.mtime;
474 code = afs_osi_Read(tfile, -1, &theader, sizeof(theader));
476 if (code == sizeof(theader)) {
477 /* read the header correctly */
478 if (theader.magic == AFS_FHMAGIC
479 && theader.firstCSize == AFS_FIRSTCSIZE
480 && theader.otherCSize == AFS_OTHERCSIZE
481 && theader.version == AFS_CI_VERSION)
485 /* write out a good file label */
486 theader.magic = AFS_FHMAGIC;
487 theader.firstCSize = AFS_FIRSTCSIZE;
488 theader.otherCSize = AFS_OTHERCSIZE;
489 theader.version = AFS_CI_VERSION;
490 afs_osi_Write(tfile, 0, &theader, sizeof(theader));
492 * Truncate the rest of the file, since it may be arbitrarily
495 osi_UFSTruncate(tfile, sizeof(struct afs_fheader));
497 /* Leave the file open now, since reopening the file makes public pool
498 * vnode systems (like OSF/Alpha) much harder to handle, That's because
499 * they can do a vnode recycle operation any time we open a file, which
500 * we'd do on any afs_GetDSlot call, etc.
502 afs_cacheInodep = (struct osi_file *)tfile;
506 int afs_resourceinit_flag = 0;
508 afs_ResourceInit(int preallocs)
510 register afs_int32 i;
511 static struct rx_securityClass *secobj;
513 AFS_STATCNT(afs_ResourceInit);
514 AFS_RWLOCK_INIT(&afs_xuser, "afs_xuser");
515 AFS_RWLOCK_INIT(&afs_xvolume, "afs_xvolume");
516 AFS_RWLOCK_INIT(&afs_xserver, "afs_xserver");
517 AFS_RWLOCK_INIT(&afs_xsrvAddr, "afs_xsrvAddr");
518 AFS_RWLOCK_INIT(&afs_icl_lock, "afs_icl_lock");
519 AFS_RWLOCK_INIT(&afs_xinterface, "afs_xinterface");
520 LOCK_INIT(&afs_puttofileLock, "afs_puttofileLock");
522 LOCK_INIT(&osi_fsplock, "osi_fsplock");
523 LOCK_INIT(&osi_flplock, "osi_flplock");
525 AFS_RWLOCK_INIT(&afs_xconn, "afs_xconn");
528 afs_InitCBQueue(1); /* initialize callback queues */
530 if (afs_resourceinit_flag == 0) {
531 afs_resourceinit_flag = 1;
532 for (i = 0; i < NFENTRIES; i++)
534 for (i = 0; i < MAXNUMSYSNAMES; i++)
535 afs_sysnamelist[i] = afs_osi_Alloc(MAXSYSNAME);
536 afs_sysname = afs_sysnamelist[0];
537 strcpy(afs_sysname, SYS_NAME);
538 afs_sysnamecount = 1;
542 secobj = rxnull_NewServerSecurityObject();
544 rx_NewService(0, 1, "afs", &secobj, 1, RXAFSCB_ExecuteRequest);
546 rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", &secobj, 1,
547 RXSTATS_ExecuteRequest);
549 afs_osi_Wakeup(&afs_server); /* wakeup anyone waiting for it */
552 } /*afs_ResourceInit */
554 #if defined(AFS_AIX_ENV) && !defined(AFS_AIX51_ENV)
557 * AIX dynamic sizeof(struct proc)
559 * AIX keeps its proc structures in an array. The size of struct proc
560 * varies from release to release of the OS. In order to maintain
561 * binary compatibility with releases later than what we build on, we
562 * need to determine the size of struct proc at run time.
564 * We need this in order to walk the proc[] array to do PAG garbage
567 * We also need this in order to support 'klog -setpag', since the
568 * kernel code needs to locate the proc structure for the parent process
569 * of the current process.
571 * To compute sizeof(struct proc), we need the addresses of two proc
572 * structures and their corresponding pids. Given the pids, we can use
573 * the PROCMASK() macro to compute their corresponding indices in the
574 * proc[] array. By dividing the distance between the pointers by the
575 * number of proc structures, we can compute the size of a single proc
578 * We know the base address of the proc table from v.vb_proc:
580 * <sys/sysconfig.h> declares sysconfig() and SYS_GETPARMS;
581 * (we don't use this, but I note it here for completeness)
583 * <sys/var.h> declares struct var and external variable v;
587 * v.ve_proc &proc[x] (current highwater mark for
588 * proc[] array usage)
590 * The first proc pointer is v.vb_proc, which is the proc structure for
591 * process 0. Process 0's pointer to its first child is the other proc
592 * pointer. If process 0 has no children, we simply give up and do not
593 * support features that require knowing the size of struct proc.
597 afs_procsize_init(void)
599 struct proc *p0; /* pointer to process 0 */
600 struct proc *pN; /* pointer to process 0's first child */
608 p0 = (struct proc *)v.vb_proc;
610 afs_gcpags = AFS_GCPAGS_EPROC0;
614 pN = (struct proc *)0;
625 afs_gcpags = AFS_GCPAGS_EPROCN;
629 if (pN->p_pid == p0->p_pid) {
630 afs_gcpags = AFS_GCPAGS_EEQPID;
634 pN_index = PROCMASK(pN->p_pid);
635 pN_offset = ((char *)pN - (char *)p0);
636 procsize = pN_offset / pN_index;
639 * check that the computation was exact
642 if (pN_index * procsize != pN_offset) {
643 afs_gcpags = AFS_GCPAGS_EINEXACT;
648 * check that the proc table size is a multiple of procsize.
651 if ((((char *)v.ve_proc - (char *)v.vb_proc) % procsize) != 0) {
652 afs_gcpags = AFS_GCPAGS_EPROCEND;
658 afs_gcpags_procsize = procsize;
666 * Clean up and shut down the AFS cache.
672 * Nothing interesting.
677 AFS_STATCNT(shutdown_cache);
678 afs_WriteThroughDSlots();
679 if (afs_cold_shutdown) {
680 afs_cacheinit_flag = 0;
685 afs_cacheFiles = afs_cacheBlocks = 0;
686 pag_epoch = maxIHint = nihints = usedihint = 0;
688 #if defined(AFS_XBSD_ENV)
689 vrele(volumeVnode); /* let it go, finally. */
691 if (cacheDev.held_vnode) {
692 vrele(cacheDev.held_vnode);
693 cacheDev.held_vnode = NULL;
696 #if !defined(LINUX_USE_FH)
697 cacheInode = volumeInode = (ino_t) 0;
699 cacheInfoModTime = 0;
701 afs_fsfragsize = 1023;
702 memset((char *)&afs_stats_cmperf, 0, sizeof(afs_stats_cmperf));
703 memset((char *)&cacheDev, 0, sizeof(struct osi_dev));
706 } /*shutdown_cache */
710 shutdown_vnodeops(void)
712 #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
713 struct buf *afs_bread_freebp = 0;
717 AFS_STATCNT(shutdown_vnodeops);
718 if (afs_cold_shutdown) {
719 #ifndef AFS_SUN5_ENV /* XXX */
722 #ifndef AFS_LINUX20_ENV
725 #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
726 afs_bread_freebp = 0;
737 register struct srvAddr *sa;
739 AFS_STATCNT(shutdown_AFS);
740 if (afs_cold_shutdown) {
741 afs_resourceinit_flag = 0;
743 * Free Volumes table allocations
747 for (i = 0; i < NVOLS; i++) {
748 for (tv = afs_volumes[i]; tv; tv = tv->next) {
750 afs_osi_Free(tv->name, strlen(tv->name) + 1);
759 * Free FreeVolList allocations
761 afs_osi_Free(Initialafs_freeVolList,
762 afs_memvolumes * sizeof(struct volume));
763 afs_freeVolList = Initialafs_freeVolList = 0;
765 /* XXX HACK fort MEM systems XXX
767 * For -memcache cache managers when we run out of free in memory volumes
768 * we simply malloc more; we won't be able to free those additional volumes.
774 * Free Users table allocation
777 struct unixuser *tu, *ntu;
778 for (i = 0; i < NUSERS; i++) {
779 for (tu = afs_users[i]; tu; tu = ntu) {
782 afs_osi_Free(tu->stp, tu->stLen);
784 EXP_RELE(tu->exporter);
785 afs_osi_Free(tu, sizeof(struct unixuser));
792 * Free Servers table allocation
795 struct server *ts, *nts;
796 struct afs_conn *tc, *ntc;
797 register struct afs_cbr *tcbrp, *tbrp;
799 for (i = 0; i < NSERVERS; i++) {
800 for (ts = afs_servers[i]; ts; ts = nts) {
802 for (sa = ts->addr; sa; sa = sa->next_sa) {
805 * Free all server's connection structs
811 rx_DestroyConnection(tc->id);
813 afs_osi_Free(tc, sizeof(struct afs_conn));
818 for (tcbrp = ts->cbrs; tcbrp; tcbrp = tbrp) {
820 * Free all server's callback structs
825 afs_osi_Free(ts, sizeof(struct server));
830 for (i = 0; i < NFENTRIES; i++)
832 /* Reinitialize local globals to defaults */
833 for (i = 0; i < MAXNUMSYSNAMES; i++)
834 afs_osi_Free(afs_sysnamelist[i], MAXSYSNAME);
836 afs_sysnamecount = 0;
838 afs_setTimeHost = NULL;
840 afs_waitForever = afs_waitForeverCount = 0;
842 afs_server = (struct rx_service *)0;
843 AFS_RWLOCK_INIT(&afs_xconn, "afs_xconn");
844 memset((char *)&afs_rootFid, 0, sizeof(struct VenusFid));
845 AFS_RWLOCK_INIT(&afs_xuser, "afs_xuser");
846 AFS_RWLOCK_INIT(&afs_xvolume, "afs_xvolume");
847 AFS_RWLOCK_INIT(&afs_xserver, "afs_xserver");
848 LOCK_INIT(&afs_puttofileLock, "afs_puttofileLock");