DECL_PIOCTL(PDiscon);
DECL_PIOCTL(PNFSNukeCreds);
DECL_PIOCTL(PNewUuid);
-DECL_PIOCTL(PPrecache);
+DECL_PIOCTL(PPrecache);
DECL_PIOCTL(PGetPAG);
#if defined(AFS_CACHE_BYPASS)
DECL_PIOCTL(PSetCachingThreshold);
int arg;
};
-int
+int
afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp)
{
struct file *fd;
int
#ifdef AFS_SUN5_ENV
-afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
rval_t *vvp, afs_ucred_t *credp)
#else
#ifdef AFS_DARWIN100_ENV
afs_syscall64_pioctl(user_addr_t path, unsigned int com, user_addr_t cmarg,
int follow, afs_ucred_t *credp)
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
afs_ucred_t *credp)
#else
afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
struct vnode *realvp;
if
#ifdef AFS_SUN511_ENV
- (VOP_REALVP(vp, &realvp, NULL) == 0)
+ (VOP_REALVP(vp, &realvp, NULL) == 0)
#else
- (VOP_REALVP(vp, &realvp) == 0)
+ (VOP_REALVP(vp, &realvp) == 0)
#endif
{
struct vnode *oldvp = vp;
-
+
VN_HOLD(realvp);
vp = realvp;
AFS_RELE(oldvp);
/*!
* VIOCGETTOK (8) - Get authentication tokens
- *
+ *
* \ingroup pioctl
- *
+ *
* \param[in] ain cellid to return tokens for
* \param[out] aout token
- *
+ *
* \retval EIO
* Error if the afs daemon hasn't started yet
* \retval EDOM
* tokens
* \retval ENOTCONN
* Error if there aren't tokens for this cell
- *
+ *
* \post
* If the input paramater exists, get the token that corresponds to
* the parameter value, if there is no token at this value, get the
afs_int32 flags;
struct dcache * tdc;
int i, size;
-
+
AFS_STATCNT(PGetCacheSize);
if (afs_pd_remaining(ain) == sizeof(afs_int32)) {
} else {
return EINVAL;
}
-
+
memset(results, 0, sizeof(results));
results[0] = afs_cacheBlocks;
results[1] = afs_blocksUsed;
results[2] = afs_cacheFiles;
-
+
if (1 == flags){
for (i = 0; i < afs_cacheFiles; i++) {
if (afs_indexFlags[i] & IFFree) results[3]++;
* then someone probably has the file open and is writing
* into it. Better to skip flushing such a file, it will be
* brought back immediately on the next write anyway.
- *
+ *
* If we *must* flush, then this code has to be rearranged
* to call afs_storeAllSegments() first */
afs_FlushDCache(tdc);
return 0;
}
-/*
+/*
* VIOC_SETPREFS33 (42) - Set server ranks (deprecated)
*
* \param[in] ain the server preferences to be set
return 0;
}
-/*
+/*
* VIOC_GETSPREFS (43) - Get server ranks
*
* \ingroup pioctl
} else if (!code) {
EXP_RELE(outexporter);
}
- if (!code)
+ if (!code)
*com = (*com) | comp;
return code;
}
#endif /* AFS_NEED_CLIENTCONTEXT */
-/*!
+/*!
* VIOC_GETCPREFS (50) - Get client interface
*
* \ingroup pioctl
if (tc) {
RX_AFS_GUNLOCK();
code =
- RXAFS_FsCmd(tc->id, Fid, Inputs,
+ RXAFS_FsCmd(tc->id, Fid, Inputs,
(struct FsCmdOutputs *)aout);
RX_AFS_GLOCK();
} else
if (setting == 0 && getting == 0)
return EINVAL;
-
- /*
+
+ /*
* If setting, set first, and return the value now in effect
*/
if (setting) {
if (!afs_osi_suser(*acred))
return EPERM;
cache_bypass_threshold = threshold;
- afs_warn("Cache Bypass Threshold set to: %d\n", threshold);
+ afs_warn("Cache Bypass Threshold set to: %d\n", threshold);
/* TODO: move to separate pioctl, or enhance pioctl */
cache_bypass_strategy = LARGE_FILES_BYPASS_CACHE;
}
-
+
/* Return the current size threshold */
if (getting)
return afs_pd_putInt(aout, cache_bypass_threshold);