]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "crush: refuse to add item >= max_devices"
authorSage Weil <sage.weil@dreamhost.com>
Fri, 23 Sep 2011 03:56:32 +0000 (20:56 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 23 Sep 2011 04:02:36 +0000 (21:02 -0700)
This reverts commit 58f98e7afc364d28a385adc7ef0fee2291d70c17.

max_devices only affects the size of the parent arrays, which aren't allocated
until crush_finalize().  No problems here.

src/crush/CrushWrapper.cc

index 413f3926da8e7563425fd04d16cffbc29d457ce5..796807ac453be1fb86999c58c10bca98f3b7ca3d 100644 (file)
@@ -64,10 +64,7 @@ int CrushWrapper::insert_item(int item, int weight, string name,
                                map<string,string>& 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 "