From: Rainer Toebbicke Date: Mon, 15 Oct 2007 15:15:56 +0000 (+0000) Subject: DEVEL15-volser-return-extended-stats-to-callers-20071015 X-Git-Tag: openafs-devel-1_5_26~31 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7dc3eb4233119058cc0fdede2df04aa3b1e47a08;p=packages%2Fo%2Fopenafs.git DEVEL15-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 f421b473e..e1dd04334 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -2068,11 +2068,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; @@ -2080,8 +2075,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