]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore: Fix incorrect use of __le16/32/64
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 2 Sep 2019 19:26:16 +0000 (21:26 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Sep 2019 08:50:04 +0000 (10:50 +0200)
Use ceph_le16/32/64 instead of __le16/32/64 (which are no-op outside
of kernel code).

Fixes (partially): https://tracker.ceph.com/issues/41605

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/bluestore_types.h

index 9a613e57d9163842c4d7c2afd30a3fa26b038989..7936db743751aa7804ac514ab84d1ef242fcfc06 100644 (file)
@@ -610,9 +610,9 @@ struct Int64ArrayMergeOperator : public KeyValueDB::MergeOperator {
     ceph_assert(llen == rlen);
     ceph_assert((rlen % 8) == 0);
     new_value->resize(rlen);
-    const __le64* lv = (const __le64*)ldata;
-    const __le64* rv = (const __le64*)rdata;
-    __le64* nv = &(__le64&)new_value->at(0);
+    const ceph_le64* lv = (const ceph_le64*)ldata;
+    const ceph_le64* rv = (const ceph_le64*)rdata;
+    ceph_le64* nv = &(ceph_le64&)new_value->at(0);
     for (size_t i = 0; i < rlen >> 3; ++i) {
       nv[i] = lv[i] + rv[i];
     }
index 10c62c00ae35f14f49283846d3bb2ea32586acf5..63f7c0fd8abf7ae67e01129f940718f0f06f9c2b 100644 (file)
@@ -758,11 +758,11 @@ public:
     case 1:
       return reinterpret_cast<const uint8_t*>(p)[i];
     case 2:
-      return reinterpret_cast<const __le16*>(p)[i];
+      return reinterpret_cast<const ceph_le16*>(p)[i];
     case 4:
-      return reinterpret_cast<const __le32*>(p)[i];
+      return reinterpret_cast<const ceph_le32*>(p)[i];
     case 8:
-      return reinterpret_cast<const __le64*>(p)[i];
+      return reinterpret_cast<const ceph_le64*>(p)[i];
     default:
       ceph_abort_msg("unrecognized csum word size");
     }