DAFS: Add explicit 'valid' field for index maps
authorAndrew Deason <adeason@sinenomine.net>
Thu, 29 Sep 2011 20:22:35 +0000 (15:22 -0500)
committerDerrick Brashear <shadow@dementix.org>
Fri, 30 Sep 2011 23:51:41 +0000 (16:51 -0700)
commitd54a9994d362ce3f287fe786839ec72f6d94806c
tree2542fc4cb790a2e5e58b27016662a829182b919d
parentd43438bb914f267f1c65d81e23efbab6874ae426
DAFS: Add explicit 'valid' field for index maps

The CB, FE, and host serialization structures were just using the
relevant indices to determine whether or not an entry mapping and old
index to a new index was populated with actual data. For host
structures, this really isn't sufficient, since our index can be 0,
and the structure is calloc'd, so the index in the structure could
also be 0.

Add a flag explicitly stating whether or not the structure has been
filled in, to make this unambiguous.

Change-Id: Ia69e25fa73e10dc10cf3ddf08bb4feb2c9958674
Reviewed-on: http://gerrit.openafs.org/5526
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/tviced/serialize_state.h
src/viced/callback.c
src/viced/host.c