[OpenAFS-devel] New volume header field: root DV

Derrick Brashear shadow@gmail.com
Tue, 2 Mar 2010 15:15:49 -0500


On Tue, Mar 2, 2010 at 2:53 PM, Jeffrey Hutzelman <jhutz@cmu.edu> wrote:
> --On Tuesday, March 02, 2010 01:28:08 PM -0600 Andrew Deason
> <adeason@sinenomine.net> wrote:
>
>> The purpose of this is for when we are salvaging a volume that has lost
>> its root vnode. Gerrit 1235 has the code to create a new root vnode, but
>> we must guess as to what the dv for it would be. The current guess is
>> based on the creationDate for the volume, which isn't really robust.
>>
>> So instead, if we store the root dv redundantly in the volume header, we
>> stand a much better chance at choosing a dv that won't screw up clients,
>> since we can base the new dv off of the last known dv.
>
> Yuck. =A0The root vnode DV is stored in the large vnode index, and in the
> metadata for the underlying inode (and, in namei, in the link table). =A0=
The
> only reason you'd need an additional copy is if you lost both the root vn=
ode
> and the index, in which case it seems just as likely that you've lost the
> volume info inode as well.

I still advocate the "no, the volume is trashed, we give you a high dv
and make the volume readonly" approach. if you lost the root vnode,
you're not really in good shape. But I'm unwilling to suggest it's the
"one true way"