]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agocrimson/osd/heartbeat: adapt to new MOSDPing fields
Sage Weil [Mon, 22 Jul 2019 17:00:17 +0000 (12:00 -0500)]
crimson/osd/heartbeat: adapt to new MOSDPing fields

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrimson/osdmap_service: add get_mnow(), get_up_epoch()
Sage Weil [Mon, 22 Jul 2019 16:58:40 +0000 (11:58 -0500)]
crimson/osdmap_service: add get_mnow(), get_up_epoch()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd/PeeringState: take HeartbeatStamps refs for current interval
Sage Weil [Thu, 18 Jul 2019 19:28:33 +0000 (14:28 -0500)]
osd/PeeringState: take HeartbeatStamps refs for current interval

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: track clock delta between peer OSDs
Sage Weil [Mon, 17 Jun 2019 18:55:56 +0000 (13:55 -0500)]
osd: track clock delta between peer OSDs

We need to keep track of the monotonic clock deltas between peer OSDs in
order to be able to exchange timestamps across messages.  We need an
upper and lower bound on this delta, depending on the context where it is
used.

We can use the existing ping messages to get this by assuming that a ping
message is sent instantly to get a bound, and to share our delta in a
follow-up reply to share the other bound.  The ping sender will get both
bounds with a single ping + ping_reply exchange.  The ping receiver will
get the delta value from the next round's ping.

Include up_from in the ping messages to ensure we don't mix up different
instances of the same OSD.

Signed-off-by: Sage Weil <sage@inktank.com>
6 years agoosd: add get_mnow() interface to OSDService, PG, PeeringState
Sage Weil [Thu, 18 Jul 2019 19:27:54 +0000 (14:27 -0500)]
osd: add get_mnow() interface to OSDService, PG, PeeringState

Single helper to provide a monotonic time offset from startup_time.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: record startup_time
Sage Weil [Mon, 8 Jul 2019 22:28:01 +0000 (17:28 -0500)]
osd: record startup_time

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: some minor refactoring/cleanup in handle_osd_ping
Sage Weil [Tue, 18 Jun 2019 13:30:02 +0000 (08:30 -0500)]
osd: some minor refactoring/cleanup in handle_osd_ping

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #29337 into master
Sage Weil [Mon, 5 Aug 2019 18:08:53 +0000 (13:08 -0500)]
Merge PR #29337 into master

* refs/pull/29337/head:
mon: enable telemetry module by default
mgr/telemetry: force re-opt-in if the report contents change
mgr/telemetry: less noise in the log
mgr/telemetry: wake up serve on config change
mgr/telemetry: track telemetry report revisions

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoMerge pull request #29457 from tchaikov/wip-consolidate-run-tox
Kefu Chai [Mon, 5 Aug 2019 17:52:31 +0000 (01:52 +0800)]
Merge pull request #29457 from tchaikov/wip-consolidate-run-tox

cmake: one run_tox.sh to rule them all

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
6 years agoscript/run_tox.sh: add --help option 29457/head
Kefu Chai [Mon, 5 Aug 2019 16:45:43 +0000 (00:45 +0800)]
script/run_tox.sh: add --help option

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #29492 into master
Patrick Donnelly [Mon, 5 Aug 2019 16:10:28 +0000 (09:10 -0700)]
Merge PR #29492 into master

* refs/pull/29492/head:
doc: Fix for new ceph-devel mailing list

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
6 years agocmake: pass tox envs to run_tox.sh explicitly
Kefu Chai [Mon, 5 Aug 2019 15:37:52 +0000 (23:37 +0800)]
cmake: pass tox envs to run_tox.sh explicitly

* add two optional keyword parameters to `add_tox_test()`
* use the default `TOX_PATH` parameter instead passing it explicitly,
  as it is always `${CMAKE_CURRENT_SOURCE_DIR}`
* drop the code to guess the tox envs in `run_tox.sh`, and always pass
  them explicitly in CMake script using the `--tox-envs` argument.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29471 from tchaikov/wip-googletest
Kefu Chai [Mon, 5 Aug 2019 15:59:08 +0000 (23:59 +0800)]
Merge pull request #29471 from tchaikov/wip-googletest

googletest: pick up change to suppress CMP0048 warning

Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agodoc: Fix for new ceph-devel mailing list 29492/head
David Zafman [Thu, 1 Aug 2019 21:33:12 +0000 (14:33 -0700)]
doc: Fix for new ceph-devel mailing list

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agoMerge pull request #29458 from mikulely/rgw-drop-flush
Casey Bodley [Mon, 5 Aug 2019 14:25:43 +0000 (10:25 -0400)]
Merge pull request #29458 from mikulely/rgw-drop-flush

rgw: drop dead flush_read_list declaration

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #27675 from jan--f/c-v-console-logging-to-stderr
Alfredo Deza [Mon, 5 Aug 2019 12:12:29 +0000 (08:12 -0400)]
Merge pull request #27675 from jan--f/c-v-console-logging-to-stderr

ceph-volume: print most logging messages to stderr

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Alfredo Deza <adeza@redhat.com>
6 years agocmake: move tests to where they are implemented
Kefu Chai [Sun, 4 Aug 2019 06:52:50 +0000 (14:52 +0800)]
cmake: move tests to where they are implemented

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocmake: do not add gtest-parallel_ext if already added
Kefu Chai [Mon, 5 Aug 2019 01:41:28 +0000 (09:41 +0800)]
cmake: do not add gtest-parallel_ext if already added

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocmake: use script/run_tox.sh for running tox for dashboard
Kefu Chai [Fri, 2 Aug 2019 05:26:36 +0000 (13:26 +0800)]
cmake: use script/run_tox.sh for running tox for dashboard

* adapt script/run_tox.sh to use different envs for dashboard's tox
  test.
* use script/run_tox.sh for running dashboard's tox test
* remove pybind/mgr/dashboard/run-tox.sh

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocmake/modules/AddCephTest.cmake: make ${name}-venv a target
Kefu Chai [Sun, 4 Aug 2019 06:31:03 +0000 (14:31 +0800)]
cmake/modules/AddCephTest.cmake: make ${name}-venv a target

so we can prepare the venv for tox with `make tests`. and it's optional,
as run_tox.sh will check for it and setup a venv if it's not around.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agosrc: remove unused run-tox.sh
Kefu Chai [Fri, 2 Aug 2019 04:40:02 +0000 (12:40 +0800)]
src: remove unused run-tox.sh

they are not used anymore after b9c9f74f

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29393 from ifed01/wip-ifed-bluestore-header-cleanup
Igor Fedotov [Mon, 5 Aug 2019 10:42:15 +0000 (13:42 +0300)]
Merge pull request #29393 from ifed01/wip-ifed-bluestore-header-cleanup

os/bluestore: remove unused _tune_cache_size() method declaration

Reviewed-by: Mark Nelson <mnelson@redhat.com>
6 years agomgr/dashboard: update npm packages (#28343)
Lenz Grimmer [Mon, 5 Aug 2019 10:20:20 +0000 (12:20 +0200)]
mgr/dashboard: update npm packages (#28343)

mgr/dashboard: update npm packages

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
6 years agoMerge pull request #29403 from rhcs-dashboard/wip-41013-master
Kefu Chai [Mon, 5 Aug 2019 10:07:39 +0000 (18:07 +0800)]
Merge pull request #29403 from rhcs-dashboard/wip-41013-master

install-deps.sh: remove failing error catching

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29476 from tchaikov/wip-test/journal-close-object
Kefu Chai [Mon, 5 Aug 2019 09:37:33 +0000 (17:37 +0800)]
Merge pull request #29476 from tchaikov/wip-test/journal-close-object

test/journal: always close object

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
6 years agotest/journal: always close object 29476/head
Kefu Chai [Sun, 4 Aug 2019 14:48:31 +0000 (22:48 +0800)]
test/journal: always close object

otherwise when we destruct `TestObjectRecorder::Handler::lock` or
`journal::JournalRecorder::m_object_locks`, it/they would be still
being waited by some condition variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29474 from wjwithagen/wjw-fix-rbd_ggate_Server.cc
Kefu Chai [Sun, 4 Aug 2019 14:42:19 +0000 (22:42 +0800)]
Merge pull request #29474 from wjwithagen/wjw-fix-rbd_ggate_Server.cc

rbd-ggate: fix compile errors from ceph::mutex update

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agorbd-ggate: fix compile errors from ceph::mutex update 29474/head
Willem Jan Withagen [Sat, 3 Aug 2019 20:48:03 +0000 (22:48 +0200)]
rbd-ggate: fix compile errors from ceph::mutex update

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
6 years agogoogletest: pick up change to suppress CMP0048 warning 29471/head
Kefu Chai [Sat, 3 Aug 2019 13:25:05 +0000 (21:25 +0800)]
googletest: pick up change to suppress CMP0048 warning

newer cmake complains about googletest should have set CMP0048

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29472 from wjwithagen/wjw-fix-src/osdc/ObjectCacher.cc
Kefu Chai [Sat, 3 Aug 2019 16:58:13 +0000 (00:58 +0800)]
Merge pull request #29472 from wjwithagen/wjw-fix-src/osdc/ObjectCacher.cc

osdc: Fix a missing ':' for the correct namespace

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoosdc: Fix a missing ':' for the correct namespace 29472/head
Willem Jan Withagen [Sat, 3 Aug 2019 15:04:46 +0000 (17:04 +0200)]
osdc: Fix a missing ':' for the correct namespace

Clang complains:
/home/jenkins/workspace/ceph-master/src/osdc/ObjectCacher.cc:1848:22: error: no viable constructor or deduction guide for deduction of template arguments of 'unique_lock'
    std::unique_lock l{lock, std:adopt_lock};

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
6 years agoMerge pull request #29322 from rzarzynski/wip-objclass-cleanup
Kefu Chai [Sat, 3 Aug 2019 12:25:39 +0000 (20:25 +0800)]
Merge pull request #29322 from rzarzynski/wip-objclass-cleanup

objclass, osd: clean up the cls-host interface. Turn ClassHandler into singleton

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29113 from tchaikov/wip-ceph-mutex
Kefu Chai [Sat, 3 Aug 2019 12:16:24 +0000 (20:16 +0800)]
Merge pull request #29113 from tchaikov/wip-ceph-mutex

src/: s/Mutex/ceph::mutex/

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agocommon/Mutex: remove Mutex 29113/head
Kefu Chai [Mon, 22 Jul 2019 07:07:06 +0000 (15:07 +0800)]
common/Mutex: remove Mutex

as it's replaced by `ceph::mutex`

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/Cond.h: remove Cond
Kefu Chai [Mon, 22 Jul 2019 06:49:49 +0000 (14:49 +0800)]
common/Cond.h: remove Cond

as it's replaced by ceph::condition_variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoosd/PG: support is_locked() in non-debug mode
Kefu Chai [Sat, 20 Jul 2019 11:34:02 +0000 (19:34 +0800)]
osd/PG: support is_locked() in non-debug mode

`PG` print details info in the prefix of logging messages if the PG is
being locked by current thread. but `ceph::mutex` is an alias of
`std::mutex` in non-debug mode, so neither `mutex::is_locked_by_me()` nor
`mutex::is_locked()` is supported in non-debug mode. to continue supporting
this feature, `PG::locked_by` is added to memorize the thread id of the owner
of the lock.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/ceph_context.cc: include necessary header
Kefu Chai [Fri, 19 Jul 2019 16:21:04 +0000 (00:21 +0800)]
common/ceph_context.cc: include necessary header

for using functions like `lockdep_unregister_ceph_context()`

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/testmsgr: s/Mutex/ceph::mutex/
Kefu Chai [Thu, 18 Jul 2019 13:38:02 +0000 (21:38 +0800)]
test/testmsgr: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/librados: s/Mutex/ceph::mutex/
Kefu Chai [Thu, 18 Jul 2019 13:34:40 +0000 (21:34 +0800)]
test/librados: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/compressor: do not include unused header
Kefu Chai [Thu, 18 Jul 2019 13:33:23 +0000 (21:33 +0800)]
test/compressor: do not include unused header

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/common/Throttle: s/Mutex/ceph::mutex/
Kefu Chai [Thu, 18 Jul 2019 13:33:14 +0000 (21:33 +0800)]
test/common/Throttle: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/obj_bencher: s/Mutex/ceph::mutex/
Kefu Chai [Thu, 18 Jul 2019 13:28:43 +0000 (21:28 +0800)]
common/obj_bencher: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoauth: remove unused forwarde declaration
Kefu Chai [Thu, 18 Jul 2019 13:28:21 +0000 (21:28 +0800)]
auth: remove unused forwarde declaration

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/librados_test_stub: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 13:18:40 +0000 (21:18 +0800)]
test/librados_test_stub: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agolibcephfs: remove unused #include
Kefu Chai [Wed, 17 Jul 2019 13:17:36 +0000 (21:17 +0800)]
libcephfs: remove unused #include

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocls_kvs: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 13:17:07 +0000 (21:17 +0800)]
cls_kvs: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocrush: remove unused #include
Kefu Chai [Wed, 17 Jul 2019 13:16:20 +0000 (21:16 +0800)]
crush: remove unused #include

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agofusetrace: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 09:02:31 +0000 (17:02 +0800)]
fusetrace: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/rbd_nbd: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:31:42 +0000 (16:31 +0800)]
tools/rbd_nbd: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/rbd_ggate: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:31:07 +0000 (16:31 +0800)]
tools/rbd_ggate: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/rbd: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:30:56 +0000 (16:30 +0800)]
tools/rbd: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/ceph_dedup_tool: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:30:02 +0000 (16:30 +0800)]
tools/ceph_dedup_tool: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/xattr_bench: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:29:50 +0000 (16:29 +0800)]
test/xattr_bench: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/test_snap_mapper: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:29:36 +0000 (16:29 +0800)]
test/test_snap_mapper: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/osd: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:28:43 +0000 (16:28 +0800)]
test/osd: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/omap_bench: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:28:33 +0000 (16:28 +0800)]
test/omap_bench: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/msgr: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:28:11 +0000 (16:28 +0800)]
test/msgr: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/admin_socket: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:26:36 +0000 (16:26 +0800)]
test/admin_socket: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agokv: s/Mutex/ceph::mutex/
Kefu Chai [Wed, 17 Jul 2019 08:25:09 +0000 (16:25 +0800)]
kv: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/rados: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:45:15 +0000 (12:45 +0800)]
tools/rados: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/immutable_object_cache: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:45:01 +0000 (12:45 +0800)]
tools/immutable_object_cache: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/cephfs: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:44:47 +0000 (12:44 +0800)]
tools/cephfs: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/os/filestore: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:44:27 +0000 (12:44 +0800)]
test/os/filestore: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotools/rbd_mirror: s/Mutex/ceph::Formatter/
Kefu Chai [Fri, 19 Jul 2019 17:13:38 +0000 (01:13 +0800)]
tools/rbd_mirror: s/Mutex/ceph::Formatter/

* s/Formatter/ceph::Formatter/ in tools/rbd_mirror/ImageSyncThrottler,
  as we cannot rely on `using ceph` or `using ceph::Formatter` in
  some other included header files.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/perf_local: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:43:32 +0000 (12:43 +0800)]
test/perf_local: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/osdc: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:43:18 +0000 (12:43 +0800)]
test/osdc: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/objectstore: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:43:04 +0000 (12:43 +0800)]
test/objectstore: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/mon: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:42:36 +0000 (12:42 +0800)]
test/mon: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/librbd: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:42:23 +0000 (12:42 +0800)]
test/librbd: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest/journal: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:41:22 +0000 (12:41 +0800)]
test/journal: s/Mutex/ceph::mutex/

as we cannot create a `smart_pointer<ceph::mutex>` due to limitation of
`ceph::make_mutex()`, we need to refactor `TestObjectRecorder` to remove
its `TearDown()` method, as when `TearDown()` is called, all local
variables have been destroyed, including the `ceph::mutex` instances. so
we need to introduce a helper of `ObjectRecorderFlusher`, to flush the
objects before `mutex` instances are destroyed. to simplify the
interfaces, it flushes in its dtor. so its lifecycle should be shorter
than those of mutexes. that's why, mutexes are created before `flusher`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agorgw: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:40:52 +0000 (12:40 +0800)]
rgw: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agolibrbd: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:38:40 +0000 (12:38 +0800)]
librbd: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agojournal: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:35:23 +0000 (12:35 +0800)]
journal: s/Mutex/ceph::mutex/

* FutureImpl::m_lock is an exception. as, before this change, the lock
  was initialized like `m_lock("FutureImpl::m_lock", false, false)`, see
  the declaration of
  `Mutex(const std::string &n, bool r = false, bool ld=true, bool bt=false)`
  so `m_lock` is actually not using the extra features offered by
  `Mutex` like runtime lockdeps check. and `mutex_debugging_base` does
  not allow us to disable lockdeps individually. but it does use the `is_locked()`
  method. so instead of using `ceph::mutex` directly, a cutomized
  `ceph::mutex` is added for `CEPH_DEBUG_MUTEX` build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/mutex_debug: add lockdep parameter to mutex's ctor
Kefu Chai [Thu, 25 Jul 2019 16:32:57 +0000 (00:32 +0800)]
common/mutex_debug: add lockdep parameter to mutex's ctor

so we can disable lockdep when constructing a ceph::mutex. otherwise
it's difficult to use the locks from standard library and to use
`ceph_assert(ceph_mutex_is_locked(lock))` at the same time.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/mutex_debug.h: pass "no_lockdep" to try_lock()
Kefu Chai [Sat, 20 Jul 2019 16:41:18 +0000 (00:41 +0800)]
common/mutex_debug.h: pass "no_lockdep" to try_lock()

there is chance that we want to disable lockdep, so we shold pass
`no_lockdep` down to `try_lock()` in `lock()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoinclude/Context: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:34:19 +0000 (12:34 +0800)]
include/Context: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoerasure-code: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 04:33:41 +0000 (12:33 +0800)]
erasure-code: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/ceph_mutex: add more ceph_mutex_is_*() helpers
Kefu Chai [Sun, 7 Jul 2019 08:17:35 +0000 (16:17 +0800)]
common/ceph_mutex: add more ceph_mutex_is_*() helpers

we have caller sites like

ceph_assert(!client->client_lock.is_locked_by_me())

in `src/client/Client.cc` and `src/librados/RadosClient.cc`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/ceph_mutex: improve ceph::shared_mutex
Kefu Chai [Sun, 7 Jul 2019 04:32:53 +0000 (12:32 +0800)]
common/ceph_mutex: improve ceph::shared_mutex

add helpers for supporting `ceph_mutex_is_locked()` and
`ceph_mutex_is_wlocked()` macros

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/Timer: add necessary #include
Kefu Chai [Sun, 7 Jul 2019 03:24:42 +0000 (11:24 +0800)]
common/Timer: add necessary #include

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/RWLock: add RWLock::{lock,unlock}_shared()
Kefu Chai [Sun, 7 Jul 2019 03:21:12 +0000 (11:21 +0800)]
common/RWLock: add RWLock::{lock,unlock}_shared()

so RWLock can be used with std::shared_lock,

rgw is using RWLock'prioritize_write feature, which is not offered by
std::shared_mutex, but we want to unify the way we use mutex, so add
these helper functions.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:20:13 +0000 (11:20 +0800)]
common: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/HeartbeatMap.cc: include necessary header
Kefu Chai [Sun, 7 Jul 2019 03:19:42 +0000 (11:19 +0800)]
common/HeartbeatMap.cc: include necessary header

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/Cond.h: include necessary header
Kefu Chai [Sun, 7 Jul 2019 03:19:26 +0000 (11:19 +0800)]
common/Cond.h: include necessary header

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocls/rgw: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:18:41 +0000 (11:18 +0800)]
cls/rgw: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agomds: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:18:14 +0000 (11:18 +0800)]
mds: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoosdc: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:16:20 +0000 (11:16 +0800)]
osdc: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoosd: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:16:03 +0000 (11:16 +0800)]
osd: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoos: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:15:41 +0000 (11:15 +0800)]
os: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agomsg: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:15:22 +0000 (11:15 +0800)]
msg: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agomon: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:15:03 +0000 (11:15 +0800)]
mon: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agomgr: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:14:49 +0000 (11:14 +0800)]
mgr: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agolibrados: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:14:32 +0000 (11:14 +0800)]
librados: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoinclude/utime: add utime_t<>(duration)
Kefu Chai [Sun, 7 Jul 2019 03:13:46 +0000 (11:13 +0800)]
include/utime: add utime_t<>(duration)

to ease the conversion from chrono durations to utime_t

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoinclude/C_Lock: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:12:28 +0000 (11:12 +0800)]
include/C_Lock: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/condition_variable_debug: fix wait_until()
Kefu Chai [Sun, 7 Jul 2019 03:09:36 +0000 (11:09 +0800)]
common/condition_variable_debug: fix wait_until()

to_timespec() is not a member function of time_point, it is a member
funcion of real_clock / coarse_real_clock.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/timer: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:07:38 +0000 (11:07 +0800)]
common/timer: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoclient: s/Mutex/ceph::mutex/
Kefu Chai [Sun, 7 Jul 2019 03:06:13 +0000 (11:06 +0800)]
client: s/Mutex/ceph::mutex/

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #29291 from tchaikov/wip-cmake-cleanups
Kefu Chai [Sat, 3 Aug 2019 00:46:17 +0000 (08:46 +0800)]
Merge pull request #29291 from tchaikov/wip-cmake-cleanups

cmake: require CMake v3.10.2

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoinstall-deps.sh: remove failing error catching 29403/head
Ernesto Puerta [Tue, 30 Jul 2019 16:45:44 +0000 (18:45 +0200)]
install-deps.sh: remove failing error catching

Fixes: https://tracker.ceph.com/issues/41013
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>