mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
vol: Avoid VBUSY/VRESTARTING trick for offline vop
Currently, if GetVolume() finds that the volume we're trying to attach has a vol op that leaves the volume offline, we do the VBUSY/VRESTARTING trick as described in CheckVnode(). This doesn't make any sense for a couple of reasons. For one, VBUSY/VRESTARTING is not the correct error code to return to the client when an offline vol op is in progress and vp->specialStatus is not set everywhere else we yield VOFFLINE. Additionally, this block of code is only hit once for a particular vol op. Once we reach this section, the volume is in UNATTACHED state, and so on the next iteration of GetVolume we will immediately return VOFFLINE (or specialStatus). So the CheckVnode-like situation is not applicable, since we are not returning VBUSY to the same client for 15 minutes; we would return VBUSY once and then return VOFFLINE. Change-Id: I0e8376df7937fd6bd01f9998371b9289c4ad2618 Reviewed-on: http://gerrit.openafs.org/7302 Reviewed-by: Tom Keiser <tkeiser@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
098e6f141f
commit
21ed79aeae
@ -4171,14 +4171,7 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (client_ec) {
|
if (client_ec) {
|
||||||
/* see CheckVnode() in afsfileprocs.c for an explanation
|
*client_ec = VOFFLINE;
|
||||||
* of this error code logic */
|
|
||||||
afs_uint32 now = FT_ApproxTime();
|
|
||||||
if ((vp->stats.last_vol_op + (10 * 60)) >= now) {
|
|
||||||
*client_ec = VBUSY;
|
|
||||||
} else {
|
|
||||||
*client_ec = VRESTARTING;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*ec = VOFFLINE;
|
*ec = VOFFLINE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user