mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
viced: Use xfer indices for xfer data
Use the xfer indices for the xfer-related data, not the op indices, so we don't try to fill in data beyond the actual storage for the stats. Change-Id: I075d4eb9439d9bd603489f0aa90b3c18c3959de3 Reviewed-on: http://gerrit.openafs.org/5524 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
5587bbfc0b
commit
22d94407ea
@ -2287,7 +2287,7 @@ common_FetchData64(struct rx_call *acall, struct AFSFid *Fid,
|
||||
parentwhentargetnotdir = NULL;
|
||||
}
|
||||
|
||||
fsstats_StartXfer(&fsstats);
|
||||
fsstats_StartXfer(&fsstats, FS_STATS_XFERIDX_FETCHDATA);
|
||||
|
||||
/* actually do the data transfer */
|
||||
errorCode =
|
||||
@ -2900,7 +2900,7 @@ common_StoreData64(struct rx_call *acall, struct AFSFid *Fid,
|
||||
parentwhentargetnotdir = NULL;
|
||||
}
|
||||
|
||||
fsstats_StartXfer(&fsstats);
|
||||
fsstats_StartXfer(&fsstats, FS_STATS_XFERIDX_STOREDATA);
|
||||
|
||||
errorCode =
|
||||
StoreData_RXStyle(volptr, targetptr, Fid, client, acall, Pos, Length,
|
||||
|
@ -340,7 +340,6 @@ extern afs_uint32 FS_HostAddr_HBO;
|
||||
|
||||
/* Logging helper functions */
|
||||
struct fsstats {
|
||||
int index;
|
||||
struct fs_stats_opTimingData *opP;
|
||||
struct fs_stats_xferData *xferP;
|
||||
struct timeval opStartTime;
|
||||
@ -349,7 +348,7 @@ struct fsstats {
|
||||
|
||||
extern void fsstats_StartOp(struct fsstats *stats, int index);
|
||||
extern void fsstats_FinishOp(struct fsstats *stats, int code);
|
||||
extern void fsstats_StartXfer(struct fsstats *stats);
|
||||
extern void fsstats_StartXfer(struct fsstats *stats, int index);
|
||||
extern void fsstats_FinishXfer(struct fsstats *, int, afs_sfsize_t,
|
||||
afs_sfsize_t, int *);
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
void
|
||||
fsstats_StartOp(struct fsstats *stats, int index)
|
||||
{
|
||||
stats->index = index;
|
||||
stats->opP = &(afs_FullPerfStats.det.rpcOpTimes[index]);
|
||||
FS_LOCK;
|
||||
(stats->opP->numOps)++;
|
||||
@ -56,10 +55,10 @@ fsstats_FinishOp(struct fsstats *stats, int code)
|
||||
}
|
||||
|
||||
void
|
||||
fsstats_StartXfer(struct fsstats *stats)
|
||||
fsstats_StartXfer(struct fsstats *stats, int index)
|
||||
{
|
||||
FT_GetTimeOfDay(&stats->xferStartTime, NULL);
|
||||
stats->xferP = &(afs_FullPerfStats.det.xferOpTimes[stats->index]);
|
||||
stats->xferP = &(afs_FullPerfStats.det.xferOpTimes[index]);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user