]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: check cluster features before rule create-erasure 1180/head
authorLoic Dachary <loic@dachary.org>
Tue, 4 Feb 2014 00:31:52 +0000 (01:31 +0100)
committerLoic Dachary <loic@dachary.org>
Tue, 4 Feb 2014 10:48:26 +0000 (11:48 +0100)
commitad8c6660f4b2cd14a4265c4f01c9216c2984edcb
tree198f959c98f2f2d003cc9113068d3057f7fe226c
parentc40e4d4f86c6b33e79529911566238f9c65b599b
mon: check cluster features before rule create-erasure

Encapsulate the logic used when creating an erasure coded pool into the
check_cluster_features helper.

check_cluster_features(CEPH_FEATURE_CRUSH_V2) is required for crush rule
create-erasure because it is expected that the erasure code plugin will
use indep instead of firstn and expect the V2 behavior and not the
legacy behavior.

The CEPH_FEATURE_CRUSH_V2 is added to CEPH_FEATURE_OSD_ERASURE_CODES
when an erasure coded pool is created. It is necessary because pool
won't function properly if given an indep ruleset that does not
implement the V2 behavior.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h