mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
volser: dont double-stat vnodes when dumping
we get the size, then we get it again. no clue why. let's just not. Change-Id: I430d5c9941043341908cbf50ae70b982bb0ab8b3 Reviewed-on: http://gerrit.openafs.org/5398 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
11b6f9f003
commit
6c18c8844f
@ -705,7 +705,6 @@ DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
|
||||
#ifndef AFS_NT40_ENV
|
||||
struct afs_stat status;
|
||||
#endif
|
||||
afs_sfsize_t size;
|
||||
#ifdef AFS_AIX_ENV
|
||||
#include <sys/statfs.h>
|
||||
#if defined(AFS_AIX52_ENV)
|
||||
@ -744,8 +743,7 @@ DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
|
||||
#endif /* AFS_NT40_ENV */
|
||||
|
||||
|
||||
size = FDH_SIZE(handleP);
|
||||
SplitInt64(size, hi, lo);
|
||||
SplitInt64(howBig, hi, lo);
|
||||
if (hi == 0L) {
|
||||
code = DumpInt32(iodp, 'f', lo);
|
||||
} else {
|
||||
@ -761,7 +759,7 @@ DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
|
||||
return VOLSERDUMPERROR;
|
||||
}
|
||||
|
||||
for (nbytes = size; (nbytes && !error); nbytes -= howMany) {
|
||||
for (nbytes = howBig; (nbytes && !error); nbytes -= howMany) {
|
||||
if (nbytes < howMany)
|
||||
howMany = nbytes;
|
||||
|
||||
@ -801,7 +799,7 @@ DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
|
||||
/* Now seek over the data we could not get. An error here means we
|
||||
* can't do the next read.
|
||||
*/
|
||||
howFar = (size_t)((size - nbytes) + howMany);
|
||||
howFar = (size_t)((howBig - nbytes) + howMany);
|
||||
}
|
||||
|
||||
/* Now write the data out */
|
||||
|
Loading…
Reference in New Issue
Block a user