From: Sage Weil Date: Mon, 28 Nov 2016 18:44:05 +0000 (-0500) Subject: os/bluestore/BlockDevice: init rotational X-Git-Tag: v11.1.0~120^2~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c844efe0e6222b9f375c5f89e30e6e612e3bd7f4;p=ceph-ci.git os/bluestore/BlockDevice: init rotational CID 1396126 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member rotational is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlockDevice.h b/src/os/bluestore/BlockDevice.h index 305d86f1d79..ba5b7facd20 100644 --- a/src/os/bluestore/BlockDevice.h +++ b/src/os/bluestore/BlockDevice.h @@ -73,7 +73,7 @@ class BlockDevice { std::atomic_int ioc_reap_count = {0}; protected: - bool rotational; + bool rotational = true; public: BlockDevice() = default; diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index b49032b2405..7aa1b452785 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -46,7 +46,6 @@ KernelDevice::KernelDevice(aio_callback_t cb, void *cbpriv) { zeros = buffer::create_page_aligned(1048576); zeros.zero(); - rotational = true; } int KernelDevice::_lock()