mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
DAFS: Ensure GetVolume errors on ERROR volumes
In GetVolume, after we call VAttachVolumeByVp_r, there is no explicit check to see if vp is in VOL_STATE_ERROR state. Make sure we don't try to use such a volume, or blindly transition the volume away from that state. Reviewed-on: http://gerrit.openafs.org/6165 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org> (cherry picked from commit f59312c0aee1a5376b29262efc6e6ea71264305a) Change-Id: Ibdd5cb5c475409918cdad1e73e2d7ed4ef57bd13 Reviewed-on: http://gerrit.openafs.org/6321 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
012e9e26b8
commit
3669fd56d3
@ -4016,9 +4016,17 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint,
|
|||||||
vp = NULL;
|
vp = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AFS_DEMAND_ATTACH_FS
|
if (VIsErrorState(V_attachState(vp))) {
|
||||||
|
/* make sure we don't take a vp in VOL_STATE_ERROR state and use
|
||||||
|
* it, or transition it out of that state */
|
||||||
|
if (!*ec) {
|
||||||
|
*ec = VNOVOL;
|
||||||
|
}
|
||||||
|
vp = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this test MUST happen after VAttachVolymeByVp, so vol_op_state is
|
* this test MUST happen after VAttachVolymeByVp, so vol_op_state is
|
||||||
* not VolOpRunningUnknown (attach2 would have converted it to Online
|
* not VolOpRunningUnknown (attach2 would have converted it to Online
|
||||||
|
Loading…
x
Reference in New Issue
Block a user