From: Andrew Deason Date: Wed, 14 Dec 2011 20:42:08 +0000 (-0600) Subject: afs: Clear VHardMount on ResetVolumeInfo X-Git-Tag: upstream/1.8.0_pre1^2~2938 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f469be407789e696c0b9e9a431b4879798a00e2a;p=packages%2Fo%2Fopenafs.git afs: Clear VHardMount on ResetVolumeInfo afs_Analyze sets VHardMount on a volume struct when a hard-mount scenario is encountered, and clears it after sleeping. However, if the volume struct has VRecheck set, or if it's not in memory, afs_Analyze cannot retrieve the volume struct in order to clear VHardMount again. For the VRecheck case, this can results in VHardMount never getting cleared, and so hard-mount messages for the volume seem to disappear. So, clear VHardMount when we set VRecheck so this does not occur. For the case where the volume struct is not in memory, this is not a problem, since when we allocate a volume struct again, the VHardMount state will not be retained. Change-Id: I607741241e330391b8c857b2a72f0e0cfc0b91cc Reviewed-on: http://gerrit.openafs.org/6335 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/afs/afs_volume.c b/src/afs/afs_volume.c index a32c6da84..e12d3e37f 100644 --- a/src/afs/afs_volume.c +++ b/src/afs/afs_volume.c @@ -1195,6 +1195,11 @@ afs_ResetVolumeInfo(struct volume *tv) AFS_STATCNT(afs_ResetVolumeInfo); ObtainWriteLock(&tv->lock, 117); tv->states |= VRecheck; + + /* the hard-mount code in afs_Analyze may not be able to reset this flag + * when VRecheck is set, so clear it here to ensure it gets cleared. */ + tv->states &= ~VHardMount; + for (i = 0; i < AFS_MAXHOSTS; i++) tv->status[i] = not_busy; if (tv->name) {