Bug #55409
client: incorrect operator precedence in Client.cc
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Here's the code I am referring to in following explanation - https://github.com/ceph/ceph/commit/ad61e1dd1a56cd27be17886e8338133196e75a2a#diff-7a3052fe46aebfed0382c9d0bb9880ea1328add824e0b10c5d551ddfee282cd1R2554-R2555.
The expression 1 << (max_fwd * CHAR_BIT) - 1
is same as 1 << ((max_fwd * CHAR_BIT) - 1)
and not same as (1 << (max_fwd * CHAR_BIT)) - 1
. And the desired value of this expression is 255, so the first two are incorrect and last one is correct. Although this bug was discovered after creation of [PR #45983](https://github.com/ceph/ceph/pull/45983), the PR fixes the issue.
Related issues
History
#1 Updated by Xiubo Li almost 2 years ago
- Related to Bug #55129: client: get stuck forever when the forward seq exceeds 256 added
#2 Updated by Xiubo Li almost 2 years ago
- Related to Bug #55284: kclient: filesystem sync will stuck for around 5 seconds sometimes added
#3 Updated by Xiubo Li almost 2 years ago
- Related to deleted (Bug #55284: kclient: filesystem sync will stuck for around 5 seconds sometimes)