Commit Graph

100549 Commits

Author SHA1 Message Date
Kefu Chai
6415160dbe
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>
2019-08-04 22:42:19 +08:00
Willem Jan Withagen
7acffc19c4 rbd-ggate: fix compile errors from ceph::mutex update
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-08-04 15:47:45 +02:00
Kefu Chai
26a5d7e850 install-deps.sh: use chacra for cmake repo
two reasons:

- do not rely on kitware repo so we have better control of the
  cmake3: the `debian` directory is tracked by
  https://github.com/tchaikov/ceph-cmake
- chacra repo also offers aarch64 build of cmake3

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-04 13:08:48 +08:00
Kefu Chai
eb3a998c2f 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>
2019-08-04 09:44:11 +08:00
Kefu Chai
fd67409912
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>
2019-08-04 00:58:13 +08:00
Willem Jan Withagen
691016dc12 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>
2019-08-03 17:04:46 +02:00
Kefu Chai
79b88eaf7c
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>
2019-08-03 20:25:39 +08:00
Kefu Chai
0fb6b3c776
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>
2019-08-03 20:16:24 +08:00
Kefu Chai
dc21fd028d common/Mutex: remove Mutex
as it's replaced by `ceph::mutex`

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:21 +08:00
Kefu Chai
57a3254f3d common/Cond.h: remove Cond
as it's replaced by ceph::condition_variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:21 +08:00
Kefu Chai
9eead2052b 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>
2019-08-03 11:27:21 +08:00
Kefu Chai
fbf91b4d03 common/ceph_context.cc: include necessary header
for using functions like `lockdep_unregister_ceph_context()`

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:21 +08:00
Kefu Chai
3a12e120da test/testmsgr: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:21 +08:00
Kefu Chai
757796c370 test/librados: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
067ab99798 test/compressor: do not include unused header
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
1af73d2a70 test/common/Throttle: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
8b6f0977a1 common/obj_bencher: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
a1a25d2d4f auth: remove unused forwarde declaration
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
e3e65af172 test/librados_test_stub: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
af0e1b4ec6 libcephfs: remove unused #include
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
778f96af53 cls_kvs: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
108fc27d78 crush: remove unused #include
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
15f13561d1 fusetrace: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
5ca9df3bb7 tools/rbd_nbd: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
6e7cfc1e30 tools/rbd_ggate: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
a7ac68d4fd tools/rbd: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
7e6e503627 tools/ceph_dedup_tool: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
85ab02b680 test/xattr_bench: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
251845cbfa test/test_snap_mapper: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
871ba4ebf3 test/osd: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
816709cda7 test/omap_bench: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
bfb8c741cd test/msgr: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
60de46ef04 test/admin_socket: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
b1f5565c2f kv: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
de68b2cbbc tools/rados: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
42f6597231 tools/immutable_object_cache: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
1fb8a60f23 tools/cephfs: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
4b64f16fe4 test/os/filestore: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
bf0142c6c9 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>
2019-08-03 11:27:20 +08:00
Kefu Chai
34cb0ebe5d test/perf_local: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:20 +08:00
Kefu Chai
9e1e84d9f7 test/osdc: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:19 +08:00
Kefu Chai
eb1dce5e4c test/objectstore: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:19 +08:00
Kefu Chai
ed5fc085b2 test/mon: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:19 +08:00
Kefu Chai
792d6c53fe test/librbd: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:19 +08:00
Kefu Chai
efee3ae5fb 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>
2019-08-03 11:27:19 +08:00
Kefu Chai
02292616a3 rgw: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:19 +08:00
Kefu Chai
a79837bcee librbd: s/Mutex/ceph::mutex/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-03 11:27:19 +08:00
Kefu Chai
f39b32ebfa 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>
2019-08-03 11:27:19 +08:00
Kefu Chai
2dbd31eb0b 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>
2019-08-03 11:27:19 +08:00
Kefu Chai
bb2a97000b 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>
2019-08-03 11:27:19 +08:00