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>
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>
`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>
* 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>
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>
* 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>
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>
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>