doc/rados/operations/crush: fix rst

Signed-off-by: Sage Weil <sage@inktank.com>
doc/rados/operations/crush: fix more

Signed-off-by: Sage Weil <sage@inktank.com>
ObjBencher: add rand_read_bench functions to support rand test in rados-bench

Signed-off-by: Tengwei Cai <tengweicai@gmail.com>
Call --mbrtogpt on journal run of sgdisk should the drive require a GPT table.

Signed-off-by: Jonathan Davies <jonathan.davies@canonical.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
Merge pull request #782 from danchai/master

ObjBencher: add rand_read_bench to support rand test in rados-bench
Merge pull request #892 from jpds/ceph-disk-journal-mbrtogpt

Call --mbrtogpt on journal run of sgdisk should the drive require a GPT ...

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
crush: insert_item returns on error if bucket name is invalid

A bucket name may be created as a side effect of insert_item. All names
in the loc argument are checked for validity at the beginning of the
method and an error is returned immediately if one is found. This allows
to not check for errors when setting the name of an item later on.

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: remove redundant test in insert_item

A year after the last modification of test to check if an item was added
twice to the same bucket, the subtree_contains test was added a few
lines above it, making it redundant.

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: CrushWrapper unit tests

Covers all cases for the following methods. All but insert_item are trivial.

* insert_item
* set_item_name
* name_exists
* item_exists
* get_item_id
* get_item_name
* get_num_type_names
* get_type_id
* get_type_name
* is_valid_crush_name

Signed-off-by: Loic Dachary <loic@dachary.org>