erasure-code: locally repairable code plugin

Recursively apply erasure code techniques so that recovering from the
loss of some chunks only require a subset of the available chunks, most
of the time.

The implementation is documented in
doc/rados/operations/erasure-code-lrc.rst

http://tracker.ceph.com/issues/7238 Fixes: #7238

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: high level LRC configuration

Add a configuration mode to the LRC plugin, suitable for most use cases
and simpler to explain and understand. It uses k,m parameters similar to
the jerasure and isa plugins and adds l for locality. For instance:

   k=4 m=2 l=3
   ruleset_locality=rack
   ruleset_failure_domain=host

Will translate into

   local_group_count = (k+m)/l

   ruleset-steps = "["
    " [\"choose\", \"rack\", " + local_group_count + "], "
    " [\"chooseleaf\", \"host\", " + (l + 1) + "], "
    "]";

   layers = "[ "
      "  [ \"DDc_DDc_\", \"\" ],"
      "  [ \"DDDc____\", \"\" ],"
      "  [ \"____DDDc\", \"\" ],"
      "]";

It is less flexible because k+m must be a multiple of l and other
similar relationships and also because it cannot express recursive
configurations with locality in the datacenter and locality in a rack
within the datacenter.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: test LRC pool, profile and crush ruleset

Using the command line to create an LRC pool validates that the plugin
can be loaded and the ruleset created immediately after the crush table
is populated with the default rulesets.

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