Skip to content

Commit

Permalink
crushtool: set type 0 name "device" for --build option
Browse files Browse the repository at this point in the history
The crushmap built by crushtool cannot be used directly as the name of type 0 is not specified.
We may decompile the crushmap(it will automatically add type 0) and then recompile it to make it usable, but that's extra effort.

Signed-off-by: Sangdi Xu <xu.sangdi@h3c.com>
  • Loading branch information
Sangdi Xu committed Dec 7, 2015
1 parent 47c7893 commit ee1038c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/crushtool.cc
Expand Up @@ -617,6 +617,7 @@ int main(int argc, const char **argv)
crush.set_item_name(i, "osd." + stringify(i));
}

crush.set_type_name(0, "device");
int type = 1;
for (vector<layer_t>::iterator p = layers.begin(); p != layers.end(); ++p, type++) {
layer_t &l = *p;
Expand Down

0 comments on commit ee1038c

Please sign in to comment.