src/test/ObjectMap: test clear_keys_header() call

Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1074 from ceph/wip-7135

Fixes: #7135

Reviewed-by: Sage Weil <sage@inktank.com>
osd: introduce TMAP->OMAP conversion operation

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: use OMAP to store dirfrags

MDS can fetch dirfrags from both TMAP and OMAP. When committing a
dirfrags that is stored in TMAP, MDS first uses OSD_OP_TMAP2OMAP
to convert corresponding TMAP to OMAP, then updates the resulting
OMAP.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
osd/OSDMap: get_up_osd_features()

Signed-off-by: Sage Weil <sage@inktank.com>
mds: require CEPH_FEATURE_OSD_TMAP2OMAP

Require that all OSDs support TMAP2OMAP before starting the MDS.  This
avoids doing some work and then crashing with EOPNOTSUPP, and gives us
a more informative message in the logs.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #998 from ceph/wip-omapdirfrag2

use OMAP to store dirfrags
osd: ostream is enough for build_simple*

There is no need to specialize the argument into stringstream. It is
replaced by a ostream which is convenient to display errors directly to
cerr if appropriate.

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: factorize build_simple_crush_map* rulesets creation

Group the rulesets created by build_simple_crush_map* into a helper:
build_simple_crush_rulesets()

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: parse CEPH_ARGS in crushtool

The arguments are not given to global_init because the -c option would
conflict. Reading arguments from CEPH_ARGS the way other ceph tools do
is the only way to control verbosity ( via --debug_crush 0 for instance ).

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: display args on crushtool failure

When the number of args provided to --build is not a multiple of 3,
display the arguments which do not comply.

For instance the --debug_crush 0 option is not consumed by global_init
in crushtool because, unlike most ceph tools, the arguments are not
passed to global_init. As a result --debug_crush 0 become part of the
arguments and triggers the failure.

   crushtool --debug_crush 0 --build --num_osds 320 node straw 4
   remaining args: [--debug_crush,0,node,straw,4]
   layers must be specified with 3-tuples of (name, buckettype, size)

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: print --build debug information when verbose 2

instead of verbose 0

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: crushtool --build uses OSDMap helpers for rulesets

Instead of creating a ruleset from scratch, use the
OSDMap::build_simple_crush_rulesets helper. It is more likely to match
the user expecations.

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: crushtool --build informative messages

* dump the crush tree created by --build at debug level 1.

* display a warning at debug level 1 if there is more than one root. In
  most cases it is not what the user wants and it may be confusing
  because the ruleset will only apply to the first of root and have less
  devices under it as expected.

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: crushtool emacs compile helper

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: crushtool copyright notice update

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: tests for crushtool --build

Signed-off-by: Loic Dachary <loic@dachary.org>
doc: crushtool man page nroff format

also includes a modification from a prior patch series that was not
formatted to nroff.

Signed-off-by: Loic Dachary <loic@dachary.org>
doc: update the crushtool manual page

* add information about CEPH_ARGS
* rework the --build documentation and example
* add an Author section
* replace vi with emacs for no good reason
* cleanup whitespace

Signed-off-by: Loic Dachary <loic@dachary.org>
doc: copyright s/2013/2014/

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