summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* futzingwip-5488Sage Weil2013-07-231-2/+2
|
* librbd: allow recursive lock of md_lockSage Weil2013-07-221-1/+1
| | | | | | This is necessary for opening the parent (if any). Signed-off-by: Sage Weil <sage@inktank.com>
* common/RWLock: allow lockdep to be selectively disabledSage Weil2013-07-221-10/+10
| | | | | | Just liked with Mutex::Lock() and friends. Signed-off-by: Sage Weil <sage@inktank.com>
* librbd: avoid recursive locking of AioCompletion::lockSage Weil2013-07-222-2/+13
| | | | | | | | | The caller of the callback is holding the completion lock; do not retake it. Fixes assert triggered when lockdep is enabled. Signed-off-by: Sage Weil <sage@inktank.com>
* rbd-fuse, ceph_test_librbd_fsx: parse environment after reading configSage Weil2013-07-222-2/+2
| | | | | | | Otherwise the conf file will clobber your CEPH_CONF arguments and you will get very confused. Signed-off-by: Sage Weil <sage@inktank.com>
* FileStore: disable fd cacher and wbthrottle during replaySamuel Just2013-07-222-3/+11
| | | | | | | | | | The fd cache only works correctly when there is at most 1 inode per hobject_t. This condition is frequently violated during replay. Fixes: #5699 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* PGLog::merge_log, unidex() only works from tail, we index() below anywaySamuel Just2013-07-221-1/+0
| | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* PGLog::rewind_divergent_log: unindex only works from tail, index() insteadSamuel Just2013-07-221-1/+1
| | | | | | Fixes: #5714 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* src/test/osd/TestPGLog.cc: check that the object remains in log.objectsSamuel Just2013-07-221-3/+8
| | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* rgw: swift, in create bucket set location_constraintsYehuda Sadeh2013-07-221-0/+2
| | | | | | | | For swift we're setting the location constraint to be the current region we're in when creating a bucket. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* rgw: translate swift request to s3 when forwardingYehuda Sadeh2013-07-227-5/+24
| | | | | | | | | | | | | | When forwarding a swift request to a different region, we need to use the effective uri, and not just send the one we got since we use S3 authentication for the forwarded requests. This is achieved through a new using 'effective_uri' param on the request info (which in swift ponts to the plain bucket/object uri without the swift/v1 prefix(. Also, rename the old req_state::effective_uri to relative_uri in order to prevent confusion. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* Merge remote-tracking branch 'gh/wip-5624-b' into nextSage Weil2013-07-227-29/+42
|\ | | | | | | Reviewed-by: David Zafman <david.zafman@inktank.com>
| * mon, mds, osd: add early SIGTERM injectionSage Weil2013-07-204-0/+11
| | | | | | | | | | | | | | | | | | | | | | This makes it easy to identify problems with (early) shutdown with a loop like while [ ! -e core ] ; do ./ceph-mds -i a -c ceph.conf -f ; done and a vstart cluster. Signed-off-by: Sage Weil <sage@inktank.com>
| * mds: put g_ceph_context on shutdownSage Weil2013-07-201-2/+3
| | | | | | | | | | | | This makes us shut down lots of threads. Signed-off-by: Sage Weil <sage@inktank.com>
| * mon: shutdown: remove sessions under mon->lockSage Weil2013-07-201-2/+2
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * mds: reorder suicide/shutdown a bitSage Weil2013-07-201-4/+3
| | | | | | | | | | | | | | * shutdown msgr last * stop timer quickly, in case there are other events Signed-off-by: Sage Weil <sage@inktank.com>
| * mds: install signal handlers after initSage Weil2013-07-201-9/+10
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * mon: install signal handlers after initSage Weil2013-07-201-4/+4
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * osd: do not assume we have an osdmap in prepare_to_stopSage Weil2013-07-201-3/+4
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * osd: install async signal handlers after init()Sage Weil2013-07-201-6/+6
| | | | | | | | | | | | The orderly shutdown in OSD assumes init() has completed. Signed-off-by: Sage Weil <sage@inktank.com>
* | Merge pull request #458 from ceph/wip-5693Gregory Farnum2013-07-2210-17/+111
|\ \ | | | | | | | | | Wip 5693 Reviewed-by: Greg Farnum <greg@inktank.com>
| * | PendingReleaseNotes: update about new rgw copy obj responseYehuda Sadeh2013-07-221-0/+6
| | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | rgw: add some commentsYehuda Sadeh2013-07-222-0/+6
| | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | rgw: dump progress through swift object copyYehuda Sadeh2013-07-222-6/+32
| | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | rgw: send data back when copying objectYehuda Sadeh2013-07-227-11/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently doing it only when copying between regions. This is needed so that the operation doesn't time out (as it can take a long time and the web server may just hang on us since we're not sending any data). This is configurable and can be disabled. Currently only implemented for S3. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* | | ceph.in: reject --admin-daemon so it can't do harmDan Mick2013-07-221-0/+7
| | | | | | | | | | | | | | | Fixes: #3944 Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | | FileJournal: fix posix_fallocate error handlingNoah Watkins2013-07-221-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the man page for posix_fallocate: posix_fallocate() returns zero on success, or an error number on failure. Note that errno is not set. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | OSD::_make_pg: use createmap, not osdmapSamuel Just2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The osd lock is not held at this point, we must use the createmap passed in. Fixes: #5656 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | rgw: read attributes when reading bucket entry pointYehuda Sadeh2013-07-223-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5691 We need to also read the attributes, as bucket might be a legacy bucket and might have all bucket instance info in that object. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> Tested-by: Faidon Liambotis <faidon@wikimedia.org>
* | | OSD::RemoveWQ: do not apply_transaction while blocking _try_resurrect_pgSamuel Just2013-07-222-19/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some callbacks take the osd lock, so we need to avoid blocking an osd lock holding thread while waiting on a filestore callback. Instead, just queue the transaction, and allow _try_resurrect_pg to cancel us while we are waiting for the transaction to go through (CLEARING_WAITING). Fixes: #5672 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | FileStore: use complete() instead of finish() and deleteSamuel Just2013-07-221-4/+2
| | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | Finisher: use complete() not finish() and deleteSamuel Just2013-07-221-4/+2
| | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | common/Cond.h: add a simpler C_SaferCond ContextSamuel Just2013-07-221-0/+32
| | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | ceph.spec.in: Obsolete ceph-libsGary Lowell2013-07-221-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Gary Lowell <gary.lowell@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | Merge remote-tracking branch 'gh/wip-mon-caps' into nextSage Weil2013-07-223-6/+70
|\ \ \ | | | | | | | | | | | | Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | qa/workunits/mon/caps.sh: clean up users; renameSage Weil2013-07-191-0/+5
| | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | | mon/MonCap: simplify rwx match logicSage Weil2013-07-192-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | Make this a positive check instead of double negative. Signed-off-by: Sage Weil <sage@inktank.com>
| * | | mon: fix command caps checkSage Weil2013-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We must require something or else the caps check is going to pass in a degenerate sense. Use X for commands. Signed-off-by: Sage Weil <sage@inktank.com>
| * | | qa: workunits: mon: test mon caps permissionsJoao Eduardo Luis2013-07-191-0/+50
| | |/ | |/| | | | | | | | | | | | | | | | set env var TEST_EXIT_ON_ERROR=0 to obtain all errors instead of exiting with return 1 on first error found. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* | | Merge pull request #453 from dalgaaf/wip-da-SCA-cppcheck-7Sage Weil2013-07-2116-97/+97
|\ \ \ | | | | | | | | | | | | | | | | Fix SCA and CID issues Reviewed-by: Sage Weil <sage@inktank.com>
| * | | cls_replica_log_types.h: pass const std::list<> by referenceDanny Al-Gaaf2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass const std::list<> parameter by refrence to cls_replica_log_progress_marker(). From cppcheck: [src/cls/replica_log/cls_replica_log_types.h:64]: (performance) Function parameter 'b' should be passed by reference. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | | mon/PGMonitor.cc: reduce scope of local 'num_slow_osds' variableDanny Al-Gaaf2013-07-201-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | | rgw/rgw_bucket.cc: use static_cast<>() instead of C-Style castDanny Al-Gaaf2013-07-201-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | | test_cls_version.cc: don't free object twice, free the right oneDanny Al-Gaaf2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Object 'librados::ObjectWriteOperation *op' is freed twice in the TEST test_version_inc_read. Free instead 'librados::ObjectReadOperation *rop' Related cppcheck warning: [src/test/cls_version/test_cls_version.cc:79]: (error) Memory pointed to by 'op' is freed twice. This should also fix: CID 1049247 (#1 of 1): Use after free (USE_AFTER_FREE) deref_arg: Calling "librados::ObjectWriteOperation::~ObjectWriteOperation()" dereferences freed pointer "op". (The dereference happens because this is a virtual function call.) CID 1049218 (#4 of 4): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "rop" going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | | rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style castDanny Al-Gaaf2013-07-201-6/+6
| | | | | | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | | rgw: change RGWOp::name() to return string instead of char*Danny Al-Gaaf2013-07-2011-84/+84
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return 'const string' instead of 'const char *' from RGWOp::name() to avoid the usage of std::string:c_str() to return 'const char *' in some cases in rgw_rest_replica_log.h. Returning result of c_str() from a function is dangerous since the result gets (may) invalid after the related string object gets destroyed or out of scope (which is the case with return). So you may end up with garbage in this case. Related warning from cppcheck: [src/rgw/rgw_rest_replica_log.h:39]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call. [src/rgw/rgw_rest_replica_log.h:59]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call. [src/rgw/rgw_rest_replica_log.h:79]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call This should also fix: CID 1049250 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) escape: The internal representation of "s" escapes, but is destroyed when it exits scope. CID 1049251 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) escape: The internal representation of "s" escapes, but is destroyed when it exits scope. CID 1049252 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) escape: The internal representation of "s" escapes, but is destroyed when it exits scope. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | | Merge pull request #451 from dalgaaf/wip-da-SCA-cppcheck-6-v2Sage Weil2013-07-217-24/+24
|\ \ \ | |/ / |/| | | | | | | | | | | Fix some issues from SCA - v2 - against ceph:next Reviewed-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * | rgw/rgw_rest_s3.cc: fix dereferencing after deallocationDanny Al-Gaaf2013-07-161-1/+2
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | rgw/rgw_op.cc: reduce scope of local 'ret' integer variableDanny Al-Gaaf2013-07-161-2/+1
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | rgw/rgw_rados.cc: use static_cast instead of C-Style castDanny Al-Gaaf2013-07-161-2/+2
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>