]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DAFS: Ensure logging on attach2 errors
authorAndrew Deason <adeason@sinenomine.net>
Wed, 30 Nov 2011 23:41:53 +0000 (17:41 -0600)
committerDerrick Brashear <shadow@dementix.org>
Fri, 16 Dec 2011 11:55:26 +0000 (03:55 -0800)
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.

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

Change-Id: I4dbe5c6f8be8820620e7a68c7f42b426211dbb82
Reviewed-on: http://gerrit.openafs.org/6324
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/vol/volume.c

index c38b86ec3dcf76ef427ad4fb9bd806e08f830ec9..d44c701bf9fc5fa4de1a6f313899dde2954520a8 100644 (file)
@@ -3420,6 +3420,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 */