Create missing root directory when ORPH_ATTACH
authorAndrew Deason <adeason@sinenomine.net>
Wed, 3 Feb 2010 19:02:23 +0000 (13:02 -0600)
committerDerrick Brashear <shadow@dementia.org>
Sun, 21 Mar 2010 17:10:29 +0000 (10:10 -0700)
commit32ebc44f42aad7dd77d42d07bfd891e8be6f1fff
treef4428ebfdcd240bdf19d4e599147e0ddd73335fa
parent88a40ffd3b82f3ca1a1b2d57f32859a9d57b922e
Create missing root directory when ORPH_ATTACH

When we are salvaging with ORPH_ATTACH, orphans are normally attached to
a volume's root directory. If the volume is missing a root directory,
however, nothing is attached, and the volume can appear empty or
unusable.

So, to make it possible to get a useful volume out of a volume that lost
(only) its root directory, create a new root dir, and attach orphans to
that root.

FIXES 94658

Change-Id: I946a60485b5793952707f44ac369ee243e8dc076
Reviewed-on: http://gerrit.openafs.org/1235
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/vol-salvage.c