mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 08:20:16 +00:00
Windows: fsLockCount not accurate
Prior to 1.6.2 the file server does not report an accurate value for the lock state. In addition, callbacks are not broken when locks are freed due to lease expiration. Change-Id: I5b79d1d59c2ace9834cf23dfbef33e343ce6dda0 Reviewed-on: http://gerrit.openafs.org/6741 Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
4603057d99
commit
08d800b896
@ -4527,13 +4527,19 @@ long cm_IntSetLock(cm_scache_t * scp, cm_user_t * userp, int lockType,
|
||||
|
||||
osi_Log2(afsd_logp, "CALL SetLock scp 0x%p for lock %d", scp, lockType);
|
||||
|
||||
if ((lockType != LOCKING_ANDX_SHARED_LOCK && scp->fsLockCount != 0) ||
|
||||
(lockType == LOCKING_ANDX_SHARED_LOCK && scp->fsLockCount < 0))
|
||||
{
|
||||
code = CM_ERROR_LOCK_NOT_GRANTED;
|
||||
#if 0
|
||||
/*
|
||||
* The file server prior to 1.6.2 does not report an accurate value
|
||||
* and callbacks are not issued if the lock is dropped due to expiration.
|
||||
*/
|
||||
if ((lockType != LOCKING_ANDX_SHARED_LOCK && scp->fsLockCount != 0) ||
|
||||
(lockType == LOCKING_ANDX_SHARED_LOCK && scp->fsLockCount < 0))
|
||||
{
|
||||
code = CM_ERROR_LOCK_NOT_GRANTED;
|
||||
osi_Log2(afsd_logp, "CALL SetLock FAILURE, fsLockCount %d code 0x%x", scp->fsLockCount, code);
|
||||
return code;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(&volSync, 0, sizeof(volSync));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user