vldb_check: fix false mh block error message
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 24 Oct 2014 21:17:07 +0000 (17:17 -0400)
committerD Brashear <shadow@your-file-system.com>
Wed, 5 Nov 2014 13:38:15 +0000 (08:38 -0500)
commit6b93ad695e53a86dbe9eea13bd0ff651e1d8c9b7
treeaac189a533e5af6431a128f4d71600bcde6cbf72
parent46bc619c38591b831b61b3efa7fb7706fbd44527
vldb_check: fix false mh block error message

Fix a false error message about invalid mh blocks when the vldb has more
than one mh block.  To add insult to injury, vldb_check complains about
the wrong address and block number.

The flags field in the mh block header is in network byte order, in all
of the blocks, not just the first one.  Be sure to convert all of them
to host byte order so the VLCONTBLOCK flag check works.  Fix the error
message on the secondary blocks to show the correct address and block
number.

Example bogus error messages:

vldb_check ./vldb.DB0
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block

Change-Id: I31d96ad43f01fbf2774815184942be45e2d7820b
Reviewed-on: http://gerrit.openafs.org/11555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
src/vlserver/vldb_check.c