Project

General

Profile

Bug #55409

client: incorrect operator precedence in Client.cc

Added by Rishabh Dave almost 2 years ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% 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

Related to CephFS - Bug #55129: client: get stuck forever when the forward seq exceeds 256 Resolved

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)

#4 Updated by Xiubo Li 10 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF