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 * --------------------- Required definitions ---------------------
13 #include <afsconfig.h>
14 #include "afs/param.h"
17 #include "afs/sysincludes.h" /*Standard vendor system headers */
18 #include "afsincludes.h" /*AFS-based standard headers */
19 #include "afs/afs_stats.h" /* statistics */
20 #include "afs/afs_cbqueue.h"
21 #include "afs/afs_osidnlc.h"
23 afs_uint32 afs_stampValue = 0;
29 * Send a truncation request to a FileServer.
35 * We're write-locked upon entry.
39 afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
41 register struct afs_conn *tc;
42 struct AFSStoreStatus InStatus;
43 struct AFSFetchStatus OutStatus;
44 struct AFSVolSync tsync;
45 register afs_int32 code;
46 register struct rx_call *tcall;
47 afs_size_t tlen, xlen = 0;
49 AFS_STATCNT(afs_StoreMini);
50 afs_Trace2(afs_iclSetp, CM_TRACE_STOREMINI, ICL_TYPE_POINTER, avc,
51 ICL_TYPE_INT32, avc->f.m.Length);
52 tlen = avc->f.m.Length;
53 if (avc->f.truncPos < tlen)
54 tlen = avc->f.truncPos;
55 avc->f.truncPos = AFS_NOTRUNC;
56 avc->f.states &= ~CExtendedFile;
59 tc = afs_Conn(&avc->f.fid, areq, SHARED_LOCK);
61 #ifdef AFS_64BIT_CLIENT
65 tcall = rx_NewCall(tc->id);
67 /* Set the client mod time since we always want the file
68 * to have the client's mod time and not the server's one
69 * (to avoid problems with make, etc.) It almost always
70 * works fine with standard afs because them server/client
71 * times are in sync and more importantly this storemini
72 * it's a special call that would typically be followed by
73 * the proper store-data or store-status calls.
75 InStatus.Mask = AFS_SETMODTIME;
76 InStatus.ClientModTime = avc->f.m.Date;
77 XSTATS_START_TIME(AFS_STATS_FS_RPCIDX_STOREDATA);
78 afs_Trace4(afs_iclSetp, CM_TRACE_STOREDATA64, ICL_TYPE_FID,
79 &avc->f.fid.Fid, ICL_TYPE_OFFSET,
80 ICL_HANDLE_OFFSET(avc->f.m.Length), ICL_TYPE_OFFSET,
81 ICL_HANDLE_OFFSET(xlen), ICL_TYPE_OFFSET,
82 ICL_HANDLE_OFFSET(tlen));
84 #ifdef AFS_64BIT_CLIENT
85 if (!afs_serverHasNo64Bit(tc)) {
87 StartRXAFS_StoreData64(tcall,
88 (struct AFSFid *)&avc->f.fid.Fid,
89 &InStatus, avc->f.m.Length,
90 (afs_size_t) 0, tlen);
95 if ((avc->f.m.Length > 0x7fffffff) ||
96 (tlen > 0x7fffffff) ||
97 ((0x7fffffff - tlen) < avc->f.m.Length))
100 StartRXAFS_StoreData(tcall,
101 (struct AFSFid *)&avc->f.fid.Fid,
102 &InStatus, l1, 0, l2);
104 #else /* AFS_64BIT_CLIENT */
106 StartRXAFS_StoreData(tcall, (struct AFSFid *)&avc->f.fid.Fid,
107 &InStatus, avc->f.m.Length, 0, tlen);
108 #endif /* AFS_64BIT_CLIENT */
110 code = EndRXAFS_StoreData(tcall, &OutStatus, &tsync);
112 code = rx_EndCall(tcall, code);
115 #ifdef AFS_64BIT_CLIENT
116 if (code == RXGEN_OPCODE && !afs_serverHasNo64Bit(tc)) {
117 afs_serverSetNo64Bit(tc);
120 #endif /* AFS_64BIT_CLIENT */
124 (tc, code, &avc->f.fid, areq, AFS_STATS_FS_RPCIDX_STOREDATA,
128 afs_ProcessFS(avc, &OutStatus, areq);
131 afs_InvalidateAllSegments(avc);
138 * afs_StoreAllSegments
141 * Stores all modified segments back to server
144 * avc : Pointer to vcache entry.
145 * areq : Pointer to request structure.
148 * Called with avc write-locked.
150 #if defined (AFS_HPUX_ENV)
151 int NCHUNKSATONCE = 3;
153 int NCHUNKSATONCE = 64;
159 afs_StoreAllSegments(register struct vcache *avc, struct vrequest *areq,
162 register struct dcache *tdc;
163 register afs_int32 code = 0;
164 register afs_int32 index;
165 register afs_int32 origCBs, foreign = 0;
167 afs_hyper_t newDV, oldDV; /* DV when we start, and finish, respectively */
168 struct dcache **dcList;
169 unsigned int i, j, minj, moredata, high, off;
171 afs_size_t maxStoredLength; /* highest offset we've written to server. */
174 AFS_STATCNT(afs_StoreAllSegments);
176 hset(oldDV, avc->f.m.DataVersion);
177 hset(newDV, avc->f.m.DataVersion);
178 hash = DVHash(&avc->f.fid);
179 foreign = (avc->f.states & CForeign);
180 dcList = (struct dcache **)osi_AllocLargeSpace(AFS_LRALLOCSIZ);
181 afs_Trace2(afs_iclSetp, CM_TRACE_STOREALL, ICL_TYPE_POINTER, avc,
182 ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(avc->f.m.Length));
183 #if !defined(AFS_AIX32_ENV) && !defined(AFS_SGI65_ENV)
184 /* In the aix vm implementation we need to do the vm_writep even
185 * on the memcache case since that's we adjust the file's size
186 * and finish flushing partial vm pages.
188 if ((cacheDiskType != AFS_FCACHE_TYPE_MEM) || (sync & AFS_LASTSTORE))
189 #endif /* !AFS_AIX32_ENV && !AFS_SGI65_ENV */
191 /* If we're not diskless, reading a file may stress the VM
192 * system enough to cause a pageout, and this vnode would be
193 * locked when the pageout occurs. We can prevent this problem
194 * by making sure all dirty pages are already flushed. We don't
195 * do this when diskless because reading a diskless (i.e.
196 * memory-resident) chunk doesn't require using new VM, and we
197 * also don't want to dump more dirty data into a diskless cache,
198 * since they're smaller, and we might exceed its available
201 #if defined(AFS_SUN5_ENV)
202 if (sync & AFS_VMSYNC_INVAL) /* invalidate VM pages */
203 osi_VM_TryToSmush(avc, CRED(), 1);
206 osi_VM_StoreAllSegments(avc);
208 if (AFS_IS_DISCONNECTED && !AFS_IN_SYNC) {
209 /* This will probably make someone sad ... */
210 /*printf("Net down in afs_StoreSegments\n");*/
213 ConvertWToSLock(&avc->lock);
216 * Subsequent code expects a sorted list, and it expects all the
217 * chunks in the list to be contiguous, so we need a sort and a
218 * while loop in here, too - but this will work for a first pass...
219 * 92.10.05 - OK, there's a sort in here now. It's kind of a modified
220 * bin sort, I guess. Chunk numbers start with 0
222 * - Have to get a write lock on xdcache because GetDSlot might need it (if
223 * the chunk doesn't have a dcache struct).
224 * This seems like overkill in most cases.
225 * - I'm not sure that it's safe to do "index = .hvNextp", then unlock
226 * xdcache, then relock xdcache and try to use index. It is done
227 * a lot elsewhere in the CM, but I'm not buying that argument.
228 * - should be able to check IFDataMod without doing the GetDSlot (just
229 * hold afs_xdcache). That way, it's easy to do this without the
230 * writelock on afs_xdcache, and we save unneccessary disk
231 * operations. I don't think that works, 'cuz the next pointers
234 origCBs = afs_allCBs;
237 tlen = avc->f.m.Length;
241 memset(dcList, 0, NCHUNKSATONCE * sizeof(struct dcache *));
245 /* lock and start over from beginning of hash chain
246 * in order to avoid a race condition. */
247 ObtainWriteLock(&afs_xdcache, 284);
248 index = afs_dvhashTbl[hash];
250 for (j = 0; index != NULLIDX;) {
251 if ((afs_indexFlags[index] & IFDataMod)
252 && (afs_indexUnique[index] == avc->f.fid.Fid.Unique)) {
253 tdc = afs_GetDSlot(index, 0); /* refcount+1. */
254 ReleaseReadLock(&tdc->tlock);
255 if (!FidCmp(&tdc->f.fid, &avc->f.fid) && tdc->f.chunk >= minj) {
256 off = tdc->f.chunk - minj;
257 if (off < NCHUNKSATONCE) {
259 osi_Panic("dclist slot already in use!");
264 /* DCLOCKXXX: chunkBytes is protected by tdc->lock which we
265 * can't grab here, due to lock ordering with afs_xdcache.
266 * So, disable this shortcut for now. -- kolya 2001-10-13
268 /* shortcut: big win for little files */
269 /* tlen -= tdc->f.chunkBytes;
276 if (j == NCHUNKSATONCE)
283 index = afs_dvnextTbl[index];
285 ReleaseWriteLock(&afs_xdcache);
287 /* this guy writes chunks, puts back dcache structs, and bumps newDV */
288 /* "moredata" just says "there are more dirty chunks yet to come".
292 afs_CacheStoreVCache(dcList, avc, areq, sync,
293 minj, high, moredata,
294 &newDV, &maxStoredLength);
295 /* Release any zero-length dcache entries in our interval
296 * that we locked but didn't store back above.
298 for (j = 0; j <= high; j++) {
301 osi_Assert(tdc->f.chunkBytes == 0);
302 ReleaseSharedLock(&tdc->lock);
308 minj += NCHUNKSATONCE;
309 } while (!code && moredata);
311 UpgradeSToWLock(&avc->lock, 29);
313 /* send a trivial truncation store if did nothing else */
316 * Call StoreMini if we haven't written enough data to extend the
317 * file at the fileserver to the client's notion of the file length.
319 if ((avc->f.truncPos != AFS_NOTRUNC)
320 || ((avc->f.states & CExtendedFile)
321 && (maxStoredLength < avc->f.m.Length))) {
322 code = afs_StoreMini(avc, areq);
324 hadd32(newDV, 1); /* just bumped here, too */
326 avc->f.states &= ~CExtendedFile;
330 * Finally, turn off DWriting, turn on DFEntryMod,
331 * update f.versionNo.
332 * A lot of this could be integrated into the loop above
343 NCHUNKSATONCE * sizeof(struct dcache *));
345 /* overkill, but it gets the lock in case GetDSlot needs it */
346 ObtainWriteLock(&afs_xdcache, 285);
348 for (j = 0, safety = 0, index = afs_dvhashTbl[hash];
349 index != NULLIDX && safety < afs_cacheFiles + 2;) {
351 if (afs_indexUnique[index] == avc->f.fid.Fid.Unique) {
352 tdc = afs_GetDSlot(index, 0);
353 ReleaseReadLock(&tdc->tlock);
355 if (!FidCmp(&tdc->f.fid, &avc->f.fid)
356 && tdc->f.chunk >= minj) {
357 off = tdc->f.chunk - minj;
358 if (off < NCHUNKSATONCE) {
359 /* this is the file, and the correct chunk range */
360 if (j >= NCHUNKSATONCE)
362 ("Too many dcache entries in range\n");
367 if (j == NCHUNKSATONCE)
375 index = afs_dvnextTbl[index];
377 ReleaseWriteLock(&afs_xdcache);
379 for (i = 0; i < j; i++) {
380 /* Iterate over the dcache entries we collected above */
382 ObtainSharedLock(&tdc->lock, 677);
384 /* was code here to clear IFDataMod, but it should only be done
385 * in storedcache and storealldcache.
387 /* Only increase DV if we had up-to-date data to start with.
388 * Otherwise, we could be falsely upgrading an old chunk
389 * (that we never read) into one labelled with the current
390 * DV #. Also note that we check that no intervening stores
391 * occurred, otherwise we might mislabel cache information
392 * for a chunk that we didn't store this time
394 /* Don't update the version number if it's not yet set. */
395 if (!hsame(tdc->f.versionNo, h_unset)
396 && hcmp(tdc->f.versionNo, oldDV) >= 0) {
398 if ((!(afs_dvhack || foreign)
399 && hsame(avc->f.m.DataVersion, newDV))
400 || ((afs_dvhack || foreign)
401 && (origCBs == afs_allCBs))) {
402 /* no error, this is the DV */
404 UpgradeSToWLock(&tdc->lock, 678);
405 hset(tdc->f.versionNo, avc->f.m.DataVersion);
406 tdc->dflags |= DFEntryMod;
407 ConvertWToSLock(&tdc->lock);
411 ReleaseSharedLock(&tdc->lock);
415 minj += NCHUNKSATONCE;
422 * Invalidate chunks after an error for ccores files since
423 * afs_inactive won't be called for these and they won't be
424 * invalidated. Also discard data if it's a permanent error from the
427 if (areq->permWriteError || (avc->f.states & (CCore1 | CCore))) {
428 afs_InvalidateAllSegments(avc);
431 afs_Trace3(afs_iclSetp, CM_TRACE_STOREALLDONE, ICL_TYPE_POINTER, avc,
432 ICL_TYPE_INT32, avc->f.m.Length, ICL_TYPE_INT32, code);
433 /* would like a Trace5, but it doesn't exist... */
434 afs_Trace3(afs_iclSetp, CM_TRACE_AVCLOCKER, ICL_TYPE_POINTER, avc,
435 ICL_TYPE_INT32, avc->lock.wait_states, ICL_TYPE_INT32,
436 avc->lock.excl_locked);
437 afs_Trace4(afs_iclSetp, CM_TRACE_AVCLOCKEE, ICL_TYPE_POINTER, avc,
438 ICL_TYPE_INT32, avc->lock.wait_states, ICL_TYPE_INT32,
439 avc->lock.readers_reading, ICL_TYPE_INT32,
440 avc->lock.num_waiting);
443 * Finally, if updated DataVersion matches newDV, we did all of the
444 * stores. If mapDV indicates that the page cache was flushed up
445 * to when we started the store, then we can relabel them as flushed
446 * as recently as newDV.
447 * Turn off CDirty bit because the stored data is now in sync with server.
449 if (code == 0 && hcmp(avc->mapDV, oldDV) >= 0) {
450 if ((!(afs_dvhack || foreign) && hsame(avc->f.m.DataVersion, newDV))
451 || ((afs_dvhack || foreign) && (origCBs == afs_allCBs))) {
452 hset(avc->mapDV, newDV);
453 avc->f.states &= ~CDirty;
456 osi_FreeLargeSpace(dcList);
458 /* If not the final write a temporary error is ok. */
459 if (code && !areq->permWriteError && !(sync & AFS_LASTSTORE))
464 } /*afs_StoreAllSegments (new 03/02/94) */
468 * afs_InvalidateAllSegments
471 * Invalidates all chunks for a given file
474 * avc : Pointer to vcache entry.
477 * For example, called after an error has been detected. Called
478 * with avc write-locked, and afs_xdcache unheld.
482 afs_InvalidateAllSegments(struct vcache *avc)
487 struct dcache **dcList;
488 int i, dcListMax, dcListCount;
490 AFS_STATCNT(afs_InvalidateAllSegments);
491 afs_Trace2(afs_iclSetp, CM_TRACE_INVALL, ICL_TYPE_POINTER, avc,
492 ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(avc->f.m.Length));
493 hash = DVHash(&avc->f.fid);
494 avc->f.truncPos = AFS_NOTRUNC; /* don't truncate later */
495 avc->f.states &= ~CExtendedFile; /* not any more */
496 ObtainWriteLock(&afs_xcbhash, 459);
497 afs_DequeueCallback(avc);
498 avc->f.states &= ~(CStatd | CDirty); /* mark status information as bad, too */
499 ReleaseWriteLock(&afs_xcbhash);
500 if (avc->f.fid.Fid.Vnode & 1 || (vType(avc) == VDIR))
501 osi_dnlc_purgedp(avc);
502 /* Blow away pages; for now, only for Solaris */
503 #if (defined(AFS_SUN5_ENV))
504 if (WriteLocked(&avc->lock))
505 osi_ReleaseVM(avc, (afs_ucred_t *)0);
508 * Block out others from screwing with this table; is a read lock
511 ObtainWriteLock(&afs_xdcache, 286);
514 for (index = afs_dvhashTbl[hash]; index != NULLIDX;) {
515 if (afs_indexUnique[index] == avc->f.fid.Fid.Unique) {
516 tdc = afs_GetDSlot(index, 0);
517 ReleaseReadLock(&tdc->tlock);
518 if (!FidCmp(&tdc->f.fid, &avc->f.fid))
522 index = afs_dvnextTbl[index];
525 dcList = osi_Alloc(dcListMax * sizeof(struct dcache *));
528 for (index = afs_dvhashTbl[hash]; index != NULLIDX;) {
529 if (afs_indexUnique[index] == avc->f.fid.Fid.Unique) {
530 tdc = afs_GetDSlot(index, 0);
531 ReleaseReadLock(&tdc->tlock);
532 if (!FidCmp(&tdc->f.fid, &avc->f.fid)) {
533 /* same file? we'll zap it */
534 if (afs_indexFlags[index] & IFDataMod) {
535 afs_stats_cmperf.cacheCurrDirtyChunks--;
536 /* don't write it back */
537 afs_indexFlags[index] &= ~IFDataMod;
539 afs_indexFlags[index] &= ~IFAnyPages;
540 if (dcListCount < dcListMax)
541 dcList[dcListCount++] = tdc;
548 index = afs_dvnextTbl[index];
550 ReleaseWriteLock(&afs_xdcache);
552 for (i = 0; i < dcListCount; i++) {
555 ObtainWriteLock(&tdc->lock, 679);
557 if (vType(avc) == VDIR)
559 ReleaseWriteLock(&tdc->lock);
563 osi_Free(dcList, dcListMax * sizeof(struct dcache *));
570 * Extend a cache file
572 * \param avc pointer to vcache to extend data for
573 * \param alen Length to extend file to
576 * \note avc must be write locked. May release and reobtain avc and GLOCK
579 afs_ExtendSegments(struct vcache *avc, afs_size_t alen, struct vrequest *areq) {
580 afs_size_t offset, toAdd;
581 struct osi_file *tfile;
586 zeros = (void *) afs_osi_Alloc(AFS_PAGESIZE);
589 memset(zeros, 0, AFS_PAGESIZE);
591 while (avc->f.m.Length < alen) {
592 tdc = afs_ObtainDCacheForWriting(avc, avc->f.m.Length, alen - avc->f.m.Length, areq, 0);
598 toAdd = alen - avc->f.m.Length;
600 offset = avc->f.m.Length - AFS_CHUNKTOBASE(tdc->f.chunk);
601 if (offset + toAdd > AFS_CHUNKTOSIZE(tdc->f.chunk)) {
602 toAdd = AFS_CHUNKTOSIZE(tdc->f.chunk) - offset;
604 tfile = afs_CFileOpen(&tdc->f.inode);
605 while(tdc->validPos < avc->f.m.Length + toAdd) {
608 towrite = (avc->f.m.Length + toAdd) - tdc->validPos;
609 if (towrite > AFS_PAGESIZE) towrite = AFS_PAGESIZE;
611 code = afs_CFileWrite(tfile,
612 tdc->validPos - AFS_CHUNKTOBASE(tdc->f.chunk),
614 tdc->validPos += towrite;
616 afs_CFileClose(tfile);
617 afs_AdjustSize(tdc, offset + toAdd );
618 avc->f.m.Length += toAdd;
619 ReleaseWriteLock(&tdc->lock);
623 afs_osi_Free(zeros, AFS_PAGESIZE);
628 * afs_TruncateAllSegments
631 * Truncate a cache file.
634 * avc : Ptr to vcache entry to truncate.
635 * alen : Number of bytes to make the file.
636 * areq : Ptr to request structure.
639 * Called with avc write-locked; in VFS40 systems, pvnLock is also
643 afs_TruncateAllSegments(register struct vcache *avc, afs_size_t alen,
644 struct vrequest *areq, afs_ucred_t *acred)
646 register struct dcache *tdc;
647 register afs_int32 code;
648 register afs_int32 index;
652 struct dcache **tdcArray;
654 AFS_STATCNT(afs_TruncateAllSegments);
655 avc->f.m.Date = osi_Time();
656 afs_Trace3(afs_iclSetp, CM_TRACE_TRUNCALL, ICL_TYPE_POINTER, avc,
657 ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(avc->f.m.Length),
658 ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(alen));
659 if (alen >= avc->f.m.Length) {
661 * Special speedup since Sun's vm extends the file this way;
662 * we've never written to the file thus we can just set the new
663 * length and avoid the needless calls below.
664 * Also used for ftruncate calls which can extend the file.
665 * To completely minimize the possible extra StoreMini RPC, we really
666 * should keep the ExtendedPos as well and clear this flag if we
667 * truncate below that value before we store the file back.
669 avc->f.states |= CExtendedFile;
670 avc->f.m.Length = alen;
673 #if (defined(AFS_SUN5_ENV))
675 /* Zero unused portion of last page */
676 osi_VM_PreTruncate(avc, alen, acred);
680 #if (defined(AFS_SUN5_ENV))
681 ObtainWriteLock(&avc->vlock, 546);
682 avc->activeV++; /* Block new getpages */
683 ReleaseWriteLock(&avc->vlock);
686 ReleaseWriteLock(&avc->lock);
689 /* Flush pages beyond end-of-file. */
690 osi_VM_Truncate(avc, alen, acred);
693 ObtainWriteLock(&avc->lock, 79);
695 avc->f.m.Length = alen;
697 if (alen < avc->f.truncPos)
698 avc->f.truncPos = alen;
699 code = DVHash(&avc->f.fid);
701 /* block out others from screwing with this table */
702 ObtainWriteLock(&afs_xdcache, 287);
705 for (index = afs_dvhashTbl[code]; index != NULLIDX;) {
706 if (afs_indexUnique[index] == avc->f.fid.Fid.Unique) {
707 tdc = afs_GetDSlot(index, 0);
708 ReleaseReadLock(&tdc->tlock);
709 if (!FidCmp(&tdc->f.fid, &avc->f.fid))
713 index = afs_dvnextTbl[index];
716 /* Now allocate space where we can save those dcache entries, and
717 * do a second pass over them.. Since we're holding xdcache, it
718 * shouldn't be changing.
720 tdcArray = osi_Alloc(dcCount * sizeof(struct dcache *));
723 for (index = afs_dvhashTbl[code]; index != NULLIDX;) {
724 if (afs_indexUnique[index] == avc->f.fid.Fid.Unique) {
725 tdc = afs_GetDSlot(index, 0);
726 ReleaseReadLock(&tdc->tlock);
727 if (!FidCmp(&tdc->f.fid, &avc->f.fid)) {
728 /* same file, and modified, we'll store it back */
729 if (dcPos < dcCount) {
730 tdcArray[dcPos++] = tdc;
738 index = afs_dvnextTbl[index];
741 ReleaseWriteLock(&afs_xdcache);
743 /* Now we loop over the array of dcache entries and truncate them */
744 for (index = 0; index < dcPos; index++) {
745 struct osi_file *tfile;
747 tdc = tdcArray[index];
749 newSize = alen - AFS_CHUNKTOBASE(tdc->f.chunk);
752 ObtainSharedLock(&tdc->lock, 672);
753 if (newSize < tdc->f.chunkBytes) {
754 UpgradeSToWLock(&tdc->lock, 673);
755 tfile = afs_CFileOpen(&tdc->f.inode);
756 afs_CFileTruncate(tfile, newSize);
757 afs_CFileClose(tfile);
758 afs_AdjustSize(tdc, newSize);
759 if (alen < tdc->validPos) {
760 if (alen < AFS_CHUNKTOBASE(tdc->f.chunk))
763 tdc->validPos = alen;
765 ConvertWToSLock(&tdc->lock);
767 ReleaseSharedLock(&tdc->lock);
771 osi_Free(tdcArray, dcCount * sizeof(struct dcache *));
773 #if (defined(AFS_SUN5_ENV))
774 ObtainWriteLock(&avc->vlock, 547);
775 if (--avc->activeV == 0 && (avc->vstates & VRevokeWait)) {
776 avc->vstates &= ~VRevokeWait;
777 afs_osi_Wakeup((char *)&avc->vstates);
779 ReleaseWriteLock(&avc->vlock);