From: Andrew Deason Date: Wed, 30 Nov 2011 23:41:53 +0000 (-0600) Subject: DAFS: Ensure logging on attach2 errors X-Git-Tag: upstream/1.8.0_pre1^2~2979 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=53230846a202a50f6c3a61b38d62ccba8876f89d;p=packages%2Fo%2Fopenafs.git DAFS: Ensure logging on attach2 errors The attach2 error path transitions a volume to VOL_STATE_ERROR, in case whatever got us to that error path did not already put the volume in an appropriate state. Log when we do this, to make sure we do not end up with a volume in VOL_STATE_ERROR state silently. Change-Id: I02c842b64882d96e707e867ee0f7730a2bebd405 Reviewed-on: http://gerrit.openafs.org/6168 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/vol/volume.c b/src/vol/volume.c index 8d1cdfc87..195aafd48 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -3418,6 +3418,10 @@ unlocked_error: locked_error: #ifdef AFS_DEMAND_ATTACH_FS if (!VIsErrorState(V_attachState(vp))) { + if (VIsErrorState(error_state)) { + Log("attach2: forcing vol %u to error state (state %u flags 0x%x ec %d)\n", + vp->hashid, V_attachState(vp), V_attachFlags(vp), *ec); + } VChangeState_r(vp, error_state); } #endif /* AFS_DEMAND_ATTACH_FS */