| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
the supression comments must be directly above the line
where the issue is.
this is a followup on these commits:
edfb5b9049ee897779863d780bfbaa130a7fbc40
aca2668c88a048ab556c53411dcf2ccd43099d50
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If the lock expired, the stat check shouldn't return -ENOENT,
We will change the lock duration to prevent lock expired before the
stat check.
Fixes: https://tracker.ceph.com/issues/56575
Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
|
|
|
|
|
|
|
|
| |
Check if the lock was expired, if it is, unlock will return -ENOENT and not 0
that will cause the assert to error.
Fixes: https://tracker.ceph.com/issues/38357
Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
* add "std::" prefix in headers
* add "using" declarations in .cc files.
so we don't rely on "using namespace std" in one or more included
headers.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few name collisions between Windows headers and ceph.
Where possible, we'll update Ceph code to avoid redefinitions.
The following names overlap with Windows headers:
* ERROR, NO_ERROR
* DELETE
* LocalLock
* LOCK_SHARED, LOCK_EXCLUSIVE
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
|
|
|
|
|
|
|
|
| |
For backwards compatibility and upgrade reasons, the librados2
API needs to be preserved and it needs to continue to be compatible
with dependent libraries like librbd1.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is being added to better understand lock-contention issues in
running systems. Here are two sample log output lines:
2019-02-04 14:22:31.228 7f06abb59700 20 <cls>
/somedir/ceph/src/cls/lock/cls_lock.cc:221: could not exclusive-lock
object, already locked by [{name:client.4139,
addr:v1:127.0.0.1:0/2034495868, exp:2019-02-04 14:24:31.0.22272s}]
2019-02-04 14:22:37.219 7f06abb59700 20 <cls>
/somedir/ceph/src/cls/lock/cls_lock.cc:221: could not exclusive-lock
object, already locked by [{name:client.4147,
addr:v1:127.0.0.1:0/141966515, exp:never}]
Fixes: http://tracker.ceph.com/issues/38171
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the goal is to decouple C++ API from C API, and to version them
differently, as they are targeting different consumers.
this allows us to change the C++ API and bumping up its soversion
without requiring consumer to recompile the librados client for
using the new librados. in this way, C++ API can move faster than
C API. for example, if bufferlist interface is changed for better
performance, and this breaks existing API/ABI, we can bump up
the C++ library's soversion, and and the C library's version unchanged
but ship the new librados's C binding. so the librados client linked
against librados's C library will be able to take advantage of
the improvement in C++ library. while the librados client
linked against C++ library won't break at runtime due to unresolved
symbol or changed structure layout.
this is massive change, the genereal idea is to
* split librados.cc into two source files: librados_c.cc and
librados_cxx.cc, the former for implementing C APIs, the later
for C++ APIs.
* extract the C++ API in librados into librados-cxx, the library
name will be libradospp. but we can change it before nautilus
is released.
* link these librados libraries with static libraries which it
depends on, so "-Wl,--exclude-libs,ALL" link flags can help
hide the non-public symbols.
* extract the tests exercising librados' C++ API into a different
source file named *_cxx.cc. for instance, to move the C++ tests
in aio.cc into aio_cxx.cc
* extract the shared helper functions which do not use any librados
or librados-cxx APIs into test_shared{.cc,h}. the "shared" here
means, *shared* by C++ and C tests.
* extract the test fixtures, i.e., the subclasses of testing::Test,
for testing C++ APIs into testcase_cxx.cc.
* update qa/workunits/rados/test.sh accordingly to add the splitted
tests
* update the consumers of librados to link against librados-cxx
instead, if they are using the C++ API.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Add a new type of cls lock -- exclusive ephemeral for which the
object only exists to represent the lock and for which the object
should be deleted at unlock. This is to prevent the accumulation of
unneeded objects in the cluster by automatically cleaning them up.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add ability to *require* renewal of an existing lock in addition
toexisting ability to *allow* renewal of an existing lock. The key
difference is that a MUST_RENEW will fail if the lock has expired
(where a MAY_RENEW) will succeed. This provides calling code with the
ability to verify that a lock is held continually and that it was
never lost/expired.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add FindGMock.cmake which allows user to use the libgtest-dev
shipped by distro
* add GMock::{GMock,Main}, GTest::{GTest,Main} targets to be
compatible with FindGTest.cmake and FindGMock.cmake, which
expose the built libraries with properties adhered to
them. so the consumer of them can import them in a better way.
* update tests to drop the commands like
set_target_properties(foo PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}),
as they are already linked against gmock and gtest.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The following warning appears during make for several files in the test submodule:
warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
Fixed the review comment too.
Signed-off-by: Jos Collin <jcollin@redhat.com>
|
|
|
|
|
|
|
|
| |
In preparation to deglobalizing CephContext, remove the CephContext*
parameter to ceph_clock_now() and ceph::real_clock::now() that carries
a configurable offset.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/17015
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
| |
they are used by qa units and some other ceph-qa-suite tasks.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
| |
they should link against cls_${name}_client, instead of against
cls_${name} directly.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
| |
Added a CMakeLists.txt into test/cls_lock.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The assert_locked operation can be combined with other
RADOS ops to prevent an update to a locked object when
the client doesn't own the lock. It will not attempt to
acquire the lock if the object is not currently locked.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
It's possible for us to just be really slow when getting the reply to the
first op or doing the second op, resulting in a successful lock. If we
do get a success, assert that at least that amount of time has passed to
avoid any false positives.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
Signed-off-by: Sage Weil <sage@inktank.com>
|