Kefu Chai [Tue, 17 Jun 2025 08:28:57 +0000 (16:28 +0800)]
cmake: suppress -Wmaybe-uninitialized warning in memstore PageSet
Suppress GCC-15 false positive warning about uninitialized memory in
Page::operator delete() using placement new pattern.
GCC-15 incorrectly warns about potentially uninitialized data when
using placement new with manual memory management:
```
[409/506] Building CXX object src/os/CMakeFiles/os.dir/memstore/MemStore.cc.o
In file included from /home/kefu/dev/ceph/src/os/memstore/MemStore.h:29,
from /home/kefu/dev/ceph/src/os/memstore/MemStore.cc:28:
In static member function ‘static void Page::operator delete(void*)’,
inlined from ‘void Page::put()’ at /home/kefu/dev/ceph/src/os/memstore/PageSet.h:36:41:
/home/kefu/dev/ceph/src/os/memstore/PageSet.h:83:42: warning: ‘*this.Page::data’ may be used uninitialized [-Wmaybe-uninitialized]
83 | delete[] reinterpret_cast<Page*>(p)->data;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
```
The warning is a false positive: Page instances are constructed using
placement new over pre-allocated memory, requiring manual cleanup of
the underlying data array. This is the intended behavior and memory
is properly initialized. So, in this change we just silence this warning
in CMake after checking its availability.
Kefu Chai [Tue, 17 Jun 2025 07:55:27 +0000 (15:55 +0800)]
cmake: build crypto_plugins only when needed for radosgw
Make crypto_plugins a conditional ALL target instead of an explicit
dependency to improve build parallelism.
Background:
- dbbf052f: Added crypto plugins with ceph_crypto_isal as os dependency
- 53726b8e: Changed os to depend on crypto_plugins (not specific plugin)
- Issue:
* crypto_plugins are not dependencys of "os" at all
* crypto_plugins are runtime-only dependencies for rgw_common
In this change:
- Remove crypto_plugins from explicit target dependencies
- Add crypto_plugins to ALL target when WITH_RADOSGW=ON
- Plugins now build in parallel with other targets
- Maintains runtime plugin loading without compile-time coupling
This improves build concurrency by allowing crypto_plugins to build
in parallel with os/rgw_common instead of sequentially, and prevents
building crypto plugins when RadosGW is disabled.
Kefu Chai [Wed, 18 Jun 2025 02:16:26 +0000 (10:16 +0800)]
cmake: link ceph_test_keyvaluedb directly against kv library
Fix incorrect transitive dependency by linking ceph_test_keyvaluedb
directly against the kv library instead of relying on transitive
linkage through the os library.
The test includes headers from kv/KeyValueDB.h and kv/RocksDBStore.h,
which are provided by the kv target, not os. This change makes the
dependency explicit and corrects the build configuration.
Kefu Chai [Tue, 17 Jun 2025 07:33:56 +0000 (15:33 +0800)]
cmake: modularize os/CMakeLists.txt
Split monolithic os target into per-store modules to improve build
system organization and dependency management.
Previously, the "os" target compiled all sources in the os/ directory
as a single unit and linked against all dependencies collectively.
Changes:
- Break os/CMakeLists.txt into smaller, store-specific modules
- Enable per-store compile options and dependency definitions
- Make dependency relationships more explicit and granular
This modularization improves build system maintainability and makes
the codebase structure clearer for future development.
Kefu Chai [Tue, 17 Jun 2025 14:24:29 +0000 (22:24 +0800)]
cmake: explicitly link unittest_rocksdb_option against RocksDB
Previously, unittest_rocksdb_option relied on transitive RocksDB linkage
from the "os" dependency, which was fragile and implicit. Since
unittest_rocksdb_option directly uses RocksDB APIs (including rocksdb/db.h
in TestRocksdbOptionParse.cc), it should explicitly declare this dependency.
This change adds an explicit link to RocksDB::RocksDB, making the build
system more robust and self-contained.
Kefu Chai [Sat, 14 Jun 2025 13:44:05 +0000 (21:44 +0800)]
cls/rbd: use default values for non-decoded fields in test instances
Previously, test instances for cls_rbd_snap used non-default values
for the "parent" field, which is ignored during decoding. The
check-generated.sh test passed because they reused the same instance
for re-encoding, preserving undecoded fields.
An upcoming change will allocate new instances for each encode/decode
verification instead of reusing instances. This will expose
discrepancies between original test instances and re-encoded values
when fields contain non-default values but aren't decoded.
This change sets ignored fields to their default values in test
instances, ensuring consistency between encoding and decoding
operations regardless of the verification approach used.
Since the incompatibility of cls_rbd_snap's on-disk format was
introduced in 32b14ed1, which was introduced Ceph v14, we will
mark this version the first incompatible version in ceph-object-corpus
in the sense that the re-encoded cls_rbd_snap with v8 struct version
is different from the original copy if its parent field is set with
< v8 struct version.
Kefu Chai [Tue, 17 Jun 2025 09:22:16 +0000 (17:22 +0800)]
cmake: use find_program(REQUIRED) to fail early on missing programs
Since upgrading minimum CMake version to 3.22.1 (commit 469d82a1), we can
now use find_program(REQUIRED) which was introduced in CMake 3.18.
This change replaces manual FATAL_ERROR checks with the REQUIRED option
and adds it to programs that are actually needed during the build. This
ensures the build fails early during configuration rather than later
during compilation when missing programs are invoked.
Changes:
- Replace find_program() + message(FATAL_ERROR) patterns with REQUIRED
- Add REQUIRED to programs that are used during build but previously
had no error checking
nvme-cli has changed json output in 2.11
and then reverted the change in 2.13 release.
So this commit goes back to 2.13 (or pre-2.11)
processing of "nvme list" json output.
Ville Ojamo [Fri, 13 Jun 2025 10:28:23 +0000 (17:28 +0700)]
doc: Fix sphinx warnings
doc/cephadm/services/snmp-gateway.rst: Don't use double backticks for
links. Makes it a link instead of rendering syntax verbatim.
Also for consistency use single backticks for links instead of a plain
trailing underscore.
Improve language of opening sentence.
doc/dev/cephfs-mirroring.rst: Add missing empty line before preformatted
blocks. No change in rendered docs.
doc/mgr/telemetry.rst: Fix external link syntax. Makes it a link instead
of rendering syntax and pointing to non-existing link.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Fri, 13 Jun 2025 10:02:33 +0000 (17:02 +0700)]
doc/cephfs: Improve formatting in mantle.rst
Use ordered lists instead of hardcoded list item number paragraphs.
Indent list item contents correctly so that a text block is not
rendered inside a previous preformatted block.
Also fix indentation of one preformatted block inside a list item to be
at the same amount of indent as other such blocks.
Use inline preformatted for commands, method/function names etc. instead
of italic/MD-style inline preformatted.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
```
CMake Deprecation Warning at src/dmclock/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
```
The upstream CI workflow uses Ubuntu 22.04 (CMake 3.22.1) and CentOS 9
(CMake 3.26.5), so bumping to 3.22.1 maintains compatibility with our
supported build environments while enabling access to newer CMake
features.
Kefu Chai [Fri, 13 Jun 2025 08:20:10 +0000 (16:20 +0800)]
cmake: drop c-ares::c-ares alias
Remove the c-ares::c-ares alias that was causing build failures after
bumping the minimum CMake version:
```
CMake Error at cmake/modules/Findc-ares.cmake:34 (add_library):
add_library cannot create ALIAS target "c-ares::c-ares" because another
target with the same name already exists.
Call Stack (most recent call first):
src/CMakeLists.txt:463 (_find_package)
src/seastar/cmake/SeastarDependencies.cmake:136 (find_package)
src/seastar/CMakeLists.txt:395 (seastar_find_dependencies)`
```
The alias was originally added for backward compatibility with Seastar,
but is no longer needed since the updated Seastar submodule no longer
references the c-ares::c-ares target.
Matt Benjamin [Sun, 18 May 2025 01:02:34 +0000 (21:02 -0400)]
rgw: aws-chunked need not supply any content-length
The updated logic for aws chunked handling (2024) appears sufficient
to handle the cases produced by aws-sdk-go-v2.
Note that https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
states that "For all requests, you must include the
x-amz-decoded-content-length header, specifying the size of the object in
bytes." (accessed 5/17/2025) (but now we do not enforce it).
Reported (with reproducer!) by: Fred Heinecke.
Fixes: https://tracker.ceph.com/issues/71183 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Matt Benjamin [Sat, 17 May 2025 19:52:20 +0000 (15:52 -0400)]
rgw: recognize checksum from x-amz-checksum-{type} alone
Some SDKs may send x-amz-checksum-algorithm or
x-amz-sdk-checksum-algorithm regardless as well, but those are
only required if the checksum header is in the trailer section.
Fixes: https://tracker.ceph.com/issues/71350 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
John Mulligan [Fri, 21 Mar 2025 18:28:25 +0000 (14:28 -0400)]
script/build-with-container: cache git branch result
Cache the branch we got from the git command as it is highly unlikely
to change during the script execution and if it does -- we mostly don't
care anyway.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Zac Dover [Wed, 11 Jun 2025 12:44:32 +0000 (22:44 +1000)]
doc/rados/ops: edit cache-tiering.rst
Add material to doc/rados/operations/cache-tiering.rst, as suggested by
Anthony D'Atri in
https://github.com/ceph/ceph/pull/63745#discussion_r2127887785.
Zac Dover [Wed, 11 Jun 2025 12:39:50 +0000 (22:39 +1000)]
doc/radosgw: edit cloud-transition.rst
Add a link to the "Versioned Objects" section from a place in the docs
where that section is referred to. This change was requested by Anthony
D'Atri in
https://github.com/ceph/ceph/pull/63447#discussion_r2104492552.
Jaya Prakash [Wed, 5 Mar 2025 21:56:37 +0000 (21:56 +0000)]
os/bluestore: Implemented create-bdev-label
Introduces a helper function create_bdev_label() and a new command create-bdev-label
to write essential OSD metadata (e.g., fsid, whoami) directly into the device label
at offset 0, for use on devices where support_bdev_label == false.
Zac Dover [Tue, 10 Jun 2025 10:38:54 +0000 (20:38 +1000)]
doc/rbd: add mirroring troubleshooting info
Add a note to doc/rbd/rbd-mirroring.rst that directs the reader to set
both "site-a" and "site-b" to have the same pool names in the event that
rbd throws the error message "failed to import peer bootstrap token".
This information was reported to the Ceph upstream by Petr Tlapa in June
of 2025, and credit for its development goes to Petr.
Zac Dover [Tue, 10 Jun 2025 10:58:22 +0000 (20:58 +1000)]
doc/rados: enhance "pools.rst"
Add a link to the instructions for modifying a user's caps for a given
pool. Add this link where it makes sense to add it. Add this link where
the reader would naturally want to have the link.