Project

General

Profile

Bug #13206

OSD::do_recovery() local variable "started" shall be explicitly initialized to zero

Added by xie xingguo about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
09/23/2015
Due date:
% Done:

0%

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

Description

void OSD::do_recovery(PG *pg, ThreadPool::TPHandle &handle)

int started;
bool more = pg->start_recovery_ops(max, &rctx, handle, &started);

See above, the local variable 'started' is not explicitly initialized to zero before it is passed into pg->start_recovery_ops(),
thus the initial value of "started" is completed determined by the compiler and the pg->start_recovery_ops() may don't work as it
is supposed to be.

Associated revisions

Revision 469d35f2 (diff)
Added by Sage Weil about 3 years ago

osd: init started to 0

Fixes: #13206
Signed-off-by: Sage Weil <>

History

#1 Updated by Sage Weil about 3 years ago

  • Status changed from New to Need Review

#2 Updated by Sage Weil about 3 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF