DirectoryState does not have an "invalid" enum so far, since it's
defined using `enum class`, init a value of this type with a known value
could be a better choice even it is always initialized before being read.
this silences the GCC warning of:
src/cls/rbd/cls_rbd.cc:3147:3: warning: ‘on_disk_directory_state’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
if (directory_state != on_disk_directory_state) {
^~
Signed-off-by: Kefu Chai <kchai@redhat.com>
If the PQ faces an error, it should go read-only along with the MDS rank.
Fixes: http://tracker.ceph.com/issues/37543
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
In C++ "struct" is unnecessary when referencing a defined
struct. Clean up all uses in src/cls/rgw source files.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
The stats entries for rgw buckets has a category, which used a
combination of uint8_t and enum RGWObjClass. Clean this up by
converting RGWObjClass to an enum class and using that
throughout. This provides type safety and better code clarity. Also,
add some source code documentation.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
When using SSDs as encrypted OSD device, discards do not pass the
encryption layer. This option activates discard requests.
Signed-off-by: Jonas Jelten <jj@stusta.net>
in 0f814f38, we are using self.MODULE_OPTION_DEFAULTS as a fallback, but
the MgrStandbyModule does not have it defined. in this change,
* apply 0f814f38 to MgrStandbyModule
* apply 0228bd79 to MgrStandbyModule
Signed-off-by: Kefu Chai <kchai@redhat.com>
This should be preferred over the traditional asok interface
which would probably get deprecated (soon).
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Include scrub tag as part of the output and move the
formatting in context completion to support scrub opeation
triggered via tell interface (introduced later).
Signed-off-by: Venky Shankar <vshankar@redhat.com>
With this, scrub operations are tagged with a random
uuid if tag is unspecified. This also helps to show
in-progress scrub operations via "scrub status" command
(introduced in later commits).
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Tell commands that need to asynchronous reply back can
subclass C_ExecAndReply() and implement exec() virtual
function to support asynchronous execution of the command
(via finisher thread).
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Fixed warning: librados.h:321: warning: Member compressed_bytes_alloc
(variable) of class rados_pool_stat_t is not documented.
Signed-off-by: Jos Collin <jcollin@redhat.com>
head inode gets unpinned when snapflush starts. It might get trimmed
before snapflush finishes.
Fixes: http://tracker.ceph.com/issues/37721
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
If it's 0, use the pg_num value. This lets you adjust the
osd_pool_default_pg_num option without also adjusting the pgp_num one.
Signed-off-by: Sage Weil <sage@redhat.com>
this change works around the FTBFS on arm64:
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/crimson/common/config_proxy.h:74:13:
internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537
for (auto& [obs, keys] : rev_obs) {
^~~
Please submit a full bug report,
with preprocessed source if appropriate.
it seems that this issue is a dup of
https://bugzilla.redhat.com/show_bug.cgi?id=1639019 .
Signed-off-by: Kefu Chai <kchai@redhat.com>
GCC is somehow annoyed at seeing the combination of decltype and
initializer_list in this place. i tried to remove the `if` clause, and
only left the `else` block, GCC was happy with that change. i also tried
to pass an empty `{}` to `decltype(reply.lockers)`, and GCC was also
happy with that. so i guess there are multiple factors taking effect in
this problem. probably any of them could be the last straw that breaks
GCC.
but we cannot have a minimal reproducer for this issue here without more
efforts. and `reply.lockers` is empty after `reply` is constructed, so
it would be simpler if we just add the locker info to it instead of
assigning a newly constructed `map` to it.
Fixes: http://tracker.ceph.com/issues/37719
Signed-off-by: Kefu Chai <kchai@redhat.com>