in function "OSDService::update_osd_stat", local variable "stbuf"" isn't initialized and it's still used to
update the utilization of OSD.
http://tracker.ceph.com/issues/14026
Fixes: #14026
Signed-off-by: Chuanhong Wang <wang.chuanhong@zte.com.cn>
// fill in osd stats too
struct statfs stbuf;
- osd->store->statfs(&stbuf);
+ int r = osd->store->statfs(&stbuf);
+ if (r < 0) {
+ derr << "statfs() failed: " << cpp_strerror(r) << dendl;
+ return;
+ }
uint64_t bytes = stbuf.f_blocks * stbuf.f_bsize;
uint64_t used = (stbuf.f_blocks - stbuf.f_bfree) * stbuf.f_bsize;