]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoErasureCode: proofread abstract API documentation
Loic Dachary [Mon, 16 Sep 2013 10:12:52 +0000 (12:12 +0200)]
ErasureCode: proofread abstract API documentation

* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
  possible the output arguments will just point to the input
  argument. This must be documented as any side effect on the input
  argument may modify the output argument

* Fix typos

* Fix may/could/must/should to better reflect what's mandatory and
  what's not.

* Reword the explanation of minimum_to_decode_with_cost to not suggest
  an implementation. This will need to be revisited anyway, when the
  semantic of the cost is defined.

* Explain chunk size constraints

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #601 from pipul/feature/develop_130917
Josh Durgin [Tue, 17 Sep 2013 04:06:32 +0000 (21:06 -0700)]
Merge pull request #601 from pipul/feature/develop_130917

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agofix some comments 601/head
fangdong [Tue, 17 Sep 2013 02:34:10 +0000 (10:34 +0800)]
fix some comments

Signed-off-by: fangdong <yp.fangdong@gmail.com>
11 years agodoc: Updated usage.
John Wilkins [Tue, 17 Sep 2013 01:57:46 +0000 (18:57 -0700)]
doc: Updated usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Removed --fs-type option and text.
John Wilkins [Tue, 17 Sep 2013 01:40:07 +0000 (18:40 -0700)]
doc: Removed --fs-type option and text.

fixes: #6326

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Updated the usage scenario and made a few syntax edits.
John Wilkins [Tue, 17 Sep 2013 01:38:55 +0000 (18:38 -0700)]
doc: Updated the usage scenario and made a few syntax edits.

fixes: #6308

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #600 from dachary/fix-erasure-warning
Gregory Farnum [Mon, 16 Sep 2013 21:14:19 +0000 (14:14 -0700)]
Merge pull request #600 from dachary/fix-erasure-warning

ErasureCode: fix uninitialized variable warning
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoErasureCode: fix uninitialized variable warning 600/head
Loic Dachary [Mon, 16 Sep 2013 21:04:23 +0000 (23:04 +0200)]
ErasureCode: fix uninitialized variable warning

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #597 from ceph/remove-hadoop-shim
Gregory Farnum [Mon, 16 Sep 2013 20:57:47 +0000 (13:57 -0700)]
Merge pull request #597 from ceph/remove-hadoop-shim

This branch built fine on the gitbuilders and the list of removed files looks good to me.

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #538 from dachary/wip-5879
athanatos [Sat, 14 Sep 2013 01:09:43 +0000 (18:09 -0700)]
Merge pull request #538 from dachary/wip-5879

jerasure-1.2A plugin

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agohadoop: remove hadoop shim 597/head
Noah Watkins [Fri, 13 Sep 2013 20:21:58 +0000 (13:21 -0700)]
hadoop: remove hadoop shim

The in-tree Hadoop shim was a combination of libcephfs wrapper, and the
bits to support Hadoop. This has been replaced by src/java that
implements generic libcephfs wrappers, and externally, the hadoop shim
(see docs).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #594 from ceph/fix-no-tcmalloc-build
Sage Weil [Fri, 13 Sep 2013 15:57:16 +0000 (08:57 -0700)]
Merge pull request #594 from ceph/fix-no-tcmalloc-build

make: add tmalloc lib dep in tcmalloc guard

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomake: add tmalloc lib dep in tcmalloc guard 594/head
Noah Watkins [Fri, 13 Sep 2013 15:29:02 +0000 (08:29 -0700)]
make: add tmalloc lib dep in tcmalloc guard

Fixes --without-tcmalloc on boxes without libtcmalloc.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge branch 'wip-6226'
David Zafman [Thu, 12 Sep 2013 18:13:50 +0000 (11:13 -0700)]
Merge branch 'wip-6226'

11 years agoosd/ReplicatedPG.cc: Verify that recovery is truly complete
David Zafman [Wed, 11 Sep 2013 23:56:21 +0000 (16:56 -0700)]
osd/ReplicatedPG.cc: Verify that recovery is truly complete

Backportable change to insure that even if no new ops started or
are running that indeed recovery is complete.  Prevents some
error condition or unforseen code path from crashing an osd.

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active
David Zafman [Wed, 11 Sep 2013 23:55:06 +0000 (16:55 -0700)]
osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active

Caused by 944f3b73531af791c90f0f061280160003545c63

Fixes: #6291
Backport: dumpling

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #589 from ceph/wip-6279
Gregory Farnum [Thu, 12 Sep 2013 17:38:41 +0000 (10:38 -0700)]
Merge pull request #589 from ceph/wip-6279

mon/MDSMonitor: don't reset incarnation when creating newfs
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agomon/MDSMonitor: don't reset incarnation when creating newfs 589/head
Yan, Zheng [Thu, 12 Sep 2013 01:50:51 +0000 (09:50 +0800)]
mon/MDSMonitor: don't reset incarnation when creating newfs

Fixes: #6279
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #587 from kri5/master
Yehuda Sadeh [Wed, 11 Sep 2013 16:01:18 +0000 (09:01 -0700)]
Merge pull request #587 from kri5/master

rgw-admin: Adds --metadata-key option to help

Reviwed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw-admin: Adds --metadata-key option to help 587/head
Christophe Courtaut [Wed, 11 Sep 2013 15:49:04 +0000 (17:49 +0200)]
rgw-admin: Adds --metadata-key option to help
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoosd: bind objecter messenger to cluster address
Greg Farnum [Tue, 10 Sep 2013 23:14:41 +0000 (16:14 -0700)]
osd: bind objecter messenger to cluster address

We don't want it binding to whatever willy-nilly, and as an OSD even
its "client" traffic should go on the cluster address.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd: name the objecter's messenger "ms_objecter" instead of "hbclient"
Greg Farnum [Tue, 10 Sep 2013 22:00:18 +0000 (15:00 -0700)]
osd: name the objecter's messenger "ms_objecter" instead of "hbclient"

Bad copypasta on initial create?

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoObjecter: rename cancel_op -> cancel_linger_op
Greg Farnum [Tue, 10 Sep 2013 21:59:09 +0000 (14:59 -0700)]
Objecter: rename cancel_op -> cancel_linger_op

This makes it possible to converse about op_cancel and cancel_linger_op
without getting too confused.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #580 from ceph/wip-6033-redirects
Gregory Farnum [Tue, 10 Sep 2013 22:49:50 +0000 (15:49 -0700)]
Merge pull request #580 from ceph/wip-6033-redirects

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest: update cache test since OSDs support redirects 580/head
Greg Farnum [Wed, 4 Sep 2013 20:44:47 +0000 (13:44 -0700)]
test: update cache test since OSDs support redirects

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: implement basic caching policies in ReplicatedPG
Greg Farnum [Mon, 9 Sep 2013 18:19:37 +0000 (11:19 -0700)]
osd: implement basic caching policies in ReplicatedPG

Right now these are very basic and aren't as sophisticated as we
want them to end up, but we have a skeleton for where to put the
decision-making logic.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: follow redirect replies from the OSD
Greg Farnum [Tue, 3 Sep 2013 23:42:33 +0000 (16:42 -0700)]
Objecter: follow redirect replies from the OSD

If we get back a redirect reply, we clean up the Op's external references
and re-send using the target_oloc and target_oid. To facilitate this,
recalc_op_target() now only fills them in and overrides them with pool
cache semantics if they're empty.

Keep in mind that this is a pretty simple redirect formula -- the
Objecter will keep following redirects forever if that's what the OSDs
send back. The client is not providing any synchronization right now.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: write a helper function to clean up ops that need to be retried
Greg Farnum [Tue, 3 Sep 2013 23:31:50 +0000 (16:31 -0700)]
Objecter: write a helper function to clean up ops that need to be retried

We have a little block to clean them up if we get back EAGAIN, but it's
actually leaking map references; we will also use this for redirects
from the OSDs.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMOSDOpReply: add a redirect member
Greg Farnum [Tue, 3 Sep 2013 21:59:59 +0000 (14:59 -0700)]
MOSDOpReply: add a redirect member

When present, clients must send the request to the location specified
by the redirect (by using the combine_with_locator() function on
request_redirect_t).
A separate mechanism must be used to ensure that clients see and respect
the redirect, as we do not bump up the minimum required version to
decode.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: add an Op::target_oid, and use it when submitting Ops
Greg Farnum [Tue, 3 Sep 2013 21:42:14 +0000 (14:42 -0700)]
Objecter: add an Op::target_oid, and use it when submitting Ops

For now it's just a copy of base_oid, but soon we will allow it
to be overwritten for OSD-driven redirects.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: rename Op::oid -> Op::base_oid
Greg Farnum [Tue, 3 Sep 2013 21:41:18 +0000 (14:41 -0700)]
Objecter: rename Op::oid -> Op::base_oid

Analagous to the oloc->base_oloc rename we did in
e2fcad09d94d965867147627b73e99da9454436f, we may specify a different
target name for a redirect. Rename the existing oid to base_oid to
avoid any confusion.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: create a new request_redirect_t
Greg Farnum [Tue, 3 Sep 2013 21:34:46 +0000 (14:34 -0700)]
osd: create a new request_redirect_t

We'll use this so that the OSD can tell the Objecter to redirect a
request to a different object somewhere else.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #585 from ceph/wip-osd-pool-create-syntax
Sage Weil [Tue, 10 Sep 2013 22:04:42 +0000 (15:04 -0700)]
Merge pull request #585 from ceph/wip-osd-pool-create-syntax

fix ceph tool (syntax error in command specification prevents anything from working)

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: fix syntax error in osd pool create args 585/head
Josh Durgin [Tue, 10 Sep 2013 21:47:31 +0000 (14:47 -0700)]
mon: fix syntax error in osd pool create args

Just missing a space between pgp_num and properties specification.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #584 from dachary/master
Sage Weil [Tue, 10 Sep 2013 16:17:25 +0000 (09:17 -0700)]
Merge pull request #584 from dachary/master

autoconf: use $(UNITTEST_CXXFLAGS) in tests

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #578 from dachary/wip-6113
Sage Weil [Tue, 10 Sep 2013 16:15:42 +0000 (09:15 -0700)]
Merge pull request #578 from dachary/wip-6113

mon: add key[=value] ... to osd pool create

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoautoconf: use $(UNITTEST_CXXFLAGS) in tests 584/head
Loic Dachary [Tue, 10 Sep 2013 15:00:08 +0000 (17:00 +0200)]
autoconf: use $(UNITTEST_CXXFLAGS) in tests

As suggested by Roald van Loon
https://github.com/ceph/ceph/pull/538/files#r6260751

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: plugin 538/head
Loic Dachary [Wed, 28 Aug 2013 16:48:40 +0000 (18:48 +0200)]
ErasureCodeJerasure: plugin

Create the class matching the string found in the
erasure-code-technique parameter, using the same strings are the
original {encoder,decoder}.c examples from Jerasure-1.2A. Registers
the plugin in ErasureCodePluginRegistry.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique Liber8tion
Loic Dachary [Thu, 29 Aug 2013 13:12:32 +0000 (15:12 +0200)]
ErasureCodeJerasure: define technique Liber8tion

technique == "liber8tion"

       ErasureCodeInterface (abstract)
       |
       -> ErasureCodeJerasure (abstract)
          |
          -> ErasureCodeJerasureLiberation
             |
             -> ErasureCodeJerasureLiber8tion
                | == liber8tion

Derived from Liberation it overloads the parse and prepare methods.

parse : default to K=2 and packetsize = 8.
If any of the following constraints is not satisfied, revert to the
default:

  * K <= 8
  * packetsize must not be zero

prepare uses liber8tion_coding_bitmatrix

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique BlaumRoth
Loic Dachary [Thu, 29 Aug 2013 13:07:30 +0000 (15:07 +0200)]
ErasureCodeJerasure: define technique BlaumRoth

technique == "blaum_roth"

       ErasureCodeInterface (abstract)
       |
       -> ErasureCodeJerasure (abstract)
          |
          -> ErasureCodeJerasureLiberation
             |
             -> ErasureCodeJerasureBlaumRoth
                | == blaum_roth

Derived from Liberation it only overloads the prepare method to use
blaum_roth_coding_bitmatrix.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique Liberation
Loic Dachary [Thu, 29 Aug 2013 13:00:20 +0000 (15:00 +0200)]
ErasureCodeJerasure: define technique Liberation

technique == "liberation"

parse : default to K=7, M=2 and W=7 and packetsize = 8.
If any of the following constraints is not satisfied, revert to the
default:

 * K > W
 * W > 2
 * W is a prime number
 * packetsize must not be zero
 * packetsize must be a multiple of sizeof(int)

pad_in_length : pad to a multiple of k*w*packetsize*sizeof(int)

prepare, jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define techniques CauchyOrig and CauchyGood
Loic Dachary [Mon, 9 Sep 2013 23:40:02 +0000 (01:40 +0200)]
ErasureCodeJerasure: define techniques CauchyOrig and CauchyGood

The technique Cauchy has two variants:

       ErasureCodeInterface (abstract)
       |
       -> ErasureCodeJerasure (abstract)
          |
          -> ErasureCodeJerasureCauchy (abstract)
          |  |
          |  -> ErasureCodeJerasureCauchyOrig
          |     | == cauchy_orig
          |  -> ErasureCodeJerasureCauchyGood
          |     | == cauchy_good

ErasureCodeJerasureCauchy defines the prepare_schedule method to be used
by prepare method, which is the only one overloaded by
ErasureCodeJerasureCauchyOrig (calling cauchy_original_coding_matrix)
and ErasureCodeJerasureCauchyGood ( calling
cauchy_good_general_coding_matrix).

The schedule is retained for encoding and the bitmatrix for decoding.

parse : default to K=7, M=3, W=8 and packetsize = 8.

pad_in_length : pad to a multiple of k*w*packetsize*sizeof(int)

jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique ReedSolomonRAID6
Loic Dachary [Thu, 29 Aug 2013 12:42:39 +0000 (14:42 +0200)]
ErasureCodeJerasure: define technique ReedSolomonRAID6

technique == reed_sol_r6_op

parse : default to K=7 and W=8 . If W is not 8, 16 or 32, it
reverts to 8.

pad_in_length : pad to a multiple of k*w*sizeof(int)

prepare, jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique ReedSolomonVandermonde
Loic Dachary [Thu, 29 Aug 2013 11:51:49 +0000 (13:51 +0200)]
ErasureCodeJerasure: define technique ReedSolomonVandermonde

technique == reed_sol_van

parse : default to K=7, M=3 and W=8 . If W is not 8, 16 or 32, it
reverts to 8.

pad_in_length : pad to a multiple of k*w*sizeof(int)

prepare, jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: unit test common to all techniques
Loic Dachary [Thu, 29 Aug 2013 11:31:10 +0000 (13:31 +0200)]
ErasureCodeJerasure: unit test common to all techniques

A typed unit test is defined and must run regardless of the technique.
When a new technique is derived from ErasureCodeJerasure, it is added
to the JerasureTypes typedef and the test will validate that:

  * it provides reasonable defaults for the technique specific
    parameters
  * it modifies the k, m and w to reasonable defaults depending
    on the imposed constraints ( for instance Liber8tion requires
    that w == 8 but the test sets it to 7 )
  * the encoding of K=2, M=2 produces 4 chunks, the first two
    of which contains the original buffer data showing the
    code is systematic
  * decoding when all 4 chunks are available indeed retrieves
    the original buffer content
  * decoding when the two data chunks are are missing indeed
    retrieves the original buffer content

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add key[=value] ... to osd pool create 578/head
Loic Dachary [Mon, 9 Sep 2013 11:23:42 +0000 (13:23 +0200)]
mon: add key[=value] ... to osd pool create

With the introduction of the erasure code pool, arguments to be
interpreted depending on the pool type must be introduced.
For instance the erasure code pool loads a plugin at run time will
use easure-code-k=10 to split each object in 10.

The arguments are described as

  name=properties,type=CephString,n=N,req=false,goodchars=[A-Za-z0-9-_.=]

If key=value it is stored in the new properties data member of pg_pool_t
as properties[key] = value, otherwise the value is the empty string.

The pg_pool_t version is bumped to 10 and the encode/decode methods
modified to take the properties into account. The
generate_test_instances method creates a two entries map, one of which
is the empty string to cover the case when no value is specified.

http://tracker.ceph.com/issues/6113 refs #6113

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocrushtool: do not dump core with non-unique bucket IDs
David Zafman [Mon, 9 Sep 2013 20:01:12 +0000 (13:01 -0700)]
crushtool: do not dump core with non-unique bucket IDs

Return -EEXIST on duplicate ID
BUG FIX: crush_add_bucket() mixes error returns and IDs
  Add optional argument to return generated ID

Fixes: #6246
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: v0.67.3
Sage Weil [Tue, 10 Sep 2013 04:47:57 +0000 (21:47 -0700)]
doc/release-notes: v0.67.3

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add empty() function to object_locator_t
Greg Farnum [Fri, 30 Aug 2013 01:33:07 +0000 (18:33 -0700)]
osd: add empty() function to object_locator_t

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMOSDOpReply: more const-correctness
Greg Farnum [Tue, 3 Sep 2013 21:52:05 +0000 (14:52 -0700)]
MOSDOpReply: more const-correctness

get_map_epoch() is a non-reference getter -- mark it as const!

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: do not meaninglessly fill in the reqid on make_writeable() cloning
Greg Farnum [Fri, 30 Aug 2013 23:33:31 +0000 (16:33 -0700)]
ReplicatedPG: do not meaninglessly fill in the reqid on make_writeable() cloning

This reqid is used to fill in a map that is used for giving clients
the correct version on replayed ops, unless the reqid is blank (in
which case it doesn't go into the map). Indirect clones are not ops
that the client wants to observe and the version is incorrect right now,
so don't fill it in.
Note that this should not have actually caused any buggy behavior, because
the map would have simply been overwritten by the real requested event
a short time later (while still protected by locks and things). But it's
very confusing.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoErasureCodeJerasure: base class for jerasure ErasureCodeInterface
Loic Dachary [Thu, 29 Aug 2013 10:58:53 +0000 (12:58 +0200)]
ErasureCodeJerasure: base class for jerasure ErasureCodeInterface

The ErasureCodeJerasure class is derived from ErasureCodeInterface and
is meant to be derived to implement each jerasure technique (
Reed-Solomon, Cauchy ... ).

The parameters K ( number of data chunks ), M ( number of coding chunks
) and W ( word size ) are data members common to all techniques. The
technique data member is expected to be set to a string describing the
technique for debugging purposes.

minimum_to_decode_with_cost ignores the cost and calls minimum_to_decode.

minimum_to_decode returns the first K chunks or an error if there are
not enough. Since all codes are systematic, when all chunks are
available returning the first K allows for concatenation and is the best
choice.

The encode method converts bufferlist into char* as expected by the
jerasure functions. The padding of the incoming buffer depends on the
technique and is computed by the pad_in_length method. Encoding is done
with the jerasure_encode method.

The decode method converts the char* returned by the jerasure functions
into bufferlists to be consumed by the caller. The decoding is done by
the jerasure_decode method.

The to_int convenience method is used to convert parameters. The
is_prime convenience method will be used by some techniques to validate
parameters.

Immediately after creating an ErasureCodeJerasure derived object, the
init method must be called. It will call the parse method to interpret
the parameters required by the technique and set the k, m and w data
members. The prepare method is expected to compute the matrix ( and
schedule if necessary ) and store it in a data member. The init method
will be called while holding the ErasureCodePluginRegistry mutex. The
encode and decode methods will not be protected by a mutex and may be
called by different threads for the benefit of different placement
groups. They will not have any side effect on the object.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: fix jerasure compilation
Loic Dachary [Fri, 23 Aug 2013 20:41:37 +0000 (22:41 +0200)]
ErasureCodeJerasure: fix jerasure compilation

Add the imported jerasure-1.2A to the Makefile.am and fix the
compilation warnings.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: import jerasure-1.2A
Loic Dachary [Fri, 23 Aug 2013 20:22:08 +0000 (22:22 +0200)]
ErasureCodeJerasure: import jerasure-1.2A

The files are copied verbatim from
http://web.eecs.utk.edu/~plank/plank/papers/Jerasure-1.2A.tar and a
section is added to the top level COPYING file to reflect the BSD
license.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #569 from ceph/wip-osd-stat
Dan Mick [Mon, 9 Sep 2013 23:42:06 +0000 (16:42 -0700)]
Merge pull request #569 from ceph/wip-osd-stat

osd: expose bytes used/avail via perf / asok

11 years agoosd: expose bytes used/avail via perf / asok 569/head
Sage Weil [Mon, 9 Sep 2013 23:36:22 +0000 (16:36 -0700)]
osd: expose bytes used/avail via perf / asok

This values are already sent to the monitor.  Expose them via the admin
socket too so collectd/diamond/whatever can pick them up.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #581 from dachary/master
Sage Weil [Mon, 9 Sep 2013 22:39:35 +0000 (15:39 -0700)]
Merge pull request #581 from dachary/master

autoconf: use $(LIBOSD) $(LIBCOMMON) instead of libosd.a libcommon.la

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoautoconf: use $(LIBOSD) $(LIBCOMMON) instead of libosd.a libcommon.la 581/head
Loic Dachary [Mon, 9 Sep 2013 22:30:57 +0000 (00:30 +0200)]
autoconf: use $(LIBOSD) $(LIBCOMMON) instead of libosd.a libcommon.la

hardcoded library names in unit test dependencies break compilation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agodoc: Syntax fix to suppress gitbuilder errors.
John Wilkins [Mon, 9 Sep 2013 22:30:19 +0000 (15:30 -0700)]
doc: Syntax fix to suppress gitbuilder errors.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Removed mkcephfs reference.
John Wilkins [Mon, 9 Sep 2013 22:29:56 +0000 (15:29 -0700)]
doc: Removed mkcephfs reference.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to suppress gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 22:27:57 +0000 (15:27 -0700)]
doc: Syntax fixes to suppress gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to suppress gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 22:27:36 +0000 (15:27 -0700)]
doc: Syntax fixes to suppress gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to suppress gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 22:27:12 +0000 (15:27 -0700)]
doc: Syntax fixes to suppress gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to suppress gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 22:26:47 +0000 (15:26 -0700)]
doc: Syntax fixes to suppress gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to suppress gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 22:23:24 +0000 (15:23 -0700)]
doc: Syntax fixes to suppress gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to suppress gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 22:22:59 +0000 (15:22 -0700)]
doc: Syntax fixes to suppress gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to remove gitbuilder errors.
John Wilkins [Mon, 9 Sep 2013 22:22:08 +0000 (15:22 -0700)]
doc: Syntax fixes to remove gitbuilder errors.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #518 from dachary/wip-5878
athanatos [Mon, 9 Sep 2013 21:54:39 +0000 (14:54 -0700)]
Merge pull request #518 from dachary/wip-5878

erasure plugin mechanism and abstract API

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoErasureCodePlugin: plugin registry tests and example 518/head
Loic Dachary [Wed, 28 Aug 2013 15:29:18 +0000 (17:29 +0200)]
ErasureCodePlugin: plugin registry tests and example

libec_example.la is a fully functional plugin based on
ErasureCodeExample to test the ErasureCodePlugin abstract
interface. It is dynamically loaded to test the
ErasureCodePluginRegistry implementation.

Although the plugin is built in the test directory, it will be
installed. noinst_LTLIBRARIES won't build the shared library, only the
static version which is not suitable for testing.

http://tracker.ceph.com/issues/5878 refs #5878

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodePlugin: plugin registry
Loic Dachary [Wed, 28 Aug 2013 13:57:54 +0000 (15:57 +0200)]
ErasureCodePlugin: plugin registry

A ErasureCodePluginRegistry singleton holds all erasure plugin objects
derived from ErasureCodePlugin and dlopen(2) handles for the lifetime
of the OSD and is cleaned up by the destructor.

The registry has a single entry point ( method factory ) and should
be used as follows:

  map<std::string,std::string> parameters;
  parameters["directory"] = "/usr/lib/ceph/erasure-code";
  ErasureCodeInterfaceRef erasure_code;
  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
  instance.factory("jerasure", parameters, &erasure_code));

If the plugin requested ( "jerasure" in the example above ) is not
found in the *plugins* data member, the load method is called and will:

  * dlopen(parameters["erasure-code-directory"] + "jerasure")
  * f = dlsym("__erasure_code_init")
  * f("jerasure")
  * check that it registered "jerasure"

The plugin is expected to do something like

  instance.add(plugin_name, new ErasureCodePluginJerasure());

to register itself.

The factory method is protected with a Mutex to avoid race
conditions when using the same plugin from two threads.

The erasure_codelib_LTLIBRARIES variable is added to the Makefile
and the plugins are expected to add themselves and be installed
in the $(libdir)/erasure-code

http://tracker.ceph.com/issues/5878 refs #5878

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodePlugin: plugin interface
Loic Dachary [Wed, 28 Aug 2013 13:46:34 +0000 (15:46 +0200)]
ErasureCodePlugin: plugin interface

When dynamically loaded, a plugin is expected to define

    int __erasure_code_init(char *plugin_name);

When called, it is responsible for registering an ErasureCodePlugin
derived object that provides a factory method from which the concrete
implementation of the ErasureCodeInterface object can be generated:

  virtual int factory(const map<std::string,std::string> &parameters,
                      ErasureCodeInterfaceRef *erasure_code) {
    *erasure_code = ErasureCodeInterfaceRef(new ErasureCodeExample(parameters));
    return 0;
  }

The plugin instance contains the library data member which is used to
store the handle of the shared library. It is opaque to the plugin.

http://tracker.ceph.com/issues/5878 refs #5878

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: example implementation : K=2 M=1
Loic Dachary [Mon, 19 Aug 2013 17:15:07 +0000 (19:15 +0200)]
ErasureCode: example implementation : K=2 M=1

An erasure code implementation designed for tests. Although it is fully
functional and could be used on actual data, it is mainly provided for
testing purposes. It splits data in two, computes an XOR parity and
can sustain the loss of one chunk.

The constructor will usleep(3) for parameters["usleep"] microseconds
so that the caller can create race conditions.

http://tracker.ceph.com/issues/5878 refs #5878

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoFix usage to include export and import --type options
David Zafman [Mon, 9 Sep 2013 21:08:03 +0000 (14:08 -0700)]
Fix usage to include export and import --type options

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoErasureCode: abstract interface
Loic Dachary [Mon, 19 Aug 2013 16:56:56 +0000 (18:56 +0200)]
ErasureCode: abstract interface

The erasure coded pool relies on this abstract interface to encode and
decode the chunks stored in the OSD. It has been designed to be
generic enough to accomodate the libraries and algorithms that are
most likely to be used. It does not claim to be universal.

http://tracker.ceph.com/issues/5878 refs #5878

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #579 from ceph/wip-doc-warn-fix
Sage Weil [Mon, 9 Sep 2013 18:34:08 +0000 (11:34 -0700)]
Merge pull request #579 from ceph/wip-doc-warn-fix

make sure we use a version of sphinx that we can handle

11 years agodoc: Syntax fixes to stop gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 18:19:59 +0000 (11:19 -0700)]
doc: Syntax fixes to stop gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to stop gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 18:19:21 +0000 (11:19 -0700)]
doc: Syntax fixes to stop gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Syntax fixes to stop gitbuilder warnings.
John Wilkins [Mon, 9 Sep 2013 18:19:04 +0000 (11:19 -0700)]
doc: Syntax fixes to stop gitbuilder warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agomake sure we use a version of sphinx that we can handle 579/head
Alfredo Deza [Mon, 9 Sep 2013 18:00:59 +0000 (14:00 -0400)]
make sure we use a version of sphinx that we can handle

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
11 years agoMerge pull request #577 from roaldvanloon/wip-automake
Sage Weil [Mon, 9 Sep 2013 16:02:59 +0000 (09:02 -0700)]
Merge pull request #577 from roaldvanloon/wip-automake

automake cleanup: implementing non-recursive make

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agorados: fix typo
Sage Weil [Mon, 9 Sep 2013 04:40:33 +0000 (21:40 -0700)]
rados: fix typo

cct is a member of the ObjBencher parent that we are trying to
initialize; need to pass in cct_ here.

Broken in 5dd0a83f917cb73a9985c94b9b6c2309c66d0ce3.

Fixes: #6256
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoautomake cleanup: implementing non-recursive make 577/head
Roald J. van Loon [Tue, 27 Aug 2013 09:08:37 +0000 (11:08 +0200)]
automake cleanup: implementing non-recursive make

- Enabling subdir objects
- Created a Makefile-env.am with basic automake init
- Created .am files per subdir, included from src/Makefile.am

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 7 Sep 2013 21:11:00 +0000 (14:11 -0700)]
Merge remote-tracking branch 'gh/next'

11 years agoMerge pull request #575 from roaldvanloon/wip-automake-prepare
Sage Weil [Sat, 7 Sep 2013 21:10:27 +0000 (14:10 -0700)]
Merge pull request #575 from roaldvanloon/wip-automake-prepare

Wip automake prepare

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #576 from ceph/wip-6078-2
Sage Weil [Sat, 7 Sep 2013 21:09:23 +0000 (14:09 -0700)]
Merge pull request #576 from ceph/wip-6078-2

rgw: fix get cors, delete cors

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoautomake cleanup: renaming buildtest 575/head
Roald J. van Loon [Sat, 7 Sep 2013 14:37:10 +0000 (16:37 +0200)]
automake cleanup: renaming buildtest

The previous name could cause confusion (it's not only used to test
build libcommon anymore).

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: moving rados tool to tools subdir
Roald J. van Loon [Sat, 7 Sep 2013 13:36:07 +0000 (15:36 +0200)]
automake cleanup: moving rados tool to tools subdir

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: moving misc tools to tools subdir
Roald J. van Loon [Sat, 7 Sep 2013 13:33:10 +0000 (15:33 +0200)]
automake cleanup: moving misc tools to tools subdir

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: moving tests to test subdir
Roald J. van Loon [Sat, 7 Sep 2013 13:27:33 +0000 (15:27 +0200)]
automake cleanup: moving tests to test subdir

This are tests and should be in the src/test subdir.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: moving code away from include to common
Roald J. van Loon [Sat, 7 Sep 2013 13:24:00 +0000 (15:24 +0200)]
automake cleanup: moving code away from include to common

Includes should only be includes. Moving C code to libcommon.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: moving hobject from os to common
Roald J. van Loon [Sat, 7 Sep 2013 13:16:27 +0000 (15:16 +0200)]
automake cleanup: moving hobject from os to common

This file is used by libcommon, so lets put it in src/common instead of
src/os.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: renamed inttypes.h
Roald J. van Loon [Sat, 7 Sep 2013 12:07:52 +0000 (14:07 +0200)]
automake cleanup: renamed inttypes.h

- In "includes", inttypes.h was cluttering the system's one. This caused
  random build errors on some systems/in some conditions. Renaming it.
- Add emergency defs of PRI*64 headers when int_types.h does not define
  them (which, unfortunately, can happen on some systems).

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: adding vta support to configure
Roald J. van Loon [Sat, 7 Sep 2013 11:14:05 +0000 (13:14 +0200)]
automake cleanup: adding vta support to configure

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMerge pull request #572 from roaldvanloon/wip-fix-buildtests
Sage Weil [Sat, 7 Sep 2013 20:31:29 +0000 (13:31 -0700)]
Merge pull request #572 from roaldvanloon/wip-fix-buildtests

fix: build tests need libcrc.la

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agofix: build tests need libcrc.la 572/head
Roald J. van Loon [Sat, 7 Sep 2013 17:25:17 +0000 (19:25 +0200)]
fix: build tests need libcrc.la

Build tests are failing because the need crc32c.cc's functions, so we
need to link them against libcrc.la

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMerge pull request #570 from roaldvanloon/wip-cleanup-globals
Sage Weil [Sat, 7 Sep 2013 15:45:02 +0000 (08:45 -0700)]
Merge pull request #570 from roaldvanloon/wip-cleanup-globals

cleanup: state_name in NamedState init list

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #571 from dalgaaf/fix-da-init-radosgw
Sage Weil [Sat, 7 Sep 2013 15:42:59 +0000 (08:42 -0700)]
Merge pull request #571 from dalgaaf/fix-da-init-radosgw

init-radosgw*: fix status return value if radosgw isn't running

Backport: dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoinit-radosgw*: fix status return value if radosgw isn't running 571/head
Danny Al-Gaaf [Sat, 7 Sep 2013 09:30:15 +0000 (11:30 +0200)]
init-radosgw*: fix status return value if radosgw isn't running

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agocleanup: state_name in NamedState init list 570/head
Roald J. van Loon [Sat, 7 Sep 2013 09:15:00 +0000 (11:15 +0200)]
cleanup: state_name in NamedState init list

Added const char *state_name to the NamedState initializer list. This
correctly enforces a state name.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agorgw: fix get cors, delete cors 576/head
Yehuda Sadeh [Sat, 7 Sep 2013 05:33:38 +0000 (22:33 -0700)]
rgw: fix get cors, delete cors

Remove a couple of variables that overrode class member. Not
really clear how it was working before, might have been a bad
merge / rebase.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>