]> git.michaelhowe.org Git - packages/o/openafs.git/commit
salvager: Remove VolumeSummary->fileName
authorAndrew Deason <adeason@sinenomine.net>
Wed, 22 Feb 2012 00:05:32 +0000 (18:05 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 11 Sep 2013 21:38:43 +0000 (14:38 -0700)
commit42a59d23a327380fc94ca2ff04bc5e4ff3bbf305
tree297f5546f77e30d5d1e0a23aa10827d7f413f695
parentac0ce5d6ef57206cbad7dc2779c371a6b7bd46e4
salvager: Remove VolumeSummary->fileName

The 'fileName' field in VolumeSummary serves two apparent purposes:

 - Storing the filename of the volume header file (V0XXX.vol).

 - Indicating whether or not a given VolumeSummary object is
   referenced by any inodes on disk. fileName is set by
   AskVolumeSummary/GetVolumeSummary, and is cleared in
   SalvageFileSys1 when a matching inodeSummary entry is found.

This is very confusing. The first purpose is completely unnecessary;
we can always calculate the filename from the volume id for the
volume, and we already enforce the filename to be of that specific
format. The second purpose is very unclear in the current code, and
overloads the meaning of the field.

So instead, remove fileName entirely. Code that was using it to locate
the header file are changed to use VolumeExternalName_r. Code that was
using the field to determine if the volume is "unused" is changed to
use a field just called "unused", set to 0 or 1.

Reviewed-on: http://gerrit.openafs.org/6786
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 2a1719faa810663d6d9cf774339e286c18ef2717)

Change-Id: I295ef6c982991bdeeb533c55e6ba6d3175789ce6
Reviewed-on: http://gerrit.openafs.org/9461
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/vol-salvage.c
src/vol/vol-salvage.h