struct afs_FSStats afs_fsstats;
-int LogLevel = 0;
int supported = 1;
int Console = 0;
afs_int32 BlocksSpare = 1024; /* allow 1 MB overruns */
Error errorCode = 0; /* return code to caller */
struct rx_connection *tcon = rx_ConnectionOf(acall);
- rx_KeepAliveOff(acall);
-
if ((errorCode = CheckVnodeWithCall(Fid, volptr, cbv, targetptr, locktype)))
goto gvpdone;
#endif /* ADMIN_IMPLICIT_LOOKUP */
}
gvpdone:
- if (errorCode)
- rx_KeepAliveOn(acall);
return errorCode;
} /*GetVolumePackage */
{
Error fileCode = 0; /* Error code returned by the volume package */
- rx_KeepAliveOff(acall);
if (parentwhentargetnotdir) {
VPutVnode(&fileCode, parentwhentargetnotdir);
assert_vnode_success_or_salvaging(fileCode);
if (volptr) {
VPutVolumeWithCall(volptr, cbv);
}
- rx_KeepAliveOn(acall);
if (*client) {
PutClient(client);
GetStatus(targetptr, OutStatus, rights, anyrights,
&tparentwhentargetnotdir);
- rx_KeepAliveOn(acall); /* I/O done */
-
/* if a r/w volume, promise a callback to the caller */
if (VolumeWriteable(volptr))
SetCallBackStruct(AddCallBack(client->z.host, Fid), CallBack);
&rights, &anyrights)))
goto Bad_FetchStatus;
- rx_KeepAliveOn(acall);
-
/* set volume synchronization information */
SetVolumeSync(Sync, volptr);
&rights, &anyrights)))
goto Bad_BulkStatus;
- rx_KeepAliveOn(acall);
-
/* set volume synchronization information, but only once per call */
if (i == 0)
SetVolumeSync(Sync, volptr);
&rights, &anyrights))) {
tstatus = &OutStats->AFSBulkStats_val[i];
+ tstatus->InterfaceVersion = 1;
if (thost->z.hostFlags & HERRORTRANS) {
tstatus->errorCode = sys_error_to_et(errorCode);
} else {
continue;
}
- rx_KeepAliveOn(acall);
-
/* set volume synchronization information, but only once per call */
if (!VolSync_set) {
SetVolumeSync(Sync, volptr);
CHK_FETCHSTATUS, 0))) {
tstatus = &OutStats->AFSBulkStats_val[i];
+ tstatus->InterfaceVersion = 1;
if (thost->z.hostFlags & HERRORTRANS) {
tstatus->errorCode = sys_error_to_et(errorCode);
} else {
goto Bad_StoreData;
}
- rx_KeepAliveOn(acall);
-
/* set volume synchronization information */
SetVolumeSync(Sync, volptr);
*/
if (parentwhentargetnotdir != NULL) {
tparentwhentargetnotdir = *parentwhentargetnotdir;
- rx_KeepAliveOff(acall);
VPutVnode(&fileCode, parentwhentargetnotdir);
- rx_KeepAliveOn(acall);
assert_vnode_success_or_salvaging(fileCode);
parentwhentargetnotdir = NULL;
}
if (errorCode && (!targetptr->changed_newTime))
goto Bad_StoreData;
- rx_KeepAliveOff(acall);
/* Update the status of the target's vnode */
Update_TargetVnodeStatus(targetptr, TVS_SDATA, client, InStatus,
targetptr, volptr, 0, 0);
- rx_KeepAliveOn(acall);
/* Get the updated File's status back to the caller */
GetStatus(targetptr, OutStatus, rights, anyrights,
VVnodeWriteToRead(&errorCode, targetptr);
assert_vnode_success_or_salvaging(errorCode);
- rx_KeepAliveOn(acall);
-
/* break call backs on the directory */
BreakCallBack(client->z.host, Fid, 0);
(parentwhentargetnotdir ? parentwhentargetnotdir
: targetptr), volptr, 0, 0);
- rx_KeepAliveOn(acall);
-
/* convert the write lock to a read lock before breaking callbacks */
VVnodeWriteToRead(&errorCode, targetptr);
assert_vnode_success_or_salvaging(errorCode);
parentptr->disk.linkCount,
client->z.InSameNetwork);
- rx_KeepAliveOn(acall);
-
/* Return the updated parent dir's status back to caller */
GetStatus(parentptr, OutDirStatus, rights, anyrights, 0);
Update_TargetVnodeStatus(targetptr, TVS_CFILE, client, InStatus,
parentptr, volptr, 0, 0);
- rx_KeepAliveOn(acall);
-
/* set up the return status for the parent dir and the newly created file, and since the newly created file is owned by the creator, give it PRSFS_ADMINISTER to tell the client its the owner of the file */
GetStatus(targetptr, OutFidStatus, rights | PRSFS_ADMINISTER, anyrights, parentptr);
GetStatus(parentptr, OutDirStatus, rights, anyrights, 0);
NewName, errno));
if ((errno != ENOENT) && (errno != EIO)
&& (errno != ENXIO))
- ViceLog(0, ("Do we need to fsck?"));
+ ViceLog(0, ("Do we need to fsck?\n"));
}
}
VN_SET_INO(newfileptr, (Inode) 0);
assert_vnode_success_or_salvaging(errorCode);
}
- rx_KeepAliveOn(acall);
-
/* break call back on NewDirFid, OldDirFid, NewDirFid and newFileFid */
BreakCallBack(client->z.host, NewDirFid, 0);
if (oldvptr != newvptr) {
Bad_Rename:
if (newfileptr) {
- rx_KeepAliveOff(acall);
VPutVnode(&fileCode, newfileptr);
assert_vnode_success_or_salvaging(fileCode);
}
VVnodeWriteToRead(&errorCode, parentptr);
assert_vnode_success_or_salvaging(errorCode);
- rx_KeepAliveOn(acall);
-
/* break call back on the parent dir */
BreakCallBack(client->z.host, DirFid, 0);
VVnodeWriteToRead(&errorCode, parentptr);
assert_vnode_success_or_salvaging(errorCode);
- rx_KeepAliveOn(acall);
-
/* break call back on DirFid */
BreakCallBack(client->z.host, DirFid, 0);
/*
VVnodeWriteToRead(&errorCode, parentptr);
assert_vnode_success_or_salvaging(errorCode);
- rx_KeepAliveOn(acall);
-
/* break call back on DirFid */
BreakCallBack(client->z.host, DirFid, 0);
VVnodeWriteToRead(&errorCode, parentptr);
assert_vnode_success_or_salvaging(errorCode);
- rx_KeepAliveOn(acall);
-
/* break call back on DirFid and fileFid */
BreakCallBack(client->z.host, DirFid, 0);
/* if no more locks left, a callback would be triggered here */
if (targetptr->disk.lock.lockCount <= 0) {
- rx_KeepAliveOn(acall);
/* convert the write lock to a read lock before breaking callbacks */
VVnodeWriteToRead(&errorCode, targetptr);
assert_vnode_success_or_salvaging(errorCode);
afs_int32 * a_timeP, AFS_CollData * a_dataP)
{ /*SRXAFS_GetXStats */
+ struct client *t_client = NULL; /* tmp ptr to client data */
+ struct rx_connection *tcon = rx_ConnectionOf(a_call);
int code; /*Return value */
afs_int32 *dataBuffP; /*Ptr to data to be returned */
afs_int32 dataBytes; /*Bytes in data buffer */
fsstats_StartOp(&fsstats, FS_STATS_RPCIDX_GETXSTATS);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
/*
* Record the time of day and the server version number.
*/
*/
code = 0;
- ViceLog(1,
- ("Received GetXStats call for collection %d\n",
- a_collectionNumber));
+ osi_auditU(a_call, GetXStatsEvent,
+ AUD_ID, t_client ? t_client->z.ViceId : 0,
+ AUD_INT, a_clientVersionNum,
+ AUD_INT, a_collectionNumber, AUD_END);
#if 0
/*
inet_ntoa(logHostAddr), ntohs(rxr_PortOf(rx_ConnectionOf(Call)))));
return ENOENT; /* is this proper error code? */
} else {
- rx_KeepAliveOff(Call);
/*
* See if the file has several links (from other volumes). If it
* does, then we have to make a copy before changing it to avoid
(afs_uintmax_t) Pos, (afs_uintmax_t) DataLength,
(afs_uintmax_t) FileLength, (afs_uintmax_t) Length));
- /* truncate the file iff it needs it (ftruncate is slow even when its a noop) */
- if (FileLength < DataLength)
- FDH_TRUNC(fdP, FileLength);
bytesTransfered = 0;
#ifndef HAVE_PIOV
tbuffer = AllocSendBuffer();
#endif /* HAVE_PIOV */
+ /* truncate the file iff it needs it (ftruncate is slow even when its a noop) */
+ if (FileLength < DataLength) {
+ errorCode = FDH_TRUNC(fdP, FileLength);
+ if (errorCode)
+ goto done;
+ }
+
/* if length == 0, the loop below isn't going to do anything, including
* extend the length of the inode, which it must do, since the file system
* assumes that the inode length == vnode's file length. So, we extend