From: Ulrich Weigand Date: Wed, 18 Sep 2019 11:34:57 +0000 (+0200) Subject: crimson: Clean up endian handling X-Git-Tag: v15.1.0~1477^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ac9b370ad6614ff2815bcbfd89d8e4d72799851e;p=ceph-ci.git crimson: Clean up endian handling Replace remaining uses of __le16/__le32/__le64 in contexts that are not relevant to code generation. Also, remove unnecessary calls to le16/32/64_to_cpu. This change is a no-op on all architectures. Signed-off-by: Ulrich Weigand --- diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc index 74baefc60c8..d10db3f7f69 100644 --- a/src/crimson/net/ProtocolV2.cc +++ b/src/crimson/net/ProtocolV2.cc @@ -512,7 +512,7 @@ seastar::future ProtocolV2::banner_exchange() INTERCEPT_CUSTOM(custom_bp_t::BANNER_WRITE, bp_type_t::WRITE); return write_flush(std::move(bl)).then([this] { // 2. read peer banner - unsigned banner_len = strlen(CEPH_BANNER_V2_PREFIX) + sizeof(__le16); + unsigned banner_len = strlen(CEPH_BANNER_V2_PREFIX) + sizeof(ceph_le16); INTERCEPT_CUSTOM(custom_bp_t::BANNER_READ, bp_type_t::READ); return read_exactly(banner_len); // or read exactly? }).then([this] (auto bl) { diff --git a/src/crimson/osd/pg_backend.cc b/src/crimson/osd/pg_backend.cc index 211151f7739..63d4475ac3f 100644 --- a/src/crimson/osd/pg_backend.cc +++ b/src/crimson/osd/pg_backend.cc @@ -360,8 +360,8 @@ seastar::future<> PGBackend::create( const OSDOp& osd_op, ceph::os::Transaction& txn) { - const int flags = le32_to_cpu(osd_op.op.flags); - if (os.exists && !os.oi.is_whiteout() && (flags & CEPH_OSD_OP_FLAG_EXCL)) { + if (os.exists && !os.oi.is_whiteout() && + (osd_op.op.flags & CEPH_OSD_OP_FLAG_EXCL)) { // this is an exclusive create throw ceph::osd::make_error(-EEXIST); }