]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoosdc/ObjectCacher: finish contexts after dropping object reference 590/head
Yan, Zheng [Thu, 12 Sep 2013 02:36:39 +0000 (10:36 +0800)]
osdc/ObjectCacher: finish contexts after dropping object reference

The context to finish can be class C_Client_PutInode, which may drop
inode's last reference. So we should first drop object's reference,
then finish contexts.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agodoc/release-notes: v0.69
Sage Weil [Wed, 18 Sep 2013 19:31:42 +0000 (12:31 -0700)]
doc/release-notes: v0.69

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'next'
Gary Lowell [Wed, 18 Sep 2013 09:11:02 +0000 (09:11 +0000)]
Merge branch 'next'

11 years agov0.69 v0.69
Gary Lowell [Wed, 18 Sep 2013 01:40:51 +0000 (01:40 +0000)]
v0.69

11 years agoMerge pull request #586 from ceph/wip-copyfrom-big
Gregory Farnum [Tue, 17 Sep 2013 18:14:26 +0000 (11:14 -0700)]
Merge pull request #586 from ceph/wip-copyfrom-big

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoceph_test_rados: identify write seq_num in output 586/head
Sage Weil [Wed, 11 Sep 2013 22:57:00 +0000 (15:57 -0700)]
ceph_test_rados: identify write seq_num in output

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolibrados: test copy_from without src_version specified
Sage Weil [Wed, 11 Sep 2013 17:27:49 +0000 (10:27 -0700)]
librados: test copy_from without src_version specified

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: allow a copy_from without knowing the src_version
Sage Weil [Wed, 11 Sep 2013 22:11:35 +0000 (15:11 -0700)]
osd: allow a copy_from without knowing the src_version

If we don't specify the version up front, learn the version after the first
chunk and enforce it thereafter to ensure we do not get torn content.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: submit a racing read with every COPY_FROM
Sage Weil [Tue, 10 Sep 2013 23:30:25 +0000 (16:30 -0700)]
ceph_test_rados: submit a racing read with every COPY_FROM

Verify that the racing read completes after the COPY_FROM does (i.e., is
blocked by it).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: use get_version64() throughout
Sage Weil [Tue, 10 Sep 2013 23:29:48 +0000 (16:29 -0700)]
ceph_test_rados: use get_version64() throughout

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: block requests on object during COPY_FROM
Sage Weil [Wed, 11 Sep 2013 22:09:59 +0000 (15:09 -0700)]
osd: block requests on object during COPY_FROM

Block any request on an object (read or write) during the COPY_FROM
operation.

This could potentially be broken down into read vs write operations without
much difficulty, but blocking any op indescriminately is sufficient for
now, so let's keep it simple.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add infrastructure to block io on an obc
Sage Weil [Wed, 11 Sep 2013 22:10:47 +0000 (15:10 -0700)]
osd: add infrastructure to block io on an obc

Add an is_blocked() method for the obc, and add infrastructure to block
any operations if it returns true.  Clean up on_change(), and add a helper
to kick an obc when whatever condition leading to it being blocked is no
longer true.

For now, is_blocked() is always false...

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: factor some bits into finish_copy
Sage Weil [Mon, 9 Sep 2013 19:47:03 +0000 (12:47 -0700)]
osd/ReplicatedPG: factor some bits into finish_copy

This is a bit cleaner and hopefully more usable for osd-driven cache
promotion.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: more readable output
Sage Weil [Thu, 5 Sep 2013 23:09:13 +0000 (16:09 -0700)]
ceph_test_rados: more readable output

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: stage object chunks to replicas during COPY_FROM
Sage Weil [Thu, 5 Sep 2013 00:09:52 +0000 (17:09 -0700)]
osd/ReplicatedPG: stage object chunks to replicas during COPY_FROM

As we get each chunk of data during the COPY_FROM operation, write it out
to a temporary object on the replicas.  When we get all the pieces, move
it into place.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc: Replaced code-block with inline literal to fix auto numbering.
John Wilkins [Tue, 17 Sep 2013 17:39:24 +0000 (10:39 -0700)]
doc: Replaced code-block with inline literal to fix auto numbering.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Made s3gw.fcgi paths consistent.
John Wilkins [Tue, 17 Sep 2013 17:34:47 +0000 (10:34 -0700)]
doc: Made s3gw.fcgi paths consistent.

fixes: #6182

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoosd: compute full ratio from kb_avail
Alexandre Oliva [Tue, 17 Sep 2013 07:23:32 +0000 (04:23 -0300)]
osd: compute full ratio from kb_avail

On btrfs, kb_used + kb_avail can be much smaller than total kb, and
what really matters to avoid filling up the disk is how much space is
available, not how much we've used.  Thus, compute the ratio we use to
determine full or nearfull from kb_avail rather than from kb_used.

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Sage Weil <sage@inktank.com>
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 agorgw: try to create log pool if doesn't exist
Yehuda Sadeh [Fri, 13 Sep 2013 21:43:54 +0000 (14:43 -0700)]
rgw: try to create log pool if doesn't exist

When using replica log, if the log pool doesn't exist all operations are
going to fail. Try to create it if doesn't exist.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@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 agorgw: NULL terminate buffer before parsing it
Yehuda Sadeh [Wed, 11 Sep 2013 20:46:31 +0000 (13:46 -0700)]
rgw: NULL terminate buffer before parsing it

Fixes: #6175
Backport: dumpling
We get a buffer off the remote gateway which might
not be NULL terminated. The JSON parser needs the
buffer to be NULL terminated even though we provide
a buffer length as it calls strlen().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.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 agorgw: don't call list::size() in ObjectCache
Yehuda Sadeh [Thu, 12 Sep 2013 05:30:12 +0000 (22:30 -0700)]
rgw: don't call list::size() in ObjectCache

Fixes: #6286
Use an external counter instead of calling list::size()

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: drain pending requests before completing write
Yehuda Sadeh [Tue, 10 Sep 2013 19:18:55 +0000 (12:18 -0700)]
rgw: drain pending requests before completing write

Fixes: #6268
When doing aio write of objects (either regular or multipart parts) we
need to drain pending aio requests. Otherwise if gateway goes down then
object might end up corrupted.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoosd/ReplicatedPG: allow RepGathers with no version
Sage Weil [Thu, 5 Sep 2013 00:08:48 +0000 (17:08 -0700)]
osd/ReplicatedPG: allow RepGathers with no version

If the repop has no version set, skip the updates to last_update and
last_update_{applied,ondisk} and last_complete_ondisk.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: flag new/old temp objects in MOSDSubOp
Sage Weil [Thu, 5 Sep 2013 00:07:19 +0000 (17:07 -0700)]
osd: flag new/old temp objects in MOSDSubOp

Allow us to mark when we start and stop using a temporary object in a
sub_op.  If we start to use it, make sure the collection exists on the
replica.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: drop unused issue_repop() arguments
Sage Weil [Wed, 4 Sep 2013 23:13:13 +0000 (16:13 -0700)]
osd/ReplicatedPG: drop unused issue_repop() arguments

These are cruft from the old parallelexec mode and can be removed.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: drop dead code from parallelexec issue_repop
Sage Weil [Wed, 4 Sep 2013 23:12:44 +0000 (16:12 -0700)]
osd/ReplicatedPG: drop dead code from parallelexec issue_repop

This is unused and references otherwise unused variables we can remove!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: generate one-off unique temp object names
Sage Weil [Tue, 3 Sep 2013 22:41:14 +0000 (15:41 -0700)]
osd/ReplicatedPG: generate one-off unique temp object names

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: move coll_t::META_COLL definition
Sage Weil [Tue, 3 Sep 2013 22:23:50 +0000 (15:23 -0700)]
osd/osd_types: move coll_t::META_COLL definition

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/FileStore: implement collection_move_rename
Sage Weil [Tue, 3 Sep 2013 22:13:40 +0000 (15:13 -0700)]
os/FileStore: implement collection_move_rename

This is similar to a collection_add + collection_move sequence in that we
apply the same replay guards.  The difference is that we roll it up into
a single operation, change the filename, and make the omap content carry
over by calling DBObjectMap->clone (as there is no rename function or
collection awareness in the DBObjectMap).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/ObjectStore: add collection_move_rename
Sage Weil [Wed, 11 Sep 2013 22:09:14 +0000 (15:09 -0700)]
os/ObjectStore: add collection_move_rename

Add method to move an object between collections *and* change its name.

Signed-off-by: Sage Weil <sage@inktank.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 agorgw: when failing read from client, return correct error
Yehuda Sadeh [Tue, 3 Sep 2013 20:27:21 +0000 (13:27 -0700)]
rgw: when failing read from client, return correct error

Fixes: #6214
When getting a failed read from client when putting an object
we returned the wrong value (always 0), which in the chunked-
upload case ended up in assuming that the write was done
successfully.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.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 agoos/FileStore: pass old + new object name to lfn_link
Sage Weil [Tue, 3 Sep 2013 22:03:32 +0000 (15:03 -0700)]
os/FileStore: pass old + new object name to lfn_link

For now, the only caller leaves the name the same.

Signed-off-by: Sage Weil <sage@inktank.com>
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 #583 from ceph/wip-6230-workunit
Sage Weil [Mon, 9 Sep 2013 23:31:28 +0000 (16:31 -0700)]
Merge pull request #583 from ceph/wip-6230-workunit

qa: workunits: mon: crush_ops: test 'ceph osd crush move'

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoqa: workunits: mon: crush_ops: test 'ceph osd crush move' 583/head
Joao Eduardo Luis [Mon, 9 Sep 2013 23:20:41 +0000 (00:20 +0100)]
qa: workunits: mon: crush_ops: test 'ceph osd crush move'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge pull request #582 from ceph/wip-6230
Sage Weil [Mon, 9 Sep 2013 23:01:06 +0000 (16:01 -0700)]
Merge pull request #582 from ceph/wip-6230

mon: MonCommands: expect a CephString as 1st arg for 'osd crush move'

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: MonCommands: expect a CephString as 1st arg for 'osd crush move' 582/head
Joao Eduardo Luis [Mon, 9 Sep 2013 22:14:11 +0000 (23:14 +0100)]
mon: MonCommands: expect a CephString as 1st arg for 'osd crush move'

Fixes: #6230
Signed-off-by: Joao Eduardo Luis <joao.luis@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>