summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fixme ReplicatedPG: clean up whitespace in RepGatherwip-promote-copiesGreg Farnum2013-10-161-2/+8
| | | | Signed-off-by: Greg Farnum <greg@inktank.com>
* workunits: break down cache pool tests to be more precise; expand someGreg Farnum2013-10-151-22/+41
| | | | Signed-off-by: Greg Farnum <greg@inktank.com>
* workunits: check errors propagate on cache pools in caching_redirects.shGreg Farnum2013-10-141-0/+3
| | | | Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: promote: handle failed promotesGreg Farnum2013-10-101-2/+18
| | | | | | | If we get an error back, reply to the client directly and remove the op which triggered promotion from our blocked op queue. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: promote: add the OpRequest to the CallbackGreg Farnum2013-10-102-3/+5
| | | | | | This way we can do stuff to it, and we're about to. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: promote: move the promote functionality into finish_promoteGreg Farnum2013-10-102-36/+43
| | | | | | | | This way we can have a couple of functions that handle each type of case, and let the PromoteCallback choose between them. That's much better than doing it all inline in the callback. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: copy: don't return from finish_copyfromGreg Farnum2013-10-092-5/+6
| | | | | | The return value is meaningless; nothing in this function can fail. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: promote: first draft pass at doing object promotionGreg Farnum2013-10-092-6/+97
| | | | | | | | This is not yet at all complete -- among other things, it will retry forever on any object which doesn't exist in the underlying pool. But it demonstrates the approach reasonably clearly. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: copy: switch out the CopyCallback interfaceGreg Farnum2013-10-092-45/+55
| | | | | | | The tuple was already unwieldy with 4 members; I didn't want to add more. Instead, create a new CopyResults struct which contains all the object info and completion data, and pass the retval and a CopyResults* in the CopyCallbackResults tuple.
* Objecter: expose the copy-get()'ed object's categoryGreg Farnum2013-10-093-5/+12
| | | | | | In the OSD, store the category in the CopyOp using this. Signed-off-by: Greg Farnum <greg@inktank.com>
* osd: add category to object_copy_data_tGreg Farnum2013-10-093-0/+4
| | | | | | | | | We don't bump the encoding version -- and stick it in the middle -- since it's still brand-new. For simplicity, we encode it unconditionally rather than trying to embed it alongside the attrs or with its own "complete" flag in the cursor. Signed-off-by: Greg Farnum <greg@inktank.com>
* OSD: add back CEPH_OSD_OP_COPY_GET, and use it in the ObjecterGreg Farnum2013-10-096-3/+41
| | | | | | | | | | This one is encoded with version information. We are not doing anything to control which op gets sent by the client, but after discussion with Sam we think this op isn't accessible enough to clients (right now it's only triggered by a client sending copy-from, which can only happen via ceph-test-rados) to require compatibility versioning. Signed-off-by: Greg Farnum <greg@inktank.com>
* OSD: rename CEPH_OSD_OP_COPY_GET -> CEPH_OSD_OP_COPY_GET_CLASSICGreg Farnum2013-10-096-8/+10
| | | | | | | In order to introduce versioning of copy-get, we need to make it a different op that has the versioning infrastructure from the start. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: copy: move the COPY_GET implementation into its own functionGreg Farnum2013-10-092-75/+85
| | | | | | | It was getting long, isn't terribly dependent on access to do_osd_ops() state, and will be easier to make generic as its own function. Signed-off-by: Greg Farnum <greg@inktank.com>
* osd: Add a new object_copy_data_t, and use it in the OSD/ObjecterGreg Farnum2013-10-095-31/+119
| | | | | | | | | | Right now this is very primitive, but we're about to extend it to deal with request versioning appropriately, and adding in some extra fields. Sadly we are doing a little extra copying in the Objecter as a result, but too bad -- being able to do updates will be worth it. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: cache: don't handle cache if the obc is blockedGreg Farnum2013-10-081-0/+4
| | | | | | | Right now the only way that can happen is if we're in the middle of a promote! Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: copy: add a C_KickBlockedObjectGreg Farnum2013-10-081-0/+11
| | | | | | | As the name says, you give it an obc and it kicks the block list when finish()ed. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: add a Context *ondone to RepGathersGreg Farnum2013-10-082-6/+13
| | | | | | | Make a few changes to make sure we trigger it when appropriate. We'll use this shortly for object promotion, and perhaps for other things in future. Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: copy: rename CopyOp::version -> user_versionGreg Farnum2013-10-082-6/+6
| | | | | | | | This version is a user version, and since we're in the OSD we should call it such. (In particular, we may want to keep track of the internal version too when doing cache promotes.) Signed-off-by: Greg Farnum <greg@inktank.com>
* ReplicatedPG: copy: do not let start_copy() return error codesGreg Farnum2013-10-082-7/+13
| | | | | | | | There's no failure it can actually run into, and handling error codes in some of its callers is going to be a pain. While we're here, document the parameters. Signed-off-by: Greg Farnum <greg@inktank.com>
* Go back to $PWD in fsstress.sh if compiling from source.Sandon Van Ness2013-10-081-0/+2
| | | | | | | | | | | | | | | Although fsstress was being called with a static path the directory it was writing to was in the current directory so doing a cd to the source directory that is made in /tmp and then removing it later caused it to be unable to write the files in a non-existent dir. This change gets the current path first and cd's back into it after it is done compiling fsstress. Issue #6479. Signed-off-by: Sandon Van Ness <sandon@inktank.com> Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
* Merge pull request #700 from dachary/masterSage Weil2013-10-081-1/+1
|\ | | | | doc: fix openstack rbd installation command
| * doc: fix openstack rbd installation commandLoic Dachary2013-10-081-1/+1
|/ | | | | | | | | | | | | | This cannot work because client.volumes.key is not a command ssh {your-compute-host} client.volumes.key replace with a tee to allow for copy/paste as well as using the cat client.volumes.key in the following lines. Signed-off-by: Loic Dachary <loic@dachary.org>
* Merge pull request #699 from dachary/wip-ghobject-assertDavid Zafman2013-10-071-1/+3
|\ | | | | | | | | os: stronger assert on FileStore::lfn_open Reviewed-by: David Zafman <david.zafman@inktank.com>
| * os: stronger assert on FileStore::lfn_openLoic Dachary2013-10-081-1/+3
|/ | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* Merge branch 'next'Greg Farnum2013-10-072-4/+7
|\
| * ReplicatedPG: copy: use aggregate return code instead of individual Op returnwip-rvalGreg Farnum2013-10-071-4/+3
| | | | | | | | | | | | | | | | | | | | It appears that the OSD is not filling in the individual return codes, and they should be equivalent for all purposes we care about here (the only Op we are doing is the copy-get, and if it fails we are getting its failure code). Reported-by: Sage Weil <sage@inktank.com> Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
| * os/FileStore: fix ENOENT error code for getattrs()Sage Weil2013-10-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | In commit dc0dfb9e01d593afdd430ca776cf4da2c2240a20 the omap xattrs code moved up a block and r was no longer local to the block. Translate ENOENT -> 0 to compensate. Fix the same error in _rmattrs(). Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
* | Merge pull request #697 from dachary/masterGregory Farnum2013-10-071-6/+6
|\ \ | | | | | | | | | This lets "make check" pass, so I like it. Reviewed-by: Greg Farnum <greg@inktank.com>
| * | common: unintended use of the wrong bloom_filter prototypeLoic Dachary2013-10-071-6/+6
|/ / | | | | | | | | | | | | For encoding/decoding test purposes. The generate_test_instances should be improved to cover more encoding/decoding cases. Signed-off-by: Loic Dachary <loic@dachary.org>
* | Merge pull request #610 from ceph/wip-optrackerGregory Farnum2013-10-0717-533/+652
|\ \ | | | | | | Reviewed-by: Samuel Just <sam.just@inktank.com>
| * | Makefile: add include/histogram.h to noinst_HEADERSGreg Farnum2013-10-041-0/+1
| | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | Merge branch 'master' into wip-optrackerGreg Farnum2013-10-03205-3807/+8646
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/osd/OpRequest.h src/osd/PG.cc src/osd/ReplicatedPG.cc Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | TrackedOp: specify queue sizes and warnings on a per-tracker basisGreg Farnum2013-10-034-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have multiple trackers in a daemon, we want to be able to configure them separately. Plus, users already know how to control op sizes in the OSD, so changing the config options (as we did in a8bbb81b7b7b6420ea08bc4e99a39adc6c3c397a) is not really appropriate. Instead, provider setters which can be called at construction time (or on any other change) and use them in the OSD with the configurables we had previously. Add an observer so you can continue to change them at run-time This reverts a8bbb81b7b7b6420ea08bc4e99a39adc6c3c397a Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | TrackedOp: give people an _event_marked() notifier instead of a virtual ↵Greg Farnum2013-10-033-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mark_event() This is less prone to getting broken. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | TrackedOp: rework dump interface a littleGreg Farnum2013-10-024-28/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Put only the bare essentials in the TrackedOp::dump() implementation, but have that call into a _dump() function that implementations can specify. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | TrackedOp: just make CephContext member publicGreg Farnum2013-10-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only reason we were making OpRequest a friend class, which is just a bad idea. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | TrackedOp: template OpTracker on only T[::Ref] (ie, OpRequest[::Ref])Greg Farnum2013-10-023-10/+11
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: give TrackedOp a default dump() functionGreg Farnum2013-10-022-1/+33
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: get rid of TrackedOp::received_time for the MessageGreg Farnum2013-09-193-12/+10
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: demand that a TrackedOp gets to own its Message for life.Greg Farnum2013-09-192-5/+1
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: provide a default implementation of TrackedOp::state_stringGreg Farnum2013-09-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're moving towards dynamically-allocated states instead of the static ones this started with, so the whole bitmask-based thing doesn't make much sense any more. Assume people won't use that and provide a default. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | osd: use TrackedOp::get_req() instead of direct access to the request.Greg Farnum2013-09-198-112/+109
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: include a destructor for the TrackedOp base class.Greg Farnum2013-09-192-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our method of handling the OpRequest destructor is a little weird, but we're about to get rid of the request member finagling. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | osd: change how we work around an interface limitation.Greg Farnum2013-09-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If this had ever actually been triggered we would have hit an assert in the OpRequest destructor that op->request is non-NULL. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: move OpTracker pointer and some init code into TrackedOpGreg Farnum2013-09-193-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | Clean up some member privacy issues while we're working on them. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: remove the references to "osd" in config variablesGreg Farnum2013-09-193-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may want to have daemon-specific settings in the future, but that will be a small interface change and in the mean time this keeps a clear demarcation between OSD and OpTracker infrastructure. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: move the OpTracker and OpHistory into common/TrackedOp.[h|cc]Greg Farnum2013-09-195-315/+338
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: add an init_from_message() to the TrackedOp interfaceGreg Farnum2013-09-193-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be used for the concrete implementations to gather any extra data out of the message and do whatever extra setup based on that they want. The OpTracker will call this after doing all its internal setup but before anybody else gets to see the TrackedOp. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | OpTracker: start making the OpTracker into a genericGreg Farnum2013-09-194-68/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're starting by templating the create_request function and having the OpTracker work in terms of TrackedOp[Ref]s intead of OpRequest[Ref]s. This involves moving a bunch of stuff into the base-class TrackedOp. Signed-off-by: Greg Farnum <greg@inktank.com>