#if defined(AFS_CACHE_BYPASS)
#include "afs/afs_bypasscache.h"
-#endif// defined(AFS_CACHE_BYPASS)
+#endif /* AFS_CACHE_BYPASS */
/* background request queue size */
afs_lock_t afs_xbrs; /* lock for brs */
static int brsInit = 0;
last10MinCheck = lastCheck = osi_Time();
while (1) {
if (afs_termState == AFSOP_STOP_CS) {
- afs_termState = AFSOP_STOP_BKG;
+ afs_termState = AFSOP_STOP_TRUNCDAEMON;
afs_osi_Wakeup(&afs_termState);
break;
}
}
/* shutdown check. */
if (afs_termState == AFSOP_STOP_CS) {
- afs_termState = AFSOP_STOP_BKG;
+ afs_termState = AFSOP_STOP_TRUNCDAEMON;
afs_osi_Wakeup(&afs_termState);
break;
}
afs_FlushActiveVcaches(0); /* flush NFS writes */
afs_FlushVCBs(1); /* flush queued callbacks */
-#if defined(AFS_NBSD50_ENV)
- /* XXXX */
- {
- int c1, c2;
- c1 = ISAFS_GLOCK(); /* this thread owns the GLOCK */
- if (!c1) {
- c2 = mutex_tryenter(&afs_global_mtx); /* not held either */
- if (c2)
- AFS_GUNLOCK();
- }
- else
- c2 = 0;
- printf("afs_daemons periodic glock check: curthread owns glock %s; "
- "glock held somewhere %s\n",
- c1 ? "true" : "false",
- c2 ? "true" : "false");
- }
-#endif
-
afs_MaybeWakeupTruncateDaemon(); /* free cache space if have too */
rx_CheckPackets(); /* Does RX need more packets? */
if (afs_CheckServerDaemonStarted)
afs_termState = AFSOP_STOP_CS;
else
- afs_termState = AFSOP_STOP_BKG;
+ afs_termState = AFSOP_STOP_TRUNCDAEMON;
afs_osi_Wakeup(&afs_termState);
return;
}
spin_lock(&dp->d_lock);
#endif
#endif
+#if defined(D_ALIAS_IS_HLIST)
+ hlist_del_init(&dp->d_alias);
+ hlist_add_head(&dp->d_alias, &(AFSTOV(vcp)->i_dentry));
+#else
list_del_init(&dp->d_alias);
list_add(&dp->d_alias, &(AFSTOV(vcp)->i_dentry));
+#endif
dp->d_inode = AFSTOV(vcp);
#if defined(AFS_LINUX24_ENV)
#if defined(AFS_LINUX26_ENV)
afs_BRelease(tb); /* this grabs and releases afs_xbrs lock */
}
-#ifdef AFS_DARWIN80_ENV
+#ifdef AFS_NEW_BKG
int
afs_BackgroundDaemon(struct afs_uspc_param *uspc, void *param1, void *param2)
#else
/* Irix with "short stack" exits */
afs_BackgroundDaemon_once();
-#ifdef AFS_DARWIN80_ENV
+#ifdef AFS_NEW_BKG
/* If it's a re-entering syscall, complete the request and release */
if (uspc->ts > -1) {
tb = afs_brs;
#endif
/* Otherwise it's a new one */
afs_nbrs++;
-#ifdef AFS_DARWIN80_ENV
+#ifdef AFS_NEW_BKG
}
#endif
if (afs_termState == AFSOP_STOP_BKG) {
if (--afs_nbrs <= 0)
- afs_termState = AFSOP_STOP_TRUNCDAEMON;
+ afs_termState = AFSOP_STOP_RXCALLBACK;
ReleaseWriteLock(&afs_xbrs);
afs_osi_Wakeup(&afs_termState);
-#ifdef AFS_DARWIN80_ENV
+#ifdef AFS_NEW_BKG
return -2;
#else
return;
afs_brsDaemons--;
}
}
-#ifdef AFS_DARWIN80_ENV
+#ifdef AFS_NEW_BKG
return -2;
#endif
}
SPUNLOCK(afs_sgibklock, s);
AFS_GLOCK();
tdc->dflags &= ~DFEntryMod;
- afs_WriteDCache(tdc, 1);
+ osi_Assert(afs_WriteDCache(tdc, 1) == 0);
AFS_GUNLOCK();
s = SPLOCK(afs_sgibklock);
}