While submitting the log line asyncronously is reasonable,
with this implementation the EntryVector &q parameter does
not necessarily outlive the submission continuation.
This reverts commit 511af83e27.
Fixes: https://tracker.ceph.com/issues/64140
Signed-off-by: Samuel Just <sjust@redhat.com>
fixes https://tracker.ceph.com/issues/64125
Across the dashboard, two instances are present: Multi-site and
Multi-Site.
Making it consistent all over by using Multi-site.
Signed-off-by: Afreen <afreen23.git@gmail.com>
Compare a token (nonce) carried in the reservation reply with the remembered
token of the reservation request. If they don't match, the reply is
stale and should be ignored (and logged).
Fixes: https://tracker.ceph.com/issues/64052
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
When a scrub job fails, update its NB to the current time plus a
fixed delay. This prevents the job from being scheduled again
immediately.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
The call should update last_scrub_stamp, too, without
requiring an extra call to on_scrub_schedule_input_change()
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
The NB enables the OSD to delay the next attempt to schedule a specific
scrub job. This is useful for jobs that have failed for whatever
reason, especially if the primary has failed to acquire the replicas.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
The 'penalized jobs' queue was used to track scrub jobs that had failed
to acquire their replicas, and to prevent those jobs from being retried
too quickly. This functionality will be replaced by a
simple 'not before' delay (see the next commits).
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
By using ConnectionRef before pg submission, and after that, change to
use ConnectionXcoreRef.
The intent is to drop the foreign copy of the connection to shard 0 at
pg submission time. This should remove two pairs of crosscore
communications in shard 0 for each I/O, one for connection-ref foreign
copy, another for connection-ref destruction.
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
crimson: drop store from ECBackend to not shadow PGBackend::store
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
src/crimson: Add support for the OSD to receive config changes
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
As an optimization, try to ensure that the object map for the end
version is preloaded through the acquisition of exclusive lock and
as a consequence remains around until exclusive lock is released.
If it's not around, DiffRequest would (re)load it on each call.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
If the object map for the end version is around (already loaded in
memory, either due to the end version being a snapshot or due to
exclusive lock being held), use it to run diff-iterate against the
beginning of time. Since it's the only object map needed in that
case, such calls would be satisfied locally.
Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
In preparation for potentially using in-memory object map, decouple
object map processing from loading object maps and place the logic in
prepare_for_object_map() and process_object_map().
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
T (ConstIterator or Iterator) is confused with const T here:
IteratorImpl dereference operator is wrongly overloaded on const
and returns Reference instead of ConstReference for ConstIterator.
This then fails inside bufferlist bowels because Reference is
incompatible with bufferlist::const_iterator.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Currently it's done in two cases:
- if the loaded object map is larger than expected based on byte size,
it's truncated to expected number of objects
- in case of deep-copy, if the loaded object map is smaller than diff
state, it's expanded to get "track the largest of all versions in the
set" semantics
Both of these cases can be easily dealt with without modifying the
object map. Being able to process a const object map is needed for
working on in-memory object map which is external to DiffRequest.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
It's totally broken: instead of returning the current position and
moving to the next position, it returns the next position and doesn't
move anywhere. Luckily it hasn't been used until now.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This is a leftover from commit 2b3a46801d ("librbd: switch
diff-iterate API to use new object-map diff helper").
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
When getting parent diff, pass the overlap-reduced image extent instead
of the entire 0..overlap range to avoid a similar quadratic slowdown on
cloned images.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Currently diff-iterate in fast-diff mode is performed on the entire
image no matter what image extent is passed to the API. Then, unused
diff just gets discarded as DiffIterate ends up querying only objects
that the passed image extent maps to. This hasn't been an issue for
internal consumers ("rbd du", "rbd diff", etc) because they work on the
entire image, but turns out to lead to quadratic slowdown in some QEMU
use cases.
0..UINT64_MAX range is carved out for deep-copy which is unranged by
definition. To get effectively unranged diff-iterate, 0..UINT64_MAX-1
range can be used.
Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
For each covered edge case or error, run through the following
scenarios:
- where the edge case concerns snap_id_start
- where the edge case concerns snap_id_end
- where the edge case concerns intermediate snapshot and
snap_id_start == 0 (diff against the beginning of time)
- where the edge case concerns intermediate snapshot and
snap_id_start != 0 (diff from snapshot)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
In case of diff-iterate against the beginning of time, the result
depends only on the end version. Loading and processing object maps
or intermediate snapshots is redundant and can be skipped.
This optimization is made possible by commit be507aaed1 ("librbd:
diff-iterate shouldn't ever report "new hole" against a hole") and, to
a lesser extent, the previous commit.
Getting FastDiffInvalid, LoadObjectMapError and ObjectMapTooSmall to
pass required tweaking not just expectations, but also start/end snap
ids and thus also the meaning of these tests. This is addressed in the
next commit.
Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
The new "track the largest of all versions in the set, diff state is
only ever grown" semantics introduced in commit 330f2a7bb9 ("librbd:
helper state machine for computing diffs between object-maps") don't
make sense for diff-iterate. It's a waste because DiffIterate won't
query beyond the end version size -- this is baked into the API.
Limit this behavior to deep-copy and resurrect the original behavior
from 2015 for diff-iterate.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>