vol: Pay attention to specialStatus after VAVByVp
authorAndrew Deason <adeason@sinenomine.net>
Wed, 2 May 2012 17:07:49 +0000 (12:07 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 8 May 2012 03:22:23 +0000 (20:22 -0700)
attach2/VAttachVolumeByVp_r do not alter the yielded error code
according to specialStatus. So, pay attention to specialStatus after
receiving an error from VAttachVolumeByVp_r, to ensure we respond with
the correct error code.

Change-Id: I59e977dd1f0949f8fe5670c7a52429acbfb7d7e9
Reviewed-on: http://gerrit.openafs.org/7303
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/vol/volume.c

index 8f6e83f..9ca566c 100644 (file)
@@ -4108,9 +4108,17 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint,
                    if (!vp->pending_vol_op) {
                        endloop = 1;
                    }
+                   if (vp->specialStatus) {
+                       *ec = vp->specialStatus;
+                   }
                    break;
+
                default:
-                   *ec = VNOVOL;
+                   if (vp->specialStatus) {
+                       *ec = vp->specialStatus;
+                   } else {
+                       *ec = VNOVOL;
+                   }
                    endloop = 1;
                }
                if (endloop) {