From: Rainer Toebbicke Date: Mon, 15 Oct 2007 15:18:57 +0000 (+0000) Subject: STABLE14-volser-return-extended-stats-to-callers-20071015 X-Git-Tag: openafs-stable-1_4_5pre2~5 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d6e07207a5a650efda44b0d29030a7a611277a49;p=packages%2Fo%2Fopenafs.git STABLE14-volser-return-extended-stats-to-callers-20071015 FIXES 74398 make sure when we roll over stats we return the new values (cherry picked from commit 14e71a12b6da596880debc21c224b94c33a5b6f2) --- diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index c604d5377..7aabab2cd 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -2063,11 +2063,6 @@ VolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID, xInfoP->accessDate = volDiskDataP->accessDate; xInfoP->updateDate = volDiskDataP->updateDate; xInfoP->backupDate = volDiskDataP->backupDate; - now = FT_ApproxTime(); - if (now - volDiskDataP->dayUseDate > OneDay) - xInfoP->dayUse = 0; - else - xInfoP->dayUse = volDiskDataP->dayUse; xInfoP->filecount = volDiskDataP->filecount; xInfoP->maxquota = volDiskDataP->maxquota; xInfoP->size = volDiskDataP->diskused; @@ -2075,8 +2070,15 @@ VolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID, /* * Copy out the stat fields in a single operation. */ - memcpy((char *)&(xInfoP->stat_reads[0]), + now = FT_ApproxTime(); + if (now - volDiskDataP->dayUseDate > OneDay) { + xInfoP->dayUse = 0; + memset((char *)&(xInfoP->stat_reads[0]), 0, numStatBytes); + } else { + xInfoP->dayUse = volDiskDataP->dayUse; + memcpy((char *)&(xInfoP->stat_reads[0]), (char *)&(volDiskDataP->stat_reads[0]), numStatBytes); + } /* * We're done copying. Detach the volume and iterate (at this