]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: _bucket_is_in_use does not use cct
authorLoic Dachary <ldachary@redhat.com>
Sat, 18 Feb 2017 20:47:25 +0000 (21:47 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 1 Mar 2017 16:24:08 +0000 (17:24 +0100)
Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h

index 196a44ccd7eca491ffc39a41d49d8f9d0931389a..0cab66d28f4263f0937ee3a8a3e7d679ec184901 100644 (file)
@@ -218,7 +218,7 @@ bool CrushWrapper::_maybe_remove_last_instance(CephContext *cct, int item, bool
   if (_search_item_exists(item)) {
     return false;
   }
-  if (item < 0 && _bucket_is_in_use(cct, item)) {
+  if (item < 0 && _bucket_is_in_use(item)) {
     return false;
   }
 
@@ -253,7 +253,7 @@ int CrushWrapper::remove_item(CephContext *cct, int item, bool unlink_only)
                    << " items, not empty" << dendl;
       return -ENOTEMPTY;
     }
-    if (_bucket_is_in_use(cct, item)) {
+    if (_bucket_is_in_use(item)) {
       return -EBUSY;
     }
   }
@@ -295,7 +295,7 @@ bool CrushWrapper::_search_item_exists(int item) const
   return false;
 }
 
-bool CrushWrapper::_bucket_is_in_use(CephContext *cct, int item)
+bool CrushWrapper::_bucket_is_in_use(int item)
 {
   for (unsigned i = 0; i < crush->max_rules; ++i) {
     crush_rule *r = crush->rules[i];
@@ -347,7 +347,7 @@ int CrushWrapper::remove_item_under(CephContext *cct, int item, int ancestor, bo
   ldout(cct, 5) << "remove_item_under " << item << " under " << ancestor
                << (unlink_only ? " unlink_only":"") << dendl;
 
-  if (!unlink_only && _bucket_is_in_use(cct, item)) {
+  if (!unlink_only && _bucket_is_in_use(item)) {
     return -EBUSY;
   }
 
index f31123f0b5a36b2acc47e1758eca6cf2428bc1ea..f424b32f043e7eb99219b33139f0b2a4bce21234 100644 (file)
@@ -683,7 +683,7 @@ public:
 private:
   bool _maybe_remove_last_instance(CephContext *cct, int id, bool unlink_only);
   int _remove_item_under(CephContext *cct, int id, int ancestor, bool unlink_only);
-  bool _bucket_is_in_use(CephContext *cct, int id);
+  bool _bucket_is_in_use(int id);
 public:
   int remove_item_under(CephContext *cct, int id, int ancestor, bool unlink_only);