From: Igor Fedotov Date: Tue, 17 Mar 2020 18:22:56 +0000 (+0300) Subject: os/bluestore: modify return type for BlueFS::_get_slow_device_id() X-Git-Tag: v14.2.10~100^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=74da0515f8f395ad0859bf2688b0086e1043b336;p=ceph.git os/bluestore: modify return type for BlueFS::_get_slow_device_id() Signed-off-by: Igor Fedotov (cherry picked from commit de79da6a065315eb92b203308598d4c452adcc75) --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 512a47b52a36..f66dc5b58547 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -2663,9 +2663,9 @@ int BlueFS::_expand_slow_device(uint64_t need, PExtentVector& extents) { int r = -ENOSPC; if (slow_dev_expander) { - int id = _get_slow_device_id(); + auto id = _get_slow_device_id(); auto min_alloc_size = alloc_size[id]; - ceph_assert(id <= (int)alloc.size() && alloc[id]); + ceph_assert(id <= alloc.size() && alloc[id]); auto min_need = round_up_to(need, min_alloc_size); need = std::max(need, slow_dev_expander->get_recommended_expansion_delta( diff --git a/src/os/bluestore/BlueFS.h b/src/os/bluestore/BlueFS.h index 439095f46793..cc97db73aec1 100644 --- a/src/os/bluestore/BlueFS.h +++ b/src/os/bluestore/BlueFS.h @@ -351,7 +351,9 @@ private: FileRef _get_file(uint64_t ino); void _drop_link(FileRef f); - int _get_slow_device_id() { return bdev[BDEV_SLOW] ? BDEV_SLOW : BDEV_DB; } + unsigned _get_slow_device_id() { + return bdev[BDEV_SLOW] ? BDEV_SLOW : BDEV_DB; + } const char* get_device_name(unsigned id); int _expand_slow_device(uint64_t min_size, PExtentVector& extents); int _allocate(uint8_t bdev, uint64_t len,