vol: ensure ih package defaults are set for salvage
Like most OpenAFS components that work with ihandles, salvager relies on
implicit invocation of ih_PkgDefaults via the one-shot in the first call
to IH_INIT.
Unfortunately, there is at least one reachable code path in salvager
that asserts (panics) because vol_io_params has not yet been
initialized. This is when salvaging a volume group that does not have a
link table; the salvager then panics while attempting to create a new
link table:
SalvageFileSys -> SalvageFileSys1 -> DoSalvageVolumeGroup ->
CreateLinkTable -> IH_CREATE -> namei_icreate -> icreate ->
namei_SetLinkCount -> FDH_SYNC -> ih_fdsync -> osi_Assert(0)
This path was discovered while testing the non-dafs salvager, but it has
also been observed in the field with the DAFS salvageserver. It is
possible that there are additional undiscovered paths where
vol_io_params are required but uninitialized.
Add an implicit ih_PkgDefaults call to icreate to avoid triggering the
assert via the code path above.
Change-Id: If348d7f8ab2d34d55727b5a6d78db6e1c8e14cdf
Reviewed-on: https://gerrit.openafs.org/14378
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>