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: v16.1.0~2616^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=de79da6a065315eb92b203308598d4c452adcc75;p=ceph.git os/bluestore: modify return type for BlueFS::_get_slow_device_id() Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 7e9e96738574..0b1b998d9732 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -3038,9 +3038,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 8a8190344156..f6605d5a464e 100644 --- a/src/os/bluestore/BlueFS.h +++ b/src/os/bluestore/BlueFS.h @@ -341,7 +341,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,