mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
crush: refuse to add item >= max_devices
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
dc2be1d87e
commit
58f98e7afc
@ -64,7 +64,10 @@ 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;
|
||||
<< " name " << name << " loc " << loc << std::endl;
|
||||
|
||||
if (item >= get_max_devices())
|
||||
return -ERANGE;
|
||||
|
||||
if (name_exists(name.c_str())) {
|
||||
cerr << "error: device name '" << name << "' already exists as id "
|
||||
|
Loading…
Reference in New Issue
Block a user