Previously, we simply added the old extent to the retired set and
treated the new instance seperately. Instead, let the new pending
instance reference the old instance via a prior_instance reference.
This has a few advantages:
- During commit, we swap cache hooks from the prior instance to
avoid traversal
- Extents in the retired set are only those extents that are no
longer mapped/valid.
- btree range pins can be swapped without a traversal
- position in the dirty list can be maintained
That last will be particularly important as the dirty list will
therefore be ordered from the extent with the oldest initial
delta forward.
Signed-off-by: Samuel Just <sjust@redhat.com>
I'm not sure why I added this in the first place, there aren't really
any scenarios where invoking it wouldn't be a bug.
Signed-off-by: Samuel Just <sjust@redhat.com>
Addresses must always be adjusted depending on whether the extent will
be written as a block or as a delta.
Signed-off-by: Samuel Just <sjust@redhat.com>
Dead extents can't go through the normal retire_extent path as they don't
have valid pins or other elements of a real extent. Instead, simply drop
them on the floor directly.
Signed-off-by: Samuel Just <sjust@redhat.com>
Previously, all extents ended up initialized to the same crc value
upon read -- the one for an empty buffer. This bug wasn't detected
because an extent was always evicted and reread following the first
write and subsequently kept in cache once initially written.
Also, add crc to operator<< for extents.
Signed-off-by: Samuel Just <sjust@redhat.com>
If it's already pending, cache.duplicate_for_write is a noop and the extent
will already have a pin. Also, add some debugging.
Signed-off-by: Samuel Just <sjust@redhat.com>
Otherwise, different users may use different values complicating
debugging. We can re-add this in the future if it becomes
useful.
Signed-off-by: Samuel Just <sjust@redhat.com>
cephadm: capadd and privileged are mutex with podman >= 2.0
Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
mgr/dashboard: fix security scopes of some NFS-Ganesha endpoints
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
mgr/dashboard: fix perf. issue when listing large amounts of buckets
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
The --key option was removed in commit 1b5f37bbcd
("backport-create-issue: read redmine key from file").
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
crimson: do not set_value() twice and fix Message leak
Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
crimson::mon::Connection::handle_auth_done() is shared by both v1 and v2
authentication implementation, so move it to "v1 and v2" section
Signed-off-by: Kefu Chai <kchai@redhat.com>
in 7736bddc53, we assumed that the object
to be recovered did not exist in `recovering` before
`recover_object(oid)` was called. but this turns out not true. so, in
this change, `add_object(oid)` is called before `recover_object(oid)`
gets called.
Fixes: https://tracker.ceph.com/issues/47593
Signed-off-by: Kefu Chai <kchai@redhat.com>
this helps to avoid the confusion of "where the recovery is added" and
"are we adding a new instance of recovery here".
should call add_recovery() explicitly when we need to add a new recovery
instance.
Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, get_recovery() can also be used for adding a
recovery instance to `recovering`. this behavior is error-prone and
confusing.
after this change, add_recovery() is used in the place where we
want to add a new instance of recovery instance.
Signed-off-by: Kefu Chai <kchai@redhat.com>
mgr/dashboard: log in non-admin users successfully if the telemetry notification is shown
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
crimson::osd::PG::send_cluster_message() accepts a `Message*`
pointer, and then hand it over to `shard_services.send_to_osd()`,
which expects a `Ref<Message>`. so the raw pointer is used to
construct an `intrusive_ptr<Message>`, which increment the
refcount of that Message instance by one. but that Message
was owned by nobody before that, so we end up with an
`intrusive_ptr<Message>` of 2 refcount, and only a single
owner. hence the memory leak.
in this change, instructs the constructor to not add the refcount.
Signed-off-by: Kefu Chai <kchai@redhat.com>
once the continuation consuming the stored value of the associated
future, we cannot set_value() again. otherwise, ASan complains that we
are accessing the memory on heap after it is freed.
in this change, std::optional<> is used for holding
promise<auth_result_t>, once the promise is fulfilled, `auth_done` is
reset to prevent another call of `set_value()` or `set_exception()`.
Signed-off-by: Kefu Chai <kchai@redhat.com>