DAFS: VRS_r with VOL_SALVAGE_NO_OFFLINE in attach2
authorAndrew Deason <adeason@sinenomine.net>
Thu, 4 Oct 2012 20:49:56 +0000 (15:49 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Sun, 7 Oct 2012 13:04:02 +0000 (06:04 -0700)
One caller of VRequestSalvage_r in attach2 was not passing the
VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every
place that manually sets vp->nUsers = 0, since then the VPutVolume_r
handlers will never fire.

Change-Id: I088d93a6c598a4d636224f4cf4c0d89454efcca8
Reviewed-on: http://gerrit.openafs.org/8203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/vol/volume.c

index 21376e4..c85c835 100644 (file)
@@ -3444,7 +3444,7 @@ attach2(Error * ec, VolId volumeId, char *path, struct DiskPartition64 *partp,
 #ifdef AFS_DEMAND_ATTACH_FS
                error_state = VOL_STATE_ERROR;
                /* see if we can recover */
-               VRequestSalvage_r(ec, vp, SALVSYNC_NEEDED, 0 /*flags*/);
+               VRequestSalvage_r(ec, vp, SALVSYNC_NEEDED, VOL_SALVAGE_NO_OFFLINE);
 #endif
            }
 #ifdef AFS_DEMAND_ATTACH_FS