summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Temporary collection_list* funcs in ObjectStore to do ghobject_t to ↵wip-5862David Zafman2013-09-232-0/+55
| | | | | | hobject_t conversion Signed-off-by: David Zafman <david.zafman@inktank.com>
* osd: Cleanup init()/read_superblock()David Zafman2013-09-231-52/+57
| | | | | | | | | Fix error handling in init() Cleanup read_superblock() by moving unrelated code into init() Move init() feature upgrade right after compatibility checking Remove redundant whoami check Signed-off-by: David Zafman <david.zafman@inktank.com>
* common, os, osd, test, tools: FileStore must work with ghobjects rather than ↵David Zafman2013-09-2331-837/+1090
| | | | | | | | | | | | | | | | | | | hobjects Add ghobject_t to hboject.h header Add constants NO_SHARD/NO_GEN and change gen_t/shard_t Convert other headers from hobject_t to ghobject_t Mostly straight hobject_t to ghobject_t for src/os cc files Fix tools and tests and enable ceph-dencoder Add filename generation and parsing including unittest addition Get ceph-filestore-dump to build Add gen/shard to DBObjectMap::ghobject_key() and update test case Add CEPH_FS_FEATURE_INCOMPAT_SHARDS new FileStore feature Add CEPH_OSD_FEATURE_INCOMPAT_SHARDS new osd feature Fixes: #5862 Signed-off-by: David Zafman <david.zafman@inktank.com>
* include, test: Add CompatSet::merge() operationDavid Zafman2013-09-232-0/+61
| | | | | | | New func merge() adds missing features from specified CompatSet Add merge testing to unittest Signed-off-by: David Zafman <david.zafman@inktank.com>
* os, osd, tools: Add backportable compatibility checking for sharded objectsDavid Zafman2013-09-237-15/+288
| | | | | | | | | | | | | | | | | | | | | OSD New CEPH_OSD_FEATURE_INCOMPAT_SHARDS FileStore NEW CEPH_FS_FEATURE_INCOMPAT_SHARDS Add FSSuperblock with feature CompatSet in it Store sharded_objects state using CompatSet Add set_allow_sharded_objects() and get_allow_sharded_objects() to FileStore/ObjectStore Add read_superblock()/write_superblock() internal filestore functions ceph_filestore_dump Add OSDsuperblock to export format Use CompatSet from OSD code itself in filestore-dump tool Always check compatibility of OSD features with on-disk features On import verify compatibility of on-disk features with export data Bump super_ver due to export format change Backport: dumpling, cuttlefish Signed-off-by: David Zafman <david.zafman@inktank.com>
* osd: read_superblock() not outputing unsupported features when incompatibleDavid Zafman2013-09-231-2/+2
| | | | | | | | Use working version of CompatSet::unsupported() to improve log output Backport: dumpling, cuttlefish Signed-off-by: David Zafman <david.zafman@inktank.com>
* test: Adding unittest for CompatSetDavid Zafman2013-09-232-0/+135
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* include: Bug fixes for CompatSetDavid Zafman2013-09-231-11/+8
| | | | | | | | | | | | | | | | | | FeatureSet insert/remove Use 64-bit arithmetic to allow features past 31 Allow feature 63 by fixing assert in insert CompatSet::unsupported() bugs Ignore feature 0 which became illegal Use 64-bit arithmetic when computing mask Use id in insert() and to get correct feature name Use the right map to get name for diff.ro_compat Caused by 80979bbe92409e6f098566e18be6ed59ad9d111a Caused by 470796b5456592ee5179bbd44b72910a2d7f6aca Backport: dumpling, cuttlefish Signed-off-by: David Zafman <david.zafman@inktank.com>
* os: Fix version_stamp_is_valid() and write_vesion_stamp() error returnDavid Zafman2013-09-231-4/+2
| | | | | | Caused by 341fb208aa32117f58ed4ce623f4b152f64ac72e Signed-off-by: David Zafman <david.zafman@inktank.com>
* os, ceph_osd: Rename on_disk_version to target_versionDavid Zafman2013-09-233-7/+7
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* os: Prior version bump should have updated thisDavid Zafman2013-09-231-1/+1
| | | | | | | | Version available as argument, so use instead of constant Caused by dab238b0fb76b76a8843f4e59319b0f0e4f966a2 Signed-off-by: David Zafman <david.zafman@inktank.com>
* os: Code conformance of os/LFNIndex.ccDavid Zafman2013-09-231-16/+32
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* os: Fix typo in commentDavid Zafman2013-09-231-1/+1
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* common: Fix get_namespace() definition in hobject_tDavid Zafman2013-09-231-1/+1
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* osd: Add assert() on collection_getattr() failure instead of later decode crashDavid Zafman2013-09-231-1/+2
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* tools: Fix ceph_filestore_dump usage againDavid Zafman2013-09-231-1/+1
| | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* Merge pull request #605 from dachary/wip-erasure-code-plugin-testSage Weil2013-09-238-53/+187
|\ | | | | erasure code plugin test
| * ErasureCode: complete plugin loader unit testsLoic Dachary2013-09-196-52/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TestErasureCodePluginExample.cc is renamed to TestErasureCodePlugin.cc because it's not limited to the example which is really used to support tests rather than being tested. * Bugous plugins are added to exhibit failures and enable the unit tests to check they are handled as expected ErasureCodePluginFailToInitialize : the entry point returns != 0 ErasureCodePluginFailToRegister : the plugin registry is not updated ErasureCodePluginMissingEntryPoint : the shared library has no entry point * It would be difficult to prove that the mutex protecting against multiple loads actually does what it is expected to because of the lack of thread introspection functions such as : tell me if this thread is waiting on this mutex. A simpler approach is chosen : create a thread that blocks forever when loading ( that's what the delay in the example plugin is for ) and then check that the lock has indeed been acquired. Since this mutex is merely about making sure that only one thread at a time runs this sequence of code, it's probably enough. Signed-off-by: Loic Dachary <loic@dachary.org>
| * ErasureCode: plugin loading in progress flagLoic Dachary2013-09-192-1/+5
| | | | | | | | | | | | | | | | The bool loading data member of ErasureCodePluginRegistry is set to true when a plugin is being loaded, to provide an observable side effect for test purposes. Signed-off-by: Loic Dachary <loic@dachary.org>
| * ErasureCode: improve API implementation exampleLoic Dachary2013-09-192-15/+116
| | | | | | | | | | | | | | | | | | | | | | | | * minimum_to_decode and minimum_to_decode_with_cost are replaced with meaningfull examples instead of placeholders * encode and decode are commented and hard coded constants are replaced by defines for readability * run against valgrind Signed-off-by: Loic Dachary <loic@dachary.org>
| * ErasureCode: proofread abstract API documentationLoic Dachary2013-09-191-29/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge pull request #603 from dachary/wip-erasure-code-exampleSage Weil2013-09-233-44/+175
|\ \ | | | | | | erasure code example cleanup
| * | ErasureCode: improve API implementation exampleLoic Dachary2013-09-172-15/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * minimum_to_decode and minimum_to_decode_with_cost are replaced with meaningfull examples instead of placeholders * encode and decode are commented and hard coded constants are replaced by defines for readability * run against valgrind Signed-off-by: Loic Dachary <loic@dachary.org>
| * | ErasureCode: proofread abstract API documentationLoic Dachary2013-09-171-29/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | | Merge pull request #607 from ceph/prctl-getname-testSage Weil2013-09-232-9/+18
|\ \ \ | | | | | | | | | | | | | | | | code_env: use feature test for PR_GET_NAME support Reviewed-by: Sage Weil <sage@inktank.com>
| * | | code_env: use feature test for PR_GET_NAME supportprctl-getname-testNoah Watkins2013-09-192-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Function `get_process_name` has platform specific dependencies. Check for Linux prctl function and correct command flag. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* | | | Merge pull request #616 from ceph/automake-flagsSage Weil2013-09-232-8/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | automake: fixup am_common_flags to avoid re-definitions Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
| * | | | automake: add per-target AM_CPPFLAGSautomake-flagsNoah Watkins2013-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
| * | | | makefile-env: separate cppflags and cflags usageNoah Watkins2013-09-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AM_COMMON_FLAGS included both CPP and C[XX] flags. This can cause re-definition errors like this: make[4]: Nothing to be done for `all-am'. CXX cls/version/cls_version_client.o <command-line>: warning: "__STDC_FORMAT_MACROS" redefined because the macro definition appears in both AM_CXXFLAGS and AM_CPPFLAGS. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* | | | | Merge pull request #614 from ceph/wip-rados-modelGregory Farnum2013-09-233-11/+17
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Prevent copy_from against yourself, and fix issues with the testing framework around it Reviewed-by: Greg Farnum <greg@inktank.com>
| * | | | | ceph_test_rados: fix COPY_FROM completionSage Weil2013-09-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the copy_from operation to not remove the objects from the in_use list until after the entire operation is complete. In particular, the racing read was completing and removing the dest oid from the in-use list before the copy-from completed. This keeps the model in sync with what the OSD is actually doing. If another new read started up, it would grab the previous value from the model and expect to see that, but would instead see the updated value. Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | | ceph_test_rados: fix seq_num, improve error outputSage Weil2013-09-201-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | | ceph_test_rados: limit max_in_flight to objects/2Sage Weil2013-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, we need to allow all in-flight ops to be COPY_FROM. Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | | ceph_test_rados: do not COPY_FROM selfSage Weil2013-09-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | | osd/ReplicatedPG: handle COPY_FROM selfSage Weil2013-09-201-0/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Return EINVAL if we try to COPY_FROM ourselves. Signed-off-by: Sage Weil <sage@inktank.com>
* | | | | Merge remote-tracking branch 'gh/next'Sage Weil2013-09-238-41/+73
|\ \ \ \ \
| * \ \ \ \ Merge pull request #612 from ceph/wip-6361João Eduardo Luís2013-09-214-6/+19
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | perfglue/heapprofiler: expect cmd name when handling command instead of 'heap <cmd>' This was broken by the cli rework. Reviewed-by: Samuel Just <sam.just@inktank.com>
| | * | | | | qa: workunits: cephtool: check if 'heap' commands are parseablewip-6361Joao Eduardo Luis2013-09-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
| | * | | | | osd: OSD: add 'heap' command to known osd commands arrayJoao Eduardo Luis2013-09-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Must have been forgotten during the cli rework. Backport: dumpling Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
| | * | | | | mds: MDS: pass only heap profiler commands instead of the whole cmd vectorJoao Eduardo Luis2013-09-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The heap profiler doesn't care, nor should it, what our command name is. It only cares about the commands it handles. Backport: dumpling Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
| | * | | | | perfglue/heap_profiler.cc: expect args as first element on cmd vectorJoao Eduardo Luis2013-09-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to pass 'heap' as the first element of the cmd vector when handling commands. We haven't been doing so for a while now, so we needed to fix this. Not expecting 'heap' also makes sense, considering that what we need to know when we reach this function is what command we should handle, and we should not care what the caller calls us when handling his business. Fixes: #6361 Backport: dumpling Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
| * | | | | | mon: fix wrong arg to "instructed to" status messageDan Mick2013-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #6293 Signed-off-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit 16ebb25f7cdb8e92c618a333c505c16edb16c95c)
| * | | | | | rgw: destroy get_obj handle in copy_obj()Yehuda Sadeh2013-09-202-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #6176 Backport: dumpling We take different code paths in copy_obj, make sure we close the handle when we exit the function. Move the call to finish_get_obj() out of copy_obj_data() as we don't create the handle there, so that should makes code less confusing and less prone to errors. Also, note that RGWRados::get_obj() also calls finish_get_obj(). For everything to work in concert we need to pass a pointer to the handle and not the handle itself. Therefore we needed to also change the call to copy_obj_data(). Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | | | | lru_map: don't use list::size()Yehuda Sadeh2013-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replace list::size() with map::size(), which should have a constant time complexity. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | | | | common/lru_map: rename tokens to entriesYehuda Sadeh2013-09-201-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was originally used in a token cache, now as a generic infrastructure rename token fields. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | | | | bufferlist: don't use list::size()Yehuda Sadeh2013-09-201-3/+6
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | | | rgw: use bufferlist::append() instead of bufferlist::push_back()Yehuda Sadeh2013-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | push_back() expects char *, whereas append can append a single char. Appending a NULL char to push_back is cast as a NULL pointer which is bad. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* | | | | | doc: When bootstrapping mon set the correct caps for client.adminWido den Hollander2013-09-231-1/+1
| |/ / / / |/| | | | | | | | | | | | | | | | | | | Otherwise client.admin will be privilege-less and the admin can't access the cluster.
* | | | | Merge pull request #592 from ceph/wip-6287Dan Mick2013-09-201-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | mon/OSDMonitor: make busy creating pgs message more explicit Reviewed-by: Dan Mick <dan.mick@inktank.com>
| * | | | | mon/OSDMonitor: make busy creating pgs message more explicitSage Weil2013-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #6287 Signed-off-by: Sage Weil <sage@inktank.com>