salvager: Do not AskDelete on GetInodeSummary fail
authorAndrew Deason <adeason@sinenomine.net>
Thu, 31 Mar 2011 17:51:44 +0000 (12:51 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 6 Apr 2011 15:20:16 +0000 (08:20 -0700)
GetInodeSummary can fail due to a number of different reasons, not
just because the VG doesn't exist. If, for example, we just fail to
write the temporary inode file, we will return with an error, but we
should not AskDelete the volume in that instance.

GetInodeSummary already has code to delete the volumes in question
when no inodes are found, so remove the extra AskDelete after
GetInodeSummary returns.

Change-Id: I5df7a3ffed962b62409adbedfa1c1a0445dad2f8
Reviewed-on: http://gerrit.openafs.org/4438
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/vol/vol-salvage.c

index cdfded2..53dc826 100644 (file)
@@ -831,11 +831,6 @@ SalvageFileSys1(struct DiskPartition64 *partP, VolumeId singleVolumeNumber)
 
     if (GetInodeSummary(salvinfo, inodeFile, singleVolumeNumber) < 0) {
        OS_CLOSE(inodeFile);
-       if (singleVolumeNumber) {
-           /* the volume group -- let alone the volume -- does not exist,
-            * but we checked it out, so give it back to the fileserver */
-           AskDelete(salvinfo, singleVolumeNumber);
-       }
        return;
     }
     salvinfo->inodeFd = inodeFile;