vol: Introduce and use FDH_BLOCKSIZE 62/14662/4
authorAndrew Deason <adeason@sinenomine.net>
Wed, 3 Jun 2020 20:53:48 +0000 (15:53 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 22 Jul 2021 02:40:21 +0000 (22:40 -0400)
commit939787565d5be55a8a803043dbc4f27b3f11b906
tree43d525ebe6c895c38a16958b6ab6fdc2dba7d14f
parenta912db315b4f29673808a7f900eb038ebd7b89c2
vol: Introduce and use FDH_BLOCKSIZE

A couple of places in src/volser currently have some logic to get the
size and blocksize of a file. The existing logic is nontrivial due to
platform-specific quirks, and ignores afs_fstat errors.

To fix these issue and consolidate the code into one place, introduce
a new function, FDH_BLOCKSIZE, which gets the file size and blksize.
Update the places in src/volser to use the new function.

Change-Id: I4daeec84c8fdb5756a8d6a7f477d0045a19a8fe9
Reviewed-on: https://gerrit.openafs.org/14662
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/vol/ihandle.c
src/vol/ihandle.h
src/volser/dumpstuff.c
src/volser/vol-dump.c