From: Sage Weil Date: Fri, 23 Sep 2011 03:56:32 +0000 (-0700) Subject: Revert "crush: refuse to add item >= max_devices" X-Git-Tag: v0.36~21^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e6eeaacc57ac036db2caa8bfd1227d103fea6e3f;p=ceph.git Revert "crush: refuse to add item >= max_devices" This reverts commit 58f98e7afc364d28a385adc7ef0fee2291d70c17. max_devices only affects the size of the parent arrays, which aren't allocated until crush_finalize(). No problems here. --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 413f3926da8e..796807ac453b 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -64,10 +64,7 @@ int CrushWrapper::insert_item(int item, int weight, string name, map& loc) // typename -> bucketname { cout << "insert_item item " << item << " weight " << weight - << " name " << name << " loc " << loc << std::endl; - - if (item >= get_max_devices()) - return -ERANGE; + << " name " << name << " loc " << loc << std::endl; if (name_exists(name.c_str())) { cerr << "error: device name '" << name << "' already exists as id "