| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
if the completion handler has a cancellation slot connected, construct a
cancellation handler for it that calls AioCompletion::cancel()
read operations can support more cancellation types than writes. see the
table of cancellation types and their associated requirements/guarantees:
https://www.boost.org/doc/libs/1_85_0/doc/html/boost_asio/overview/core/cancellation.html#boost_asio.overview.core.cancellation.t0
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
| |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
| |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
|
|
|
|
| |
IoCtx::aio_operate() doesn't update IoCtx::get_last_version(). to make
the resulting version_t available to the caller, we have to read it out
of the AioCompletionImpl and return it to the caller
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|\
| |
| |
| |
| |
| | |
rgw: switch back to boost::asio for spawn() and yield_context
Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
legacy-option-headers provides the headers included by
`src/common/options/legacy_config_opts.h`. these headers are generated from
corresponding .yaml.in file. because these headers file are generated at
build time, we need to construct the file-level dependencies between the
targets using them and these headers, otherwise the compiler could fail
to compile the tree if any of the headers are not generated yet, when
compiling .cc file which (indirectly) includes it.
in order to address this, in this change, we
1. search for all .cc files which have `#include "common/config.h"` in it
2. and find out the targets building the .cc file, then
3. add `legacy-option-headers` to its linkage using CMake
this should partially address the above race condition we've been running
into on slow build hosts.
because we have not audited the .h files including `common/config.h`,
this change should be considered a partial fix.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
|
|\
| |
| |
| |
| |
| | |
librados: use CEPH_OSD_FLAG_FULL_FORCE for IoCtxImpl::remove
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
librados::OPERATION_FULL_FORCE should be translated to
CEPH_OSD_FLAG_FULL_FORCE before calling IoCtxImpl::remove().
Fixes: https://tracker.ceph.com/issues/64558
Signed-off-by: Chen Yuanrun <chen-yuanrun@foxmail.com>
|
|\ \
| | |
| | |
| | |
| | |
| | | |
librbd: account for discards that truncate in ObjectListSnapsRequest
Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Because currently calc_snap_set_diff() only ever appends to the running
diff, an excessive (either too large or completely bogus) zero extent
is reported in cases where an object is first expanded (with a snapshot
taken at that point) and then truncated but still above the size of the
object as of the starting snapshot.
Fixes: https://tracker.ceph.com/issues/63770
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build: add opentelemetry to cmake system
crimson targets that uses Message.cc/h are built before opentelemetry (o-tel), so we need to build o-tel eralier so we also add the library to the include path earlier
this shoud work for WITH_JAEGER flag both the ON/OFF cases, and for librados where the compilation flag is ignored
* msg/tracer: add o-tel trace to Messages with decode/encode function in tracer.h
some files that uses Message.cc/h just need the encode/decode functions and not all others functions.
some crimson targets does not link with ceph_context (common) which is required for tracer.cc file. so we just need to include that functions
* librados: Add opentelemtry trace param for aio_operate and operate methods
in order to propagate the trace info I added the otel-trace as an extra param.
in some places, there already was a blkin trace info, and since it is not used in other places we can safely change it to o-tel trace info.
this will be done in another commit, so the cleanup of blkin trace will be in a dedicated commit
* osd: use the o-tel trace of the msg as a parent span of the osd trace
if there is a valid span in the msg, we will add this op to the request
trace, otherwise it will start a new trace for the OSD op
* rgw: pass put obj trace info to librados
in order to make it possible, I saved the trace info inside the sal::Object, so we can use it later when writing the object to rados
it could be used also later for read ops.
note the trace field of req_state is initalized only in rgw_process, so it's also required in librgw request flow
* prevent breaking channges to kSize. make sure that changes between components built with
different versions of OTEL do not break message compatibility
Signed-off-by: Omri Zeneva <ozeneva@redhat.com>
|
|\
| |
| |
| |
| |
| | |
librados: make querying pools for selfmanaged snaps reliable
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If get_pool_is_selfmanaged_snaps_mode() is invoked on a fresh RADOS
client instance that still lacks an osdmap, it returns false, same as
for "this pool is not in selfmanaged snaps mode". The same happens if
the pool in question doesn't exist since the signature doesn't allow to
return an error.
The motivation for this API was to prevent users from running "rados
cppool" on a pool with unmanaged snapshots and deleting the original
thinking that they have a full copy. Unfortunately, it's exactly
"rados cppool" that fell into this trap, so no warning is printed and
--yes-i-really-mean-it flag isn't enforced.
Fixes: https://tracker.ceph.com/issues/63607
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|\ \
| | |
| | |
| | |
| | |
| | | |
neorados: Learning from experience
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As we'd like to reduce (and eliminate) internal Ceph dependencies to
the extent possible, now that Boost.Asio has a type-erased handler
type, let's use it.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an object doesn't exist in both start and end versions but there is
an intermediate snapshot which contains it (i.e. the object is written
to and captured at some point but then discarded prior to or in the end
version), diff-iterate reports "new hole" -- callback is invoked with
exists=false. This occurs both on the slow list_snaps path and in
fast-diff mode.
Despite going all the way back to the introduction of diff-iterate in
commit 0296c7cdae91 ("librbd: implement diff_iterate"), this behavior
is wrong and contradicts diff-iterate API documentation added in commit
a69532e86450 ("librbd: document diff_iterate in header") in the same
series:
If the source snapshot name is NULL, we interpret that as
the beginning of time and return all allocated regions of the
image.
It also triggered an assert added in commit c680531e070a ("librbd:
change diff_iterate interface to be more C-friendly") in the same
series. Unfortunately, commit f1f6407221a0 ("test_librbd: add
diff_iterate test including discard"), also part of the same series,
added a test which expected the wrong behavior. Very confusing!
A year later, a different manifestation of this bug was fixed in commit
9a1ab95176fe ("rbd: Fix rbd diff for non-existent objects"), but the
fix only covered the case where calc_snap_set_diff() goes past the end
snap ID while processing clones. The case where it runs out of clones
to process before reaching the end snap ID remained mishandled.
A year after that, commit 3ccc3bb4bd35 ("librbd: diff_iterate needs to
handle holes in parent images") dropped the assert mentioned above and
this bug got enshrined in the newly introduced fast-diff mode.
Finally, a few years later, deep-copy actually started relying on this
bug in commit e5a21e904142 ("librbd: deep-copy image copy state machine
skips clean objects"). This necessitates bifurcation in DiffRequest
because deep-copy wants the "has this object been touched" semantics,
which is different from diff-iterate (and also potentially much more
expensive to produce!).
This commit brings a minimal update to TestMockObjectMapDiffRequest
tests and DiffIterateTest.DiffIterateDiscard. Coverage is expanded in
the following commits.
Fixes: https://tracker.ceph.com/issues/53897
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Since commit 73f50a13109f ("rbd-mirror: use generalized deep copy for
image sync"), the only user of calc_snap_set_diff() immediately unsets
end_size otherwise.
calc_snap_set_diff() semantics are clearer if end_size is set together
with end_exists and clone_end_snap_id.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
| |
expose the aio version of rados_write_op_operate2() for mtimes in timespec form
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
| |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
| |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
|
|
|
|
|
| |
the c++ api uses ObjectOperationImpl to wrap ObjectOperation with
additional storage for an optional mtime. the c api now reuses
ObjectOperationImpl for its write operations only - the mtime isn't
needed for read ops
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
|
|
|
|
|
| |
copy the optional mtime logic from operate(), so that mtimes set on the
ObjectOperation are propagated through aio_operate() as well
Fixes: https://tracker.ceph.com/issues/61349
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|
|
|
|
|
|
|
| |
opentelemetry"
This reverts commit 5d4c5e65be94a346e62b9f8ac63241779c4c7a6a.
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build: add opentelemetry to cmake system
crimson targets that uses Message.cc/h are built before opentelemetry (o-tel), so we need to build o-tel eralier so we also add the library to the include path earlier
this shoud work for WITH_JAEGER flag both the ON/OFF cases, and for librados where the compilation flag is ignored
* msg/tracer: add o-tel trace to Messages with decode/encode function in tracer.h
some files that uses Message.cc/h just need the encode/decode functions and not all others functions.
some crimson targets does not link with ceph_context (common) which is required for tracer.cc file. so we just need to include that functions
* librados: Add opentelemtry trace param for aio_operate and operate methods
in order to propagate the trace info I added the otel-trace as an extra param.
in some places, there already was a blkin trace info, and since it is not used in other places we can safely change it to o-tel trace info.
this will be done in another commit, so the cleanup of blkin trace will be in a dedicated commit
* osd: use the o-tel trace of the msg as a parent span of the osd trace
if there is a valid span in the msg, we will add this op to the request
trace, otherwise it will start a new trace for the OSD op
* rgw: pass put obj trace info to librados
in order to make it possible, I saved the trace info inside the sal::Object, so we can use it later when writing the object to rados
it could be used also later for read ops.
note the trace field of req_state is initalized only in rgw_process, so it's also required in librgw request flow
Signed-off-by: Omri Zeneva <ozeneva@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
librados uses "errno.h" error codes. On Windows,
boost::system::system_category refers to errors from winerror.h.
That being considered, we'll add a platform check and use
boost::system::generic_category on Windows. This ensures that
error code comparisons work as expected.
This issue was brought up by the following test assertion failure:
ft2.4: ceph_test_rados_api_asio.AsioRados.AsyncWriteCallbacktesttools.
testresult.real._StringException: details: {{{
/ceph/src/test/librados/asio.cc:148
Expected equality of these values:
boost::system::errc::read_only_file_system
Which is: 30
ec
Which is: system:30
}}}
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
|
|\
| |
| |
| |
| | |
librados: export stat2 in C API
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Wei Wang <lightmelodies@outlook.com>
|
| |
| |
| |
| |
| |
| | |
the default-generated comparison operators can fulfill our needs.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
|
|/
|
|
|
|
|
|
| |
If rados_ioctx_destroy called with un-initilized ioctx we will hit segmented fault
checking ioctx before calling put will prevent that.
Fixes: https://tracker.ceph.com/issues/55001
Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
|
|
|
|
|
|
|
| |
Inode::hold_caps_until storing time from ceph::coarse_mono_clock now.
Fixes: https://tracker.ceph.com/issues/52982
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
|
|\
| |
| |
| |
| | |
librados: check latest osdmap on ENOENT in pool_reverse_lookup()
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid spurious ENOENT errors from rados_pool_reverse_lookup() and
Rados::pool_reverse_lookup().
This makes lookup by id consistent with lookup by name: the latter
has been checking latest osdmap since commit 7e5669b11b14 ("rados: we
need to get the latest osdmap when pool does not exists").
Fixes: https://tracker.ceph.com/issues/54593
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|\ \
| | |
| | |
| | |
| | |
| | | |
osd, common: C++20 related fixes
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
|
| |/
| |
| |
| | |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|/
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/54280
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
|
|
|
|
|
|
| |
We use neorados on the I/O path so data_io_context needs to have
the same setting as data_ctx.
Fixes: https://tracker.ceph.com/issues/52648
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Prior to e468fc0d3b8c ("osdc/Objecter: remove pool_full_try
interface"), librados::IoCtx set_pool_full_try() affected watches and
notifies. Resurrect that to allow "rbd rm" to work when the metadata
pool is full.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
extra_op_flags doesn't survive librados::IoCtx dup() which means that
the effect librados::IoCtx set_pool_full_try() is lost. These contexts
are duped in numerous places, especially in librbd. This is the first
step to fix the full cluster handling which got broken in e468fc0d3b8c
("osdc/Objecter: remove pool_full_try interface").
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
| |
A followup to PR #42820 that modified argv_to_vec() signature
(for style and performance).
Signed-off-by: Ronen Friedman <rfriedma@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>
|
|
|
|
|
|
|
|
| |
We should check if either asm symver or attribute symver is defined and
not assume that attribute symver implies asm symver.
Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
|
|
|
|
|
| |
Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
|
|
|
|
|
|
|
|
| |
The gcc compiler now supports symver attribute. We should update the
symvers to be able to support LTO.
Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
|
|
|
|
|
|
|
|
| |
The build fails because the function definitions are out of order. This
also reuses the LIBRADOS_C_API_DEFAULT_F macro for function definitions.
Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* refs/pull/42041/head:
mgr/restful: ignore min/max_size
test/crush: drop min/max_size refs
qa/workunits/mon/pool_ops: remove test for min/max_size check
qa: scrub a few remaining mentions of ruleset
qa/standalone/mon/osd-*: fix tests
PendingReleaseNotes: note min/max_size removal
mgr/dashboard: remove max/min_size and ruleset
mon/OSDMonitor: fix calls to CrushTester
crush: eliminate min_size and max_size
test/cli/crushtool: reunumber rulesets in test maps
crushtool: require min/max or num-rep for --test
crush: remove last traces of 'ruleset'
test/cli/crushtool: use 'id' instead of 'ruleset' in crush inputs
crushtool: take --min-rep and --max-rep explicitly
crush/CrushTester: drop --ruleset
doc: scrub 'ruleset' from docs
src/erasure-code: rule, not ruleset
mon/OSDMonitor: remove check_crush_rule() callers
mon/OSDMonitor: rule, not ruleset
crushtool: remove check for overlapped ruels
crush/CrushWrapper: get_osd_pool_default_crush_replicated_ruleset -> rule
crush: remove find_rule()
mon/OSDMonitor: use pool's crush rule directly
osd/OSDMap: drop checks for ruleset == ruleid
osd/OSDMap: use pool's crush rule_id directly
mon/PGMap: use pool's crush_rule directly
mon/OSDMonitor: remove crush ruleset->rule rewrite
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove last traces of rulesets from crush. Mostly this means removing the
checks that rule masks don't overlap, since no such rules should exist
at this point, and the compiler no longer allows them.
Scrub all mention of 'ruleset' from other code.
Signed-off-by: Sage Weil <sage@newdream.net>
|
|/
|
|
|
|
|
| |
since the encoding schemes of boost::optional and std::optional are
identical, they can be used interchangeably.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|