erasure-code: refactor jerasure Liberation parameters checks

Create a virtual function to check for each parameter for Liberation
and its derivations Liber8tion and BlaumRoth. The code is moved around
but is unmodified.

A function reseting the parameters to sane defaults when an error
occurs is introduced. It is slightly different from the code that was
duplicated in Liberation and BlaumRoth. In both cases it now resets w.
It is a noop for Liber8tion because the user cannot modify this
parameter which is always set to the default.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: fix BlaumRoth sanity check on w

For the BlaumRoth technique, w+1 must be a prime. This sanity check is
present in the sample code from the jerasure library but was not
implemented in the jerasure plugin.

The default value for w is also changed to match this constraint. The
unit tests is changed to always use the default w instead of forcing it
to w.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: fix erasure_code_benchmark goop (decode)

Using a stringstream that is only displayed on error when calling the
erasure code factory, instead of cerr. The user expects the output to be
clean when there is no error. That was done for the encode function but
not the decode function.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
documentation: erasure code profile update

The plugins are made a sub-section of the erasure code profile
section. The k and m parameters are removed from erasure code profile
documentation. They were added for simplicity in the first version
because there was only one plugin. But they should really be in the
plugin documentation.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
documentation: isa plugin is sub section of erasure code profile

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
documentation: jerasure plugin is sub section of erasure code profile

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
init-radosgw.sysv: Support systemd for starting the gateway

When using RHEL7 the radosgw daemon needs to start under systemd.

Check for systemd running on PID 1. If it is then start
the daemon using: systemd-run -r <cmd>. pidof returns null
as it is executed too quickly, adding one second of sleep and
script reports startup correctly.

Signed-off-by: JuanJose 'JJ' Galvez <jgalvez@redhat.com>
rbd: ObjectCacher reads can hang when reading sparse files

The pending read list was not properly flushed when empty objects
were read from a space file.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
doc: osd_backfill_scan_(min|max) are object counts

osd_backfill_scan_min and osd_backfill_scan_max set the number of
items grabbed during a single backfill scan, not an interval in
seconds. Correct the doc.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Merge pull request #2488 from cernceph/docfix

doc: osd_backfill_scan_(min|max) are object counts

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2442 from dachary/wip-6754-jerasure-parameters

erasure-code: fix BlaumRoth sanity check on w

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
bugfix: wrong socket address in log msg of Pipe.cc

paddr was not yet set up for the socket address

Signed-off-by: Yongyue Sun abioy.sun@gmail.com
Merge pull request #2485 from Abioy/master

bugfix: wrong socket address in log msg of Pipe.cc

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2472 from dachary/wip-9429-bench

erasure-code: fix erasure_code_benchmark goop (decode)

Reviewed-by: Janne Grunau <j@jannau.net>
Merge pull request #2486 from jgalvez/master

init-radosgw.sysv: Support systemd for starting the gateway

Reviewed-by: Sage Weil <sage@redhat.com>
erasure-code: preload fails if < 0

And not if < -1.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2495 from dachary/wip-erasure-code-preload

erasure-code: preload fails if < 0

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2493 from ceph/wip-rbd-objectcacher-hang

rbd: ObjectCacher reads can hang when reading sparse files

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #2482 from dachary/wip-erasure-code-documentation

erasure code documentation

Reviewed-by: Sage Weil <sage@redhat.com>
mailmap: correcting Zhiqiang Wang's mailmap and org affiliation

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>