Fix the volume size calculation when volinfo is invoked with
both -sizeOnly and -saveinodes at the same time.
Change-Id: Ifafe6a128918500ac6fd5f9a1e39de2d4aff785d
Reviewed-on: http://gerrit.openafs.org/4691
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
ino = VNDISK_GET_INO(vnode);
if (saveinodes) {
- if (VALID_INO(ino) && (class == vSmall)) {
+ if (!VALID_INO(ino)) {
+ continue;
+ }
+ if (dsizeOnly && (class == vLarge)) {
+ afs_fsize_t fileLength;
+
+ VNDISK_GET_LEN(fileLength, vnode);
+ Vvnodesize += fileLength;
+ Vvnodesize_k += fileLength / 1024;
+ } else if (class == vSmall) {
IHandle_t *ih1;
FdHandle_t *fdP1;
IH_INIT(ih1, V_device(vp), V_parentId(vp), ino);