mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +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. Change-Id: Ib2c975ac215eeff28b4ff5f5bb0a387298d7aab9 Reviewed-on: http://gerrit.openafs.org/6165 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
5fc2365f5d
commit
f59312c0ae
@ -4085,9 +4085,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…
Reference in New Issue
Block a user