]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: modify return type for BlueFS::_get_slow_device_id()
authorIgor Fedotov <ifedotov@suse.com>
Tue, 17 Mar 2020 18:22:56 +0000 (21:22 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 25 Mar 2020 20:54:28 +0000 (23:54 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h

index 7e9e967385742b1d1e2c0a5383a37ff673095292..0b1b998d9732591a1653d1f8dca280656a6eff83 100644 (file)
@@ -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(
index 8a819034415615410137258c573ea1ea1c9b8774..f6605d5a464eaf8ad440002ee2e396638732b725 100644 (file)
@@ -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,