diff options
author | Casey Bodley <cbodley@redhat.com> | 2022-02-11 20:49:35 +0100 |
---|---|---|
committer | Kefu Chai <tchaikov@gmail.com> | 2022-03-17 15:00:35 +0100 |
commit | 773dabfcd6f263a0039e8596659276b33c637eb8 (patch) | |
tree | d750ef5f77a7715f16be3dc3a5653d053771ce8e /src/librados | |
parent | libradosstriper: remove template syntax from constructor (diff) | |
download | ceph-773dabfcd6f263a0039e8596659276b33c637eb8.tar.xz ceph-773dabfcd6f263a0039e8596659276b33c637eb8.zip |
librados: stop using c++20 keyword 'requires'
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/librados')
-rw-r--r-- | src/librados/RadosClient.cc | 14 | ||||
-rw-r--r-- | src/librados/RadosClient.h | 2 | ||||
-rw-r--r-- | src/librados/librados_c.cc | 6 | ||||
-rw-r--r-- | src/librados/librados_cxx.cc | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc index 3d4563c8bf1..7f2f73ed1a8 100644 --- a/src/librados/RadosClient.cc +++ b/src/librados/RadosClient.cc @@ -92,22 +92,22 @@ int64_t librados::RadosClient::lookup_pool(const char *name) bool librados::RadosClient::pool_requires_alignment(int64_t pool_id) { - bool requires; - int r = pool_requires_alignment2(pool_id, &requires); + bool required; + int r = pool_requires_alignment2(pool_id, &required); if (r < 0) { // Cast answer to false, this is a little bit problematic // since we really don't know the answer yet, say. return false; } - return requires; + return required; } // a safer version of pool_requires_alignment int librados::RadosClient::pool_requires_alignment2(int64_t pool_id, - bool *requires) + bool *req) { - if (!requires) + if (!req) return -EINVAL; int r = wait_for_osdmap(); @@ -115,11 +115,11 @@ int librados::RadosClient::pool_requires_alignment2(int64_t pool_id, return r; } - return objecter->with_osdmap([requires, pool_id](const OSDMap& o) { + return objecter->with_osdmap([req, pool_id](const OSDMap& o) { if (!o.have_pg_pool(pool_id)) { return -ENOENT; } - *requires = o.get_pg_pool(pool_id)->requires_aligned_append(); + *req = o.get_pg_pool(pool_id)->requires_aligned_append(); return 0; }); } diff --git a/src/librados/RadosClient.h b/src/librados/RadosClient.h index 00a273b82d3..052249a76db 100644 --- a/src/librados/RadosClient.h +++ b/src/librados/RadosClient.h @@ -121,7 +121,7 @@ public: int get_fsid(std::string *s); int64_t lookup_pool(const char *name); bool pool_requires_alignment(int64_t pool_id); - int pool_requires_alignment2(int64_t pool_id, bool *requires); + int pool_requires_alignment2(int64_t pool_id, bool *req); uint64_t pool_required_alignment(int64_t pool_id); int pool_required_alignment2(int64_t pool_id, uint64_t *alignment); int pool_get_name(uint64_t pool_id, std::string *name, diff --git a/src/librados/librados_c.cc b/src/librados/librados_c.cc index a403a4b9762..89c568ad1b3 100644 --- a/src/librados/librados_c.cc +++ b/src/librados/librados_c.cc @@ -1607,7 +1607,7 @@ LIBRADOS_C_API_BASE_DEFAULT(rados_ioctx_pool_requires_alignment); extern "C" int LIBRADOS_C_API_DEFAULT_F(rados_ioctx_pool_requires_alignment2)( rados_ioctx_t io, - int *requires) + int *req) { tracepoint(librados, rados_ioctx_pool_requires_alignment_enter2, io); librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io; @@ -1616,8 +1616,8 @@ extern "C" int LIBRADOS_C_API_DEFAULT_F(rados_ioctx_pool_requires_alignment2)( &requires_alignment); tracepoint(librados, rados_ioctx_pool_requires_alignment_exit2, retval, requires_alignment); - if (requires) - *requires = requires_alignment; + if (req) + *req = requires_alignment; return retval; } LIBRADOS_C_API_BASE_DEFAULT(rados_ioctx_pool_requires_alignment2); diff --git a/src/librados/librados_cxx.cc b/src/librados/librados_cxx.cc index 75e3e797a9a..452b9c90b2e 100644 --- a/src/librados/librados_cxx.cc +++ b/src/librados/librados_cxx.cc @@ -1203,9 +1203,9 @@ bool librados::IoCtx::pool_requires_alignment() return io_ctx_impl->client->pool_requires_alignment(get_id()); } -int librados::IoCtx::pool_requires_alignment2(bool *requires) +int librados::IoCtx::pool_requires_alignment2(bool *req) { - return io_ctx_impl->client->pool_requires_alignment2(get_id(), requires); + return io_ctx_impl->client->pool_requires_alignment2(get_id(), req); } uint64_t librados::IoCtx::pool_required_alignment() |