diff --git a/src/cls/fifo/cls_fifo_types.h b/src/cls/fifo/cls_fifo_types.h index 8a471828b7a..13f479fe64a 100644 --- a/src/cls/fifo/cls_fifo_types.h +++ b/src/cls/fifo/cls_fifo_types.h @@ -145,10 +145,10 @@ struct journal_entry { } void dump(ceph::Formatter* f) const; - bool operator ==(const journal_entry& e) { - return (op == e.op && - part_num == e.part_num && - part_tag == e.part_tag); + friend bool operator ==(const journal_entry& lhs, const journal_entry& rhs) { + return (lhs.op == rhs.op && + lhs.part_num == rhs.part_num && + lhs.part_tag == rhs.part_tag); } }; WRITE_CLASS_ENCODER(journal_entry) diff --git a/src/common/ConfUtils.cc b/src/common/ConfUtils.cc index ad791ece4f7..2f78fd02bf9 100644 --- a/src/common/ConfUtils.cc +++ b/src/common/ConfUtils.cc @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include "include/buffer.h" diff --git a/src/common/TrackedOp.cc b/src/common/TrackedOp.cc index 0166781ceae..217d571d5cf 100644 --- a/src/common/TrackedOp.cc +++ b/src/common/TrackedOp.cc @@ -161,7 +161,7 @@ OpTracker::OpTracker(CephContext *cct_, bool tracking, uint32_t num_shards): tracking_enabled(tracking), cct(cct_) { for (uint32_t i = 0; i < num_optracker_shards; i++) { - char lock_name[32] = {0}; + char lock_name[34] = {0}; snprintf(lock_name, sizeof(lock_name), "%s:%" PRIu32, "OpTracker::ShardedLock", i); ShardedTrackingData* one_shard = new ShardedTrackingData(lock_name); sharded_in_flight_list.push_back(one_shard); diff --git a/src/include/buffer.h b/src/include/buffer.h index 8a28d846d9d..5e3fdf4b40b 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -440,7 +440,13 @@ struct error_code; buffers_iterator(U* const p) : cur(p) { } - template + // copy constructor + buffers_iterator(const buffers_iterator& other) + : cur(other.cur) { + } + // converting constructor, from iterator -> const_iterator only + template ::value && !std::is_const::value, int>::type = 0> buffers_iterator(const buffers_iterator& other) : cur(other.cur) { } @@ -475,11 +481,6 @@ struct error_code; bool operator!=(const buffers_iterator& rhs) const { return !(*this==rhs); } - - using citer_t = buffers_iterator::type>; - operator citer_t() const { - return citer_t(cur); - } }; typedef buffers_iterator const_iterator; diff --git a/src/include/cpp-btree/btree.h b/src/include/cpp-btree/btree.h index f00abc8682f..2eddc2abe80 100644 --- a/src/include/cpp-btree/btree.h +++ b/src/include/cpp-btree/btree.h @@ -812,6 +812,12 @@ struct btree_iterator { bool operator!=(const const_iterator &x) const { return node != x.node || position != x.position; } + bool operator==(const iterator& x) const { + return node == x.node && position == x.position; + } + bool operator!=(const iterator& x) const { + return node != x.node || position != x.position; + } // Accessors for the key/value the iterator is pointing at. reference operator*() const { diff --git a/src/include/xlist.h b/src/include/xlist.h index 3c04312c714..76d0ddccd3c 100644 --- a/src/include/xlist.h +++ b/src/include/xlist.h @@ -177,21 +177,27 @@ public: return *this; } bool end() const { return cur == 0; } - bool operator==(const iterator& rhs) const { - return cur == rhs.cur; + friend bool operator==(const iterator& lhs, const iterator& rhs) { + return lhs.cur == rhs.cur; } - bool operator!=(const iterator& rhs) const { - return cur != rhs.cur; + friend bool operator!=(const iterator& lhs, const iterator& rhs) { + return lhs.cur != rhs.cur; } }; iterator begin() { return iterator(_front); } iterator end() { return iterator(NULL); } - class const_iterator: std::iterator { + class const_iterator { private: item *cur; public: + using iterator_category = std::forward_iterator_tag; + using value_type = T; + using difference_type = std::ptrdiff_t; + using pointer = const T*; + using reference = const T&; + const_iterator(item *i = 0) : cur(i) {} const T operator*() { return static_cast(cur->_item); } const_iterator& operator++() { @@ -201,11 +207,13 @@ public: return *this; } bool end() const { return cur == 0; } - bool operator==(const_iterator& rhs) const { - return cur == rhs.cur; + friend bool operator==(const const_iterator& lhs, + const const_iterator& rhs) { + return lhs.cur == rhs.cur; } - bool operator!=(const_iterator& rhs) const { - return cur != rhs.cur; + friend bool operator!=(const const_iterator& lhs, + const const_iterator& rhs) { + return lhs.cur != rhs.cur; } }; 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 de709cb1419..e74370f6d08 100644 --- a/src/librados/librados_cxx.cc +++ b/src/librados/librados_cxx.cc @@ -1205,9 +1205,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() diff --git a/src/libradosstriper/RadosStriperImpl.cc b/src/libradosstriper/RadosStriperImpl.cc index aca8463a97e..2cd52f3d32d 100644 --- a/src/libradosstriper/RadosStriperImpl.cc +++ b/src/libradosstriper/RadosStriperImpl.cc @@ -421,7 +421,7 @@ struct StatCompletionData : BasicStatCompletionData { private: FRIEND_MAKE_REF(StatCompletionData); /// constructor - StatCompletionData(libradosstriper::RadosStriperImpl* striper, + StatCompletionData(libradosstriper::RadosStriperImpl* striper, const std::string& soid, librados::AioCompletionImpl *userCompletion, libradosstriper::MultiAioCompletionImpl *multiCompletion, diff --git a/src/neorados/cls/fifo.h b/src/neorados/cls/fifo.h index 4c7ba4779ec..b95f7f94ffe 100644 --- a/src/neorados/cls/fifo.h +++ b/src/neorados/cls/fifo.h @@ -667,11 +667,13 @@ private: template static void assoc_delete(const Handler& handler, T* t) { - typename std::allocator_traits::type> - ::template rebind_alloc a( - ba::get_associated_allocator(handler)); - a.destroy(t); - a.deallocate(t, 1); + using Alloc = ba::associated_allocator_t; + using Traits = typename std::allocator_traits; + using RebindAlloc = typename Traits::template rebind_alloc; + using RebindTraits = typename std::allocator_traits; + RebindAlloc a(get_associated_allocator(handler)); + RebindTraits::destroy(a, t); + RebindTraits::deallocate(a, t, 1); } FIFO(RADOS& r, diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 69b18ba03f3..3c8913c14f7 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3256,7 +3256,7 @@ int OSD::run_osd_bench_test( utime_t start = ceph_clock_now(); for (int64_t pos = 0; pos < count; pos += bsize) { - char nm[30]; + char nm[34]; unsigned offset = 0; if (onum && osize) { snprintf(nm, sizeof(nm), "disk_bw_test_%d", (int)(rand() % onum)); diff --git a/src/osd/OSDCap.cc b/src/osd/OSDCap.cc index e7bf0582799..f847e80e337 100644 --- a/src/osd/OSDCap.cc +++ b/src/osd/OSDCap.cc @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #include #include "OSDCap.h" diff --git a/src/osd/scrubber/scrub_backend.cc b/src/osd/scrubber/scrub_backend.cc index 505428960ae..aa7427f4248 100644 --- a/src/osd/scrubber/scrub_backend.cc +++ b/src/osd/scrubber/scrub_backend.cc @@ -1212,7 +1212,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, if (auth.digest_present && candidate.digest_present && auth.digest != candidate.digest) { - format_to(out, + format_to(std::back_inserter(out), "data_digest {:#x} != data_digest {:#x} from shard {}", candidate.digest, auth.digest, @@ -1223,7 +1223,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, if (auth.omap_digest_present && candidate.omap_digest_present && auth.omap_digest != candidate.omap_digest) { - format_to(out, + format_to(std::back_inserter(out), "{}omap_digest {:#x} != omap_digest {:#x} from shard {}", sep(error), candidate.omap_digest, @@ -1236,7 +1236,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, if (m_is_replicated) { if (auth_oi.is_data_digest() && candidate.digest_present && auth_oi.data_digest != candidate.digest) { - format_to(out, + format_to(std::back_inserter(out), "{}data_digest {:#x} != data_digest {:#x} from auth oi {}", sep(error), candidate.digest, @@ -1248,7 +1248,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, // for replicated: if (auth_oi.is_omap_digest() && candidate.omap_digest_present && auth_oi.omap_digest != candidate.omap_digest) { - format_to(out, + format_to(std::back_inserter(out), "{}omap_digest {:#x} != omap_digest {:#x} from auth oi {}", sep(error), candidate.omap_digest, @@ -1282,7 +1282,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, auth_bl.push_back(auth_attr->second); if (!can_bl.contents_equal(auth_bl)) { - format_to(out, "{}object info inconsistent ", sep(error)); + format_to(std::back_inserter(out), "{}object info inconsistent ", sep(error)); obj_result.set_object_info_inconsistency(); } } @@ -1302,7 +1302,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, auth_bl.push_back(auth_attr->second); if (!can_bl.contents_equal(auth_bl)) { - format_to(out, "{}snapset inconsistent ", sep(error)); + format_to(std::back_inserter(out), "{}snapset inconsistent ", sep(error)); obj_result.set_snapset_inconsistency(); } } @@ -1325,7 +1325,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, auth_bl.push_back(auth_hi->second); if (!can_bl.contents_equal(auth_bl)) { - format_to(out, "{}hinfo inconsistent ", sep(error)); + format_to(std::back_inserter(out), "{}hinfo inconsistent ", sep(error)); obj_result.set_hinfo_inconsistency(); } } @@ -1337,7 +1337,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, uint64_t oi_size = logical_to_ondisk_size(auth_oi.size); if (oi_size != candidate.size) { - format_to(out, + format_to(std::back_inserter(out), "{}size {} != size {} from auth oi {}", sep(error), candidate.size, @@ -1347,7 +1347,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, } if (auth.size != candidate.size) { - format_to(out, + format_to(std::back_inserter(out), "{}size {} != size {} from shard {}", sep(error), candidate.size, @@ -1361,7 +1361,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, if (candidate.size > m_conf->osd_max_object_size && !obj_result.has_size_too_large()) { - format_to(out, + format_to(std::back_inserter(out), "{}size {} > {} is too large", sep(error), candidate.size, @@ -1381,10 +1381,10 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, auto cand = candidate.attrs.find(k); if (cand == candidate.attrs.end()) { - format_to(out, "{}attr name mismatch '{}'", sep(error), k); + format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k); obj_result.set_attr_name_mismatch(); } else if (cand->second.cmp(v)) { - format_to(out, "{}attr value mismatch '{}'", sep(error), k); + format_to(std::back_inserter(out), "{}attr value mismatch '{}'", sep(error), k); obj_result.set_attr_value_mismatch(); } } @@ -1397,7 +1397,7 @@ bool ScrubBackend::compare_obj_details(pg_shard_t auth_shard, auto in_auth = auth.attrs.find(k); if (in_auth == auth.attrs.end()) { - format_to(out, "{}attr name mismatch '{}'", sep(error), k); + format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k); obj_result.set_attr_name_mismatch(); } } diff --git a/src/rgw/rgw_sal_motr.cc b/src/rgw/rgw_sal_motr.cc index 379f91df82a..6ecd84a2c4d 100644 --- a/src/rgw/rgw_sal_motr.cc +++ b/src/rgw/rgw_sal_motr.cc @@ -22,6 +22,7 @@ extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wextern-c-compat" +#pragma clang diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion" #include "motr/config.h" #include "lib/types.h" #include "lib/trace.h" // m0_trace_set_mmapped_buffer diff --git a/src/rgw/rgw_sal_motr.h b/src/rgw/rgw_sal_motr.h index f340f23afab..6e618e57f1e 100644 --- a/src/rgw/rgw_sal_motr.h +++ b/src/rgw/rgw_sal_motr.h @@ -20,6 +20,7 @@ extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wextern-c-compat" +#pragma clang diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion" #include "motr/config.h" #include "motr/client.h" #pragma clang diagnostic pop diff --git a/src/s3select b/src/s3select index 1609bb2ab54..825598ac92d 160000 --- a/src/s3select +++ b/src/s3select @@ -1 +1 @@ -Subproject commit 1609bb2ab5441d2314f56858f4f98fc2be509f89 +Subproject commit 825598ac92dfb889a2107b85d461e9e673838450 diff --git a/src/test/librados/TestCase.cc b/src/test/librados/TestCase.cc index 1066587b5ec..1399370c1b4 100644 --- a/src/test/librados/TestCase.cc +++ b/src/test/librados/TestCase.cc @@ -26,9 +26,9 @@ void RadosTestNS::SetUp() { cluster = RadosTestNS::s_cluster; ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx)); - int requires; - ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &requires)); - ASSERT_FALSE(requires); + int req; + ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &req)); + ASSERT_FALSE(req); } void RadosTestNS::TearDown() @@ -78,9 +78,9 @@ void RadosTestECNS::SetUp() { cluster = RadosTestECNS::s_cluster; ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx)); - int requires; - ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &requires)); - ASSERT_TRUE(requires); + int req; + ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &req)); + ASSERT_TRUE(req); ASSERT_EQ(0, rados_ioctx_pool_required_alignment2(ioctx, &alignment)); ASSERT_NE(0U, alignment); } @@ -112,9 +112,9 @@ void RadosTest::SetUp() ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx)); nspace = get_temp_pool_name(); rados_ioctx_set_namespace(ioctx, nspace.c_str()); - int requires; - ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &requires)); - ASSERT_FALSE(requires); + int req; + ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &req)); + ASSERT_FALSE(req); } void RadosTest::TearDown() @@ -172,9 +172,9 @@ void RadosTestEC::SetUp() ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx)); nspace = get_temp_pool_name(); rados_ioctx_set_namespace(ioctx, nspace.c_str()); - int requires; - ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &requires)); - ASSERT_TRUE(requires); + int req; + ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(ioctx, &req)); + ASSERT_TRUE(req); ASSERT_EQ(0, rados_ioctx_pool_required_alignment2(ioctx, &alignment)); ASSERT_NE(0U, alignment); } diff --git a/src/test/librados/aio.cc b/src/test/librados/aio.cc index 8e9662bff52..e3652bc3bfd 100644 --- a/src/test/librados/aio.cc +++ b/src/test/librados/aio.cc @@ -1147,9 +1147,9 @@ TEST(LibRadosAioEC, RoundTripAppend) { ASSERT_EQ("", test_data.init()); ASSERT_EQ(0, rados_aio_create_completion2(nullptr, nullptr, &my_completion)); - int requires; - ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(test_data.m_ioctx, &requires)); - ASSERT_NE(0, requires); + int req; + ASSERT_EQ(0, rados_ioctx_pool_requires_alignment2(test_data.m_ioctx, &req)); + ASSERT_NE(0, req); uint64_t alignment; ASSERT_EQ(0, rados_ioctx_pool_required_alignment2(test_data.m_ioctx, &alignment)); ASSERT_NE(0U, alignment); diff --git a/src/test/librados/aio_cxx.cc b/src/test/librados/aio_cxx.cc index 28360b3d938..0aca54dbe03 100644 --- a/src/test/librados/aio_cxx.cc +++ b/src/test/librados/aio_cxx.cc @@ -1560,9 +1560,9 @@ TEST(LibRadosAioEC, RoundTripAppendPP) { ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; ASSERT_TRUE(my_completion); - bool requires; - ASSERT_EQ(0, test_data.m_ioctx.pool_requires_alignment2(&requires)); - ASSERT_TRUE(requires); + bool req; + ASSERT_EQ(0, test_data.m_ioctx.pool_requires_alignment2(&req)); + ASSERT_TRUE(req); uint64_t alignment; ASSERT_EQ(0, test_data.m_ioctx.pool_required_alignment2(&alignment)); ASSERT_NE((unsigned)0, alignment); diff --git a/src/test/librados/testcase_cxx.cc b/src/test/librados/testcase_cxx.cc index b660014be1c..135b36e8eee 100644 --- a/src/test/librados/testcase_cxx.cc +++ b/src/test/librados/testcase_cxx.cc @@ -41,9 +41,9 @@ void RadosTestPPNS::TearDownTestCase() void RadosTestPPNS::SetUp() { ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx)); - bool requires; - ASSERT_EQ(0, ioctx.pool_requires_alignment2(&requires)); - ASSERT_FALSE(requires); + bool req; + ASSERT_EQ(0, ioctx.pool_requires_alignment2(&req)); + ASSERT_FALSE(req); } void RadosTestPPNS::TearDown() @@ -124,9 +124,9 @@ void RadosTestParamPPNS::SetUp() } ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx)); - bool requires; - ASSERT_EQ(0, ioctx.pool_requires_alignment2(&requires)); - ASSERT_FALSE(requires); + bool req; + ASSERT_EQ(0, ioctx.pool_requires_alignment2(&req)); + ASSERT_FALSE(req); } void RadosTestParamPPNS::TearDown() @@ -166,9 +166,9 @@ void RadosTestECPPNS::TearDownTestCase() void RadosTestECPPNS::SetUp() { ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx)); - bool requires; - ASSERT_EQ(0, ioctx.pool_requires_alignment2(&requires)); - ASSERT_TRUE(requires); + bool req; + ASSERT_EQ(0, ioctx.pool_requires_alignment2(&req)); + ASSERT_TRUE(req); ASSERT_EQ(0, ioctx.pool_required_alignment2(&alignment)); ASSERT_NE(0U, alignment); } @@ -201,9 +201,9 @@ void RadosTestPP::SetUp() ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx)); nspace = get_temp_pool_name(); ioctx.set_namespace(nspace); - bool requires; - ASSERT_EQ(0, ioctx.pool_requires_alignment2(&requires)); - ASSERT_FALSE(requires); + bool req; + ASSERT_EQ(0, ioctx.pool_requires_alignment2(&req)); + ASSERT_FALSE(req); } void RadosTestPP::TearDown() @@ -322,9 +322,9 @@ void RadosTestParamPP::SetUp() ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx)); nspace = get_temp_pool_name(); ioctx.set_namespace(nspace); - bool requires; - ASSERT_EQ(0, ioctx.pool_requires_alignment2(&requires)); - ASSERT_FALSE(requires); + bool req; + ASSERT_EQ(0, ioctx.pool_requires_alignment2(&req)); + ASSERT_FALSE(req); } void RadosTestParamPP::TearDown() @@ -373,9 +373,9 @@ void RadosTestECPP::SetUp() ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx)); nspace = get_temp_pool_name(); ioctx.set_namespace(nspace); - bool requires; - ASSERT_EQ(0, ioctx.pool_requires_alignment2(&requires)); - ASSERT_TRUE(requires); + bool req; + ASSERT_EQ(0, ioctx.pool_requires_alignment2(&req)); + ASSERT_TRUE(req); ASSERT_EQ(0, ioctx.pool_required_alignment2(&alignment)); ASSERT_NE(0U, alignment); } diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 23c2a732d64..42d1a00c035 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -2202,15 +2202,15 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, // align op_size { - bool requires; - ret = io_ctx.pool_requires_alignment2(&requires); + bool req; + ret = io_ctx.pool_requires_alignment2(&req); if (ret < 0) { cerr << "error checking pool alignment requirement" << cpp_strerror(ret) << std::endl; return 1; } - if (requires) { + if (req) { uint64_t align = 0; ret = io_ctx.pool_required_alignment2(&align); if (ret < 0) { diff --git a/src/tracing/librados.tp b/src/tracing/librados.tp index 80bb79f9ce4..e6f8ade099f 100644 --- a/src/tracing/librados.tp +++ b/src/tracing/librados.tp @@ -1230,10 +1230,10 @@ TRACEPOINT_EVENT(librados, rados_ioctx_pool_requires_alignment_enter2, TRACEPOINT_EVENT(librados, rados_ioctx_pool_requires_alignment_exit2, TP_ARGS( int, retval, - int, requires), + int, req), TP_FIELDS( ctf_integer(int, retval, retval) - ctf_integer(int, requires, requires) + ctf_integer(int, requires, req) ) )