Project

General

Profile

Bug #18718

Coverty CID 1399582: Integer handling issues (NO_EFFECT)

Added by David Zafman 4 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
01/27/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

Description

src/ceph/src/osd/PG.cc: 2536 in PG::_update_calc_stats()()
2530 osd_missing = peer_missing[p].num_missing();
2531 object_copies += peer_info[p].stats.stats.sum.num_objects;
2532 }
2533 missing += osd_missing;
2534 // Count non-missing objects not in up as misplaced
2535 if (!in_up)

CID 1399582: Integer handling issues (NO_EFFECT)
This less-than-zero comparison of an unsigned value is never true. "0UL > num_objects - osd_missing".

2536 misplaced += MAX;
2537 } else {
2538 assert(in_up && !in_acting);
2539
2540 // If this peer has more objects then it should, ignore them
2541 backfilled += MIN;

History

#1 Updated by David Zafman 4 months ago

  • Status changed from New to Need Review

#2 Updated by David Zafman 4 months ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF