Commit Graph

28631 Commits

Author SHA1 Message Date
Sage Weil
a80f831b1f ceph_test_rados: identify write seq_num in output
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:28 -07:00
Sage Weil
3a00187860 librados: test copy_from without src_version specified
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:28 -07:00
Sage Weil
045b90292a 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>
2013-09-17 11:06:28 -07:00
Sage Weil
83f12e4630 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>
2013-09-17 11:06:27 -07:00
Sage Weil
d050596a0d ceph_test_rados: use get_version64() throughout
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
cdc637f0f1 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>
2013-09-17 11:06:27 -07:00
Sage Weil
f97277cc50 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>
2013-09-17 11:06:27 -07:00
Sage Weil
df7c36ac08 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>
2013-09-17 11:06:27 -07:00
Sage Weil
5921703eb5 ceph_test_rados: more readable output
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
4e29e362e7 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>
2013-09-17 11:06:27 -07:00
Sage Weil
25a608cdcc 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>
2013-09-11 15:56:12 -07:00
Sage Weil
155cdd29a3 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>
2013-09-11 15:56:12 -07:00
Sage Weil
c4260fad29 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>
2013-09-11 15:19:18 -07:00
Sage Weil
27ca5d2e06 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>
2013-09-11 15:19:18 -07:00
Sage Weil
c9885e7487 osd/ReplicatedPG: generate one-off unique temp object names
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-11 15:19:18 -07:00
Sage Weil
6cecd0db56 osd/osd_types: move coll_t::META_COLL definition
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-11 15:19:18 -07:00
Sage Weil
17c5d765d7 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>
2013-09-11 15:19:18 -07:00
Sage Weil
ef7cffc34f 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>
2013-09-11 15:09:14 -07:00
Sage Weil
661b377c28 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>
2013-09-09 16:55:21 -07:00
Sage Weil
04120360e3 Merge pull request #581 from dachary/master
autoconf: use $(LIBOSD) $(LIBCOMMON) instead of libosd.a libcommon.la

Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-09 15:39:35 -07:00
Loic Dachary
132e403938 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>
2013-09-10 00:30:57 +02:00
John Wilkins
4c5b3c7bee doc: Syntax fix to suppress gitbuilder errors.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:30:19 -07:00
John Wilkins
8bf858f2f2 doc: Removed mkcephfs reference.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:29:56 -07:00
John Wilkins
494aff6b52 doc: Syntax fixes to suppress gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:27:57 -07:00
John Wilkins
95c0c6c915 doc: Syntax fixes to suppress gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:27:36 -07:00
John Wilkins
1e54d835cc doc: Syntax fixes to suppress gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:27:12 -07:00
John Wilkins
68659a6563 doc: Syntax fixes to suppress gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:26:47 -07:00
John Wilkins
1bb722550f doc: Syntax fixes to suppress gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:23:24 -07:00
John Wilkins
a6a714064e doc: Syntax fixes to suppress gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:22:59 -07:00
John Wilkins
ac609a4fe2 doc: Syntax fixes to remove gitbuilder errors.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 15:22:08 -07:00
athanatos
07ff0215e2 Merge pull request #518 from dachary/wip-5878
erasure plugin mechanism and abstract API

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-09-09 14:54:39 -07:00
Loic Dachary
392179478e 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>
2013-09-09 23:34:12 +02:00
Loic Dachary
916901f913 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>
2013-09-09 23:32:47 +02:00
Loic Dachary
b61369c803 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>
2013-09-09 23:28:37 +02:00
Loic Dachary
640f2f213f 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>
2013-09-09 23:26:42 +02:00
David Zafman
95d61c1a86 Fix usage to include export and import --type options
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-09 14:10:13 -07:00
Loic Dachary
dde21bdfeb 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>
2013-09-09 21:23:17 +02:00
Sage Weil
f3d507e05d Merge pull request #579 from ceph/wip-doc-warn-fix
make sure we use a version of sphinx that we can handle
2013-09-09 11:34:08 -07:00
John Wilkins
ff9beb2cf5 doc: Syntax fixes to stop gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 11:19:59 -07:00
John Wilkins
9c0970168b doc: Syntax fixes to stop gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 11:19:21 -07:00
John Wilkins
5900b43a85 doc: Syntax fixes to stop gitbuilder warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-09 11:19:04 -07:00
Alfredo Deza
99c42e13eb make sure we use a version of sphinx that we can handle
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2013-09-09 14:00:59 -04:00
Sage Weil
583ffaf47a Merge pull request #577 from roaldvanloon/wip-automake
automake cleanup: implementing non-recursive make

Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-09 09:02:59 -07:00
Sage Weil
726fe73d0d 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 5dd0a83f91.

Fixes: #6256
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-08 21:40:33 -07:00
Roald J. van Loon
6949d221ad 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>
2013-09-08 00:11:09 +02:00
Sage Weil
b2caa799d6 Merge remote-tracking branch 'gh/next' 2013-09-07 14:11:00 -07:00
Sage Weil
49dfb6cedf Merge pull request #575 from roaldvanloon/wip-automake-prepare
Wip automake prepare

Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-07 14:10:27 -07:00
Sage Weil
bc552647d4 Merge pull request #576 from ceph/wip-6078-2
rgw: fix get cors, delete cors

Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-07 14:09:23 -07:00
Roald J. van Loon
99c6be2fcf 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>
2013-09-07 22:44:12 +02:00
Roald J. van Loon
417f1f2a9d automake cleanup: moving rados tool to tools subdir
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
2013-09-07 22:41:10 +02:00