From: Derrick Brashear Date: Tue, 26 Jan 2010 17:27:11 +0000 (-0500) Subject: viced detailed stats should record stored bytes correctly X-Git-Tag: openafs-devel-1_5_71~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=14e050033f40272a919bb54e981d8165d927240a;p=packages%2Fo%2Fopenafs.git viced detailed stats should record stored bytes correctly if we get an error reading data, don't subtract it from the length stored statistic Change-Id: I2fec260a9f677c0747ff2c6f975745ccb1e58447 Reviewed-on: http://gerrit.openafs.org/1165 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index a4b8e1019..fc245777f 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -7395,13 +7395,13 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid, #else /* AFS_NT40_ENV */ errorCode = rx_Readv(Call, tiov, &tnio, RX_MAXIOVECS, rlen); #endif /* AFS_NT40_ENV */ -#if FS_STATS_DETAILED - (*a_bytesStoredP) += errorCode; -#endif /* FS_STATS_DETAILED */ if (errorCode <= 0) { errorCode = -32; break; } +#if FS_STATS_DETAILED + (*a_bytesStoredP) += errorCode; +#endif /* FS_STATS_DETAILED */ rlen = errorCode; #ifdef AFS_NT40_ENV errorCode = FDH_WRITE(fdP, tbuffer, rlen);