mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: reset volume NOEXIST flag
In response to fs checkvolumes the NOEXIST flag should be reset. It should also be reset if the volume location update fails because of a commumicaton (or other) error with the VLDB server. The volume's lastUpdateTime is refreshed on error. Change-Id: I0bb5e61b9eb8a9613d47a32acda35b79aa71c293 Reviewed-on: http://gerrit.openafs.org/7969 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
69fd66abe7
commit
165c9e7465
@ -677,6 +677,12 @@ long cm_UpdateVolumeLocation(struct cm_cell *cellp, cm_user_t *userp, cm_req_t *
|
|||||||
_InterlockedOr(&volp->flags, CM_VOLUMEFLAG_NOEXIST);
|
_InterlockedOr(&volp->flags, CM_VOLUMEFLAG_NOEXIST);
|
||||||
} else {
|
} else {
|
||||||
rwNewstate = roNewstate = bkNewstate = vl_alldown;
|
rwNewstate = roNewstate = bkNewstate = vl_alldown;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* we are updating lastUpdateTime but didn't get an answer
|
||||||
|
* so clear the no exist flag.
|
||||||
|
*/
|
||||||
|
_InterlockedAnd(&volp->flags, ~CM_VOLUMEFLAG_NOEXIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (volp->vol[RWVOL].state != rwNewstate) {
|
if (volp->vol[RWVOL].state != rwNewstate) {
|
||||||
@ -1226,8 +1232,13 @@ void cm_RefreshVolumes(int lifetime)
|
|||||||
InterlockedIncrement(&volp->refCount);
|
InterlockedIncrement(&volp->refCount);
|
||||||
lock_ReleaseRead(&cm_volumeLock);
|
lock_ReleaseRead(&cm_volumeLock);
|
||||||
|
|
||||||
if (!(volp->flags & CM_VOLUMEFLAG_RESET)) {
|
if (!(volp->flags & CM_VOLUMEFLAG_RESET) ||
|
||||||
|
(volp->flags & CM_VOLUMEFLAG_NOEXIST)) {
|
||||||
lock_ObtainWrite(&volp->rw);
|
lock_ObtainWrite(&volp->rw);
|
||||||
|
if (volp->flags & CM_VOLUMEFLAG_NOEXIST) {
|
||||||
|
_InterlockedAnd(&volp->flags, ~CM_VOLUMEFLAG_NOEXIST);
|
||||||
|
}
|
||||||
|
|
||||||
if (volp->flags & CM_VOLUMEFLAG_RO_MIXED) {
|
if (volp->flags & CM_VOLUMEFLAG_RO_MIXED) {
|
||||||
if (volp->lastUpdateTime + 300 <= now) {
|
if (volp->lastUpdateTime + 300 <= now) {
|
||||||
_InterlockedOr(&volp->flags, CM_VOLUMEFLAG_RESET);
|
_InterlockedOr(&volp->flags, CM_VOLUMEFLAG_RESET);
|
||||||
|
Loading…
Reference in New Issue
Block a user