short afs_waitForeverCount = 0;
afs_int32 afs_showflags = GAGUSER | GAGCONSOLE; /* show all messages */
-#ifdef AFS_DISCON_ENV
afs_int32 afs_is_disconnected;
afs_int32 afs_is_discon_rw;
/* On reconnection, turn this knob on until it finishes,
* then turn it off.
*/
afs_int32 afs_in_sync = 0;
-#endif
struct afs_pdata {
char *ptr;
DECL_PIOCTL(PGetPAG);
#if defined(AFS_CACHE_BYPASS)
DECL_PIOCTL(PSetCachingThreshold);
-DECL_PIOCTL(PSetCachingBlkSize);
#endif
/*
goto loop;
}
#ifdef AFS_DARWIN80_ENV
- if (tvc->f.states & CDeadVnode) {
- if (!(tvc->f.states & CBulkFetching)) {
- ReleaseReadLock(&afs_xvcache);
- afs_osi_Sleep(&tvc->f.states);
- goto loop;
+ if (tvc->f.states & CDeadVnode) {
+ if (!(tvc->f.states & CBulkFetching)) {
+ ReleaseReadLock(&afs_xvcache);
+ afs_osi_Sleep(&tvc->f.states);
+ goto loop;
+ }
}
- }
-#endif
-#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
- AFS_FAST_HOLD(tvc);
-#elif defined(AFS_DARWIN80_ENV)
vp = AFSTOV(tvc);
if (vnode_get(vp))
continue;
{
afs_int32 getting = 1;
afs_int32 setting = 1;
- afs_int32 threshold;
+ afs_int32 threshold = AFS_CACHE_BYPASS_DISABLED;
if (afs_pd_getInt(ain, &threshold) != 0)
setting = 0;
DECL_PIOCTL(PDiscon)
{
-#ifdef AFS_DISCON_ENV
static afs_int32 mode = 1; /* Start up in 'off' */
afs_int32 force = 0;
int code = 0;
- char flags[3];
+ char flags[4];
+ struct vrequest lreq;
- if (afs_pd_getBytes(ain, &flags, 3) == 0) {
+ if (afs_pd_getBytes(ain, &flags, 4) == 0) {
if (!afs_osi_suser(*acred))
return EPERM;
afs_ConflictPolicy = flags[1] - 1;
if (flags[2])
force = 1;
+ if (flags[3]) {
+ /* Fake InitReq support for UID override */
+ memset(&lreq, 0, sizeof(lreq));
+ lreq.uid = flags[3];
+ areq = &lreq; /* override areq we got */
+ }
/*
* All of these numbers are hard coded in fs.c. If they
return code;
return afs_pd_putInt(aout, mode);
-#else
- return EINVAL;
-#endif
}
DECL_PIOCTL(PNFSNukeCreds)