common: Clang requires a default constructor, but it can be empty
Just do what the error messages ask for.
Error from Clang:
```
In file included from /home/jenkins/workspace/ceph-master/src/cls/rbd/cls_rbd.cc:28:
In file included from /home/jenkins/workspace/ceph-master/src/objclass/../include/types.h:21:
In file included from /home/jenkins/workspace/ceph-master/src/include/uuid.h:9:
In file included from /home/jenkins/workspace/ceph-master/src/include/encoding.h:17:
In file included from /usr/include/c++/v1/set:426:
In file included from /usr/include/c++/v1/__tree:16:
/usr/include/c++/v1/memory:2241:41: error: call to implicitly-deleted default constructor of '__compressed_pair_elem<ceph::BitVector<'\x02'>::NoInitAllocator, 1>'
: _Base1(std::forward<_Tp>(__t)), _Base2() {}
^
/usr/include/c++/v1/vector:437:7: note: in instantiation of function template specialization 'std::__1::__compressed_pair<unsigned int *, ceph::BitVector<'\x02'>::NoInitAllocator>::__compressed_pair<nullptr_t, true>' requested here
__end_cap_(nullptr)
^
/usr/include/c++/v1/vector:496:5: note: in instantiation of member function 'std::__1::__vector_base<unsigned int, ceph::BitVector<'\x02'>::NoInitAllocator>::__vector_base' requested here
vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
^
/home/jenkins/workspace/ceph-master/src/common/bit_vector.hpp:163:3: note: in instantiation of member function 'std::__1::vector<unsigned int, ceph::BitVector<'\x02'>::NoInitAllocator>::vector' requested here
BitVector();
^
/home/jenkins/workspace/ceph-master/src/cls/rbd/cls_rbd.cc:3289:16: note: in instantiation of member function 'ceph::BitVector<'\x02'>::BitVector' requested here
BitVector<2> object_map;
^
/usr/include/c++/v1/memory:2179:39: note: explicitly defaulted function was implicitly deleted here
_LIBCPP_INLINE_VISIBILITY constexpr __compressed_pair_elem() = default;
^
/usr/include/c++/v1/memory:2172:50: note: default constructor of '__compressed_pair_elem<ceph::BitVector<'\x02'>::NoInitAllocator, 1, true>' is implicitly deleted because base class 'ceph::BitVector<'\x02'>::NoInitAllocator' has no default constructor
struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
^
1 error generated.
```
Fixes: http://tracker.ceph.com/issues/39561 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Jason Dillaman [Fri, 19 Apr 2019 18:46:02 +0000 (14:46 -0400)]
librbd: removed 'ImageCtx::md_lock'
This lock used to protect the IO pathway to prevent writes but
that is now handled by the io::ImageRequestWQ. Additional
historical uses have been temporarily moved to the
'ImageCtx::image_lock'
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Fri, 26 Apr 2019 15:40:31 +0000 (10:40 -0500)]
Merge PR #27655 into master
* refs/pull/27655/head:
common/options: flag misc ms_* options STARTUP
common/options: flag misc options STARTUP
common/options: mark cluster log options with FLAG_RUNTIME, use get_val
common/options: mark a bunch of options with FLAG_STARTUP
osd/PG: do not use approx_missing_objects pre-nautilus
We changed async recovery cost calculation in nautilus to also take
into account approx_missing_objects in ab241bf7e927cda2d0ed1698383d18dc4a4b601c
This commit depends on https://github.com/ceph/ceph/pull/23663, hence
wasn't backported to mimic.
Mimic only uses the difference in length of logs as the cost. Due to this,
the same OSD might have different costs in a mixed mimic and nautilus(or above)
cluster. This can lead to choose_acting() cycling between OSDs, when trying
to select the acting set and async_recovery_targets.
David Zafman [Thu, 18 Apr 2019 02:41:58 +0000 (19:41 -0700)]
mgr: If the requested OSD is down don't trust osd_stat info
If we have a down AND out OSD it may contains osd_stat with num_pgs == 0.
When all PGs aren't active+clean we need an accurate value or we consider
the osd missing stat info.
Fixes: https://tracker.ceph.com/issues/38930 Signed-off-by: David Zafman <dzafman@redhat.com>
Sage Weil [Thu, 25 Apr 2019 15:49:04 +0000 (10:49 -0500)]
os/bluestore: correctly measure deferred writes into new blobs
Writes into new blobs were all counted as write_small_new, but those can
still be deferred later in _do_alloc_write if they are <= than the
prefer_deferred setting.
librbd: the first post-migration snapshot isn't always dirty
Currently, the first post-migration snapshot is always marked EXISTS
(i.e. dirty). This is wrong, because the data can be inherited from
a pre-migration snapshot, handled by deep copy.
Mark all post-migration snapshots EXISTS_CLEAN in this case.
librbd: don't update snapshot object maps if copyup data is all zeros
If the data read from the parent is all zeros, deep copyup isn't
performed. However snapshot object maps are updated unconditionally,
causing inconsistencies where nonexistent objects are marked
OBJECT_EXISTS or OBJECT_EXISTS_CLEAN.
Changcheng Liu [Thu, 25 Apr 2019 05:10:54 +0000 (13:10 +0800)]
msg/async/rdma: use ibv_device_attr object type in Device class
1. Avoid to do memory management without using pointer to operate the
allocated space.
2. Since member type has been changed in class Device, it use member
domain operator "." to access to the sub-member in object.
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
Changcheng Liu [Thu, 25 Apr 2019 05:02:29 +0000 (13:02 +0800)]
msg/async/rdma: check allocated memory immediately before using it
The new "allocation functions" will through exception if it failes to
allocate space. There's no need to assert(devices) here for every
get_device operation.
Refer to: https://en.cppreference.com/w/cpp/memory/new/bad_alloc
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
Sage Weil [Wed, 24 Apr 2019 22:00:57 +0000 (17:00 -0500)]
Merge PR #27566 into master
* refs/pull/27566/head:
auth: kill AuthUnknownSessionHandler
auth: kill AuthUnknown* (except AuthUnknownSessionHandler)
msg: remove old ms_* auth methods from Dispatcher interface
mon/MonClient: discard old challenge if authorizer is bad
msg/async/ProtocolV1: use AuthServer and AuthClient
mon/Monitor: handle v1 call into handle_auth_request
msg/Connection: add is_msgr2()
mon/MonClient: tolerate lack of authorizer for some dispatchers
Sage Weil [Fri, 12 Apr 2019 21:22:04 +0000 (16:22 -0500)]
auth: kill AuthUnknownSessionHandler
The only user is ProtocolV1, which passes in an in-use auth_method...
which must be either AUTH_NONE or AUTH_CEPHX since we successfully
authenticated at this point.
Sage Weil [Tue, 23 Apr 2019 18:52:07 +0000 (13:52 -0500)]
mon/MonClient: discard old challenge if authorizer is bad
If we are a server/accepter, and we get a bad authorizer, discard our old
challenge, since the previous exchange has failed. This way if the client
retries, their new authorize attempt won't conflict with our old challenge.
Sage Weil [Wed, 24 Apr 2019 13:15:19 +0000 (08:15 -0500)]
Merge PR #27696 into master
* refs/pull/27696/head:
osd: make use of pg history and past_intervals in pg_create2 messages
mon/OSDMonitor: track history and past_intervals for creating pgs
osd/osd_types: make PastIntervals pi_compact_rep print participants
osd/osd_types: take bare const OSDMap * to check_new_interval
osd/osd_types: add pg_history_t ctor that takes creation epoch+stamp