When loading an onode from kraken we have a compat path that calls
get_ref before the SharedBlob pointer is initialized. This is fine except
that if debugging is enabled the operator<< on the Blob will segv on
printing *b.shared_blob (which is NULL).
Fix operator<< to print something else if it is NULL. shared_blob does
get set up right after the call to decode() so having it be NULL at this
point is otherwise harmless.
Fixes: http://tracker.ceph.com/issues/20977
Signed-off-by: Sage Weil <sage@redhat.com>
If we are cloning a blob for a 1 byte logical extent then dirty_range_begin
will equal _end and we won't dirty the source onode (with possibly newly
shared blobs).
Fix by using a separate flag to indicate whether we are dirtying instead
of overloading the begin/end markers for this. Note that even if they
are equal dirty_range will still dirty the shard in question.
This is a result of 0ae5d92d42.
Fixes: http://tracker.ceph.com/issues/20983
Signed-off-by: Sage Weil <sage@redhat.com>
With all upgrades passing through luminous, we can now start
reusing bits retired in luminous. Our sentinel bitmask will be the
combination of SERVER_MIMIC and SERVER_JEWEL (i.e.,
CEPH_FEATUREMASK_SERVER_MIMIC).
Signed-off-by: Sage Weil <sage@redhat.com>
When we build the shadow buckets for the class hierarchies, we need
to fill in the weight-sets for each shadow bucket too.
Skip the ids vector for now since it's not yet used by anything.
Fixes: http://tracker.ceph.com/issues/20939
Signed-off-by: Sage Weil <sage@redhat.com>
msg/async/rdma: fix the bug that rdma polling thread uses the same thread name with msg worker
Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Pan Liu <liupan1111@gmail.com>
Fixes the coverity issues:
** 717271 Uninitialized scalar field
2. uninit_member: Non-static class member from_mds is not initialized
in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member dir_rep is not initialized
in this constructor nor in any functions that it calls.
CID 717271 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member discover is not initialized
in this constructor nor in any functions that it calls.
** 717272 Uninitialized scalar field
2. uninit_member: Non-static class member want_base_dir is not initialized
in this constructor nor in any functions that it calls.
CID 717272 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member want_xlocked is not initialized
in this constructor nor in any functions that it calls.
** 717274 Uninitialized scalar field
2. uninit_member: Non-static class member wanted_base_dir is not initialized
in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member wanted_xlocked is not initialized
in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member flag_error_dn is not initialized
in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member flag_error_dir is not initialized
in this constructor nor in any functions that it calls.
10. uninit_member: Non-static class member unsolicited is not initialized
in this constructor nor in any functions that it calls.
12. uninit_member: Non-static class member dir_auth_hint is not initialized
in this constructor nor in any functions that it calls.
CID 717274 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
14. uninit_member: Non-static class member starts_with is not initialized
in this constructor nor in any functions that it calls.
** 717275 Uninitialized scalar field
CID 717275 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member from is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Amit Kumar amitkuma@redhat.com
when mon_health_to_clog was set false, all health events was cleanup,
no need to judge the change of mon_health_to_clog_interval and
mon_health_to_clog_tick_interval.
Signed-off-by: wang yang <yang.wang@easystack.cn>
fio creates multiple CephContext in a single process.
Crash(es) happen because rdma stack has a global resources that
are still used from one ceph context while have already been destroyed
by another context.
The commit removes global instances of RDMA dispatcher and infiniband
and makes them context (rdma stack) specific.
Signed-off-by: Adir Lev <adirl@mellanox.com>
Signed-off-by: Alex Mikheev <alexm@mellanox.com>
Increase delay so daemonized process can make progress and write/lock pidfile
Add --log_flush_on_exit to ensure log gets flushed for TEST_without_pidfile test
Fixes: http://tracker.ceph.com/issues/20770
Signed-off-by: David Zafman <dzafman@redhat.com>
In 076a6abd80 I killed the 'class rename' command
and thought it was totally useless but I was wrong.
Consider the following user case:
(1) randomly choose some OSDs(e.g., from different hosts) and try to make them for private use only,
say, by grouping them into 'pool1'
(2) ceph osd crush set-device-class pool1 'OSDs from (1)'
(3) ceph osd crush rule create-replicated rule_for_pool1 default host pool1
(4) ceph osd pool rename pool1 pool2
(5) ceph osd crush class rename pool1 pool2
From the above user case, we need to safely change a pool name without worrying
any risk of data migration. That is why the 'osd crush class rename' command
is still needed here.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
The trigger_scrub sets the last_scrub_stamp backwards to
force a scheduled scrub. In a small window this stamp could get propagated
to the mgr. A test failure occurred because wait_for_scrub() was confused
by seeing a backward moving date.
The most critical change is having wait_for_scrub() make sure that the
date advances past the previous in value.
A test failed because the random backoff kept delayed triggered scrub, so
set osd_scrub_backoff throughout.
Signed-off-by: David Zafman <dzafman@redhat.com>