#ifndef AFS_NOSTATS
static void
-FillStoreStats(int code, int idx, osi_timeval_t xferStartTime,
+FillStoreStats(int code, int idx, osi_timeval32_t xferStartTime,
afs_size_t bytesToXfer, afs_size_t bytesXferred)
{
struct afs_stats_xferData *xferP;
- osi_timeval_t xferStopTime;
- osi_timeval_t elapsedTime;
+ osi_timeval32_t xferStopTime;
+ osi_timeval32_t elapsedTime;
xferP = &(afs_stats_cmfullperf.rpc.fsXferTimes[idx]);
- osi_GetuTime(&xferStopTime);
+ osi_GetTime(&xferStopTime);
(xferP->numXfers)++;
if (!code) {
(xferP->numSuccesses)++;
code = -1;
RX_AFS_GLOCK();
if (code) {
- osi_FreeSmallSpace(v);
- return code;
+ *rock = v;
+ return rxfs_storeDestroy(rock, code);
}
if (cacheDiskType == AFS_FCACHE_TYPE_UFS) {
v->tbuffer = osi_AllocLargeSpace(AFS_LRALLOCSIZ);
osi_Panic
("rxfs_storeInit: osi_AllocSmallSpace for iovecs returned NULL\n");
*ops = (struct storeOps *) &rxfs_storeMemOps;
-#ifdef notdef
- /* do this at a higher level now -- it's a parameter */
- /* for now, only do 'continue from close' code if file fits in one
- * chunk. Could clearly do better: if only one modified chunk
- * then can still do this. can do this on *last* modified chunk */
- length = avc->f.m.Length - 1; /* byte position of last byte we'll store */
- if (shouldWake) {
- if (AFS_CHUNK(length) != 0)
- *shouldWake = 0;
- else
- *shouldWake = 1;
- }
-#endif /* notdef */
}
*rock = (void *)v;
afs_size_t bytesXferred;
#ifndef AFS_NOSTATS
- osi_timeval_t xferStartTime; /*FS xfer start time */
+ osi_timeval32_t xferStartTime; /*FS xfer start time */
afs_size_t bytesToXfer = 10000; /* # bytes to xfer */
#endif /* AFS_NOSTATS */
XSTATS_DECLS;
*/
bytesToXfer = size;
- osi_GetuTime(&xferStartTime);
+ osi_GetTime(&xferStartTime);
#endif /* AFS_NOSTATS */
bytesXferred = 0;
}
if (code) {
- osi_FreeSmallSpace(v);
- return code;
+ *rock = v;
+ return rxfs_fetchDestroy(rock, code);
}
if (cacheDiskType == AFS_FCACHE_TYPE_UFS) {
v->tbuffer = osi_AllocLargeSpace(AFS_LRALLOCSIZ);
XSTATS_DECLS;
#ifndef AFS_NOSTATS
- osi_timeval_t xferStartTime; /*FS xfer start time */
+ osi_timeval32_t xferStartTime; /*FS xfer start time */
afs_size_t bytesToXfer = 0, bytesXferred = 0;
#endif
tc, rxconn, avc, base, size, &length, adc, fP, &ops, &rock);
#ifndef AFS_NOSTATS
- osi_GetuTime(&xferStartTime);
+ osi_GetTime(&xferStartTime);
#endif /* AFS_NOSTATS */
adc->validPos = base;