From: Simon Wilkinson Date: Sat, 31 Mar 2012 18:23:18 +0000 (-0400) Subject: Unix CM: We're disconnected if RW disconnected too X-Git-Tag: upstream/1.8.0_pre1^2~2595 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5815c5ffb03e8afa0d36eef7da865e564d568296;p=packages%2Fo%2Fopenafs.git Unix CM: We're disconnected if RW disconnected too At the moment, the Unix CM doesn't support entering a purely RO disconnected mode (the historical AFS_IS_DISCONNECTED mode). If we go disconnected, or reconnect we always toggle RW discon at the same time as we toggle RO. Arguably, the RO disconnected mode should just be removed, as it is now superceded. For the moment, make it clear to the compiler that RW disconnected implies RO disconnected, so that static analysis can make more sensible decisions about code paths. Change-Id: I7e2d04d2cf67740c6b6285950874c6a4eaeb0537 Reviewed-on: http://gerrit.openafs.org/7097 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/discon.h b/src/afs/discon.h index 7f4781a67..8c6f7ca7e 100644 --- a/src/afs/discon.h +++ b/src/afs/discon.h @@ -39,7 +39,7 @@ extern void afs_UpdateStatus(struct vcache *avc, afs_uint32 start); extern void afs_DisconDiscardAll(afs_ucred_t *); -#define AFS_IS_DISCONNECTED (afs_is_disconnected) +#define AFS_IS_DISCONNECTED (afs_is_disconnected || afs_is_discon_rw) #define AFS_IS_DISCON_RW (afs_is_discon_rw) #define AFS_IN_SYNC (afs_in_sync) #define AFS_DISCON_LOCK() ObtainReadLock(&afs_discon_lock)