summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* librados: seek during object iterationwip-rados-listSage Weil2013-10-108-1/+155
| | | | | | | | Add ability to reset iterator to a specific hash position. For now, we just truncate this to the current PG. In the future, this may be more precise. Signed-off-by: Sage Weil <sage@inktank.com>
* osdc/Objecter: reimplement list_objectsSage Weil2013-10-103-46/+54
| | | | | | | | | | | | | | Return to caller at the end of each PG. This allows the caller to look at the [pg_]hash_position and get something meaningful. If there are no objects in the PG, we skip it so that every callback has *some* data (unless the pool is totally empty!). So the real difference here is that we don't move on to the next PG just to reach max_entries. This gives the client some data sooner, but may mean more callbacks into client code. Signed-off-by: Sage Weil <sage@inktank.com>
* librados: add get_pg_hash_position to determine pg while listing objectsSage Weil2013-10-105-0/+65
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* osdc/Objecter: drop redundant conditionSage Weil2013-10-101-1/+1
| | | | | | We are inside an if (response_size) block. Signed-off-by: Sage Weil <sage@inktank.com>
* osdc/Objecter: stick bl inside ListContextSage Weil2013-10-102-16/+11
| | | | | | This is simpler and less error-prone. Signed-off-by: Sage Weil <sage@inktank.com>
* osdc/Objecter: factor pg_read out of list_objects codeSage Weil2013-10-102-13/+21
| | | | | | This will get used later for other ops against PGs (instead of objects). Signed-off-by: Sage Weil <sage@inktank.com>
* osdc/Objecter: explicitly separate explicit pg target from current targetSage Weil2013-10-102-11/+17
| | | | | | | | | | | | | The pgid field is used to store the pg the op mapped to. We were just setting it directly for PGLS. Instead, fill in base_pgid, and copy that to pgid in recalc_op_target(), the same way we do when we map an object name to a PG. In particular, we take this opportunity to map a raw pgid to an actual pgid. This means the base_pg could come from a raw hash value (although it doesn't, yet). Signed-off-by: Sage Weil <sage@inktank.com>
* osd/osd_types: drop old pref arg to pg_t ctor lessSage Weil2013-10-101-1/+1
| | | | Signed-off-by: Sage Weil <sage@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>
| * | | OpRequest: remove obsolete comment about ref-counting (use OpRequestRef!)Greg Farnum2013-09-191-3/+0
| | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | osd: move pow2_hist_t out of osd_types and into include/Greg Farnum2013-09-195-62/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This has only been used for the OSD so far, but as with the rest of the OpRequest stuff, it's actually pretty generic. Signed-off-by: Greg Farnum <greg@inktank.com>
* | | | Merge remote-tracking branch 'gh/next'Sage Weil2013-10-071-2/+2
|\ \ \ \ | | |_|/ | |/| |
| * | | Merge pull request #695 from ceph/wip-mon-authJoão Eduardo Luís2013-10-071-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | fix mon double-free when dropping unhandled messages, and allow "get monmap" messages to go through without authenticating for MonCliente::get_monmap_privately() Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | | mon: allow MMonGetMap without authenticationSage Weil2013-10-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used by the MonClient::get_monmap_privately() helper. Signed-off-by: Sage Weil <sage@inktank.com>
| | * | | mon: do not put() unhandle messageSage Weil2013-10-061-1/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | If we return false because we aren't handling a message, we should not put the ref. This fixes a double-free. Signed-off-by: Sage Weil <sage@inktank.com>
* | | | Merge pull request #693 from ceph/wip-bloomSage Weil2013-10-074-73/+275
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | bloom_filter improvements, cleanups Reviewed-by: Loic Dachary <loic@dachary.org>
| * | | | common/bloom_filter: add a few assertions and checks for bit_table_ == NULLSage Weil2013-10-062-3/+27
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | common/bloom_filter: simplify compressible_bloom_filter encode/decode/dumpSage Weil2013-10-061-46/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-use bloom_filter for this, as per Loic's suggestion. Much nicer! Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | common/bloom_filter: fix compress; improve argumentSage Weil2013-10-062-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug in compress() when compressing to less than .5 or original. Make the argument have sane units (target size relative to current size; not a precentage reduction). Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | common/bloom_filter: fix estimated element count for compressed filtersSage Weil2013-10-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to compensate for the fact that there are fewer bits than there used to be. This is a crappy adjustment; it is non-linear. It's clone enough for now, though. Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | common/bloom_filter: methods for density, approx unique element countsSage Weil2013-10-042-2/+28
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>