[Pkg-ceph-commits] [ceph] 16/59: d/p/rgw-migrate-atomic_t-to-std_atomic.patch: Cherry pick fix for 32 bit casting issues in RGW.

James Downing Page jamespage at moszumanska.debian.org
Thu Feb 1 15:27:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

jamespage pushed a commit to branch ubuntu/artful
in repository ceph.

commit 40884f4ffbb4959f1b49d1b329592172bba79751
Author: James Page <james.page at ubuntu.com>
Date:   Wed Jun 14 12:58:47 2017 +0000

    d/p/rgw-migrate-atomic_t-to-std_atomic.patch: Cherry pick fix for 32 bit casting issues in RGW.
---
 debian/changelog                                   |  2 +
 .../rgw-migrate-atomic_t-to-std_atomic.patch       | 94 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 97 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cf212e3..8547678 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ ceph (12.0.3-0ubuntu1) UNRELEASED; urgency=medium
       d/p/0002-core-local-array-type-conversions.patch,
       d/p/0003-Core-local-statistics.patch: Cherry pick rocksdb commits
       to resolve compatibility with gcc-6 on i386.
+    - d/p/rgw-migrate-atomic_t-to-std_atomic.patch: Cherry pick fix
+      for 32 bit casting issues in RGW.
 
  -- James Page <james.page at ubuntu.com>  Fri, 26 May 2017 09:42:42 +0000
 
diff --git a/debian/patches/rgw-migrate-atomic_t-to-std_atomic.patch b/debian/patches/rgw-migrate-atomic_t-to-std_atomic.patch
new file mode 100644
index 0000000..23f2437
--- /dev/null
+++ b/debian/patches/rgw-migrate-atomic_t-to-std_atomic.patch
@@ -0,0 +1,94 @@
+From ec4f4c8a64202827c968128fcb83591e959854cf Mon Sep 17 00:00:00 2001
+From: Jesse Williamson <jwilliamson at suse.de>
+Date: Wed, 26 Apr 2017 05:26:38 -0700
+Subject: [PATCH] rgw: migrate atomic_t to std::atomic<>
+
+Signed-off-by: Jesse Williamson <jwilliamson at suse.de>
+---
+ src/rgw/rgw_loadgen_process.cc    |  4 ++--
+ src/rgw/rgw_object_expirer_core.h | 10 ++++------
+ src/rgw/rgw_process.h             |  2 +-
+ src/rgw/rgw_request.h             |  4 ++--
+ 4 files changed, 9 insertions(+), 11 deletions(-)
+
+diff --git a/src/rgw/rgw_loadgen_process.cc b/src/rgw/rgw_loadgen_process.cc
+index 23e6fefca73e..fef37f805bac 100644
+--- a/src/rgw/rgw_loadgen_process.cc
++++ b/src/rgw/rgw_loadgen_process.cc
+@@ -39,7 +39,7 @@ void RGWLoadGenProcess::run()
+ 
+   vector<string> buckets(num_buckets);
+ 
+-  std::atomic<long int> failed = { 0 };
++  std::atomic<bool> failed = { false };
+ 
+   for (i = 0; i < num_buckets; i++) {
+     buckets[i] = "/loadgen";
+@@ -104,7 +104,7 @@ void RGWLoadGenProcess::run()
+ 
+ void RGWLoadGenProcess::gen_request(const string& method,
+ 				    const string& resource,
+-				    int content_length, std::atomic<long int>* fail_flag)
++				    int content_length, std::atomic<bool>* fail_flag)
+ {
+   RGWLoadGenRequest* req =
+     new RGWLoadGenRequest(store->get_new_req_id(), method, resource,
+diff --git a/src/rgw/rgw_object_expirer_core.h b/src/rgw/rgw_object_expirer_core.h
+index 6fe8d1410bff..813eca3f939a 100644
+--- a/src/rgw/rgw_object_expirer_core.h
++++ b/src/rgw/rgw_object_expirer_core.h
+@@ -4,11 +4,11 @@
+ #ifndef CEPH_OBJEXP_H
+ #define CEPH_OBJEXP_H
+ 
+-#include <errno.h>
+-#include <iostream>
+-#include <sstream>
+-#include <string>
+ #include <atomic>
++#include <string>
++#include <cerrno>
++#include <sstream>
++#include <iostream>
+ 
+ #include "auth/Crypto.h"
+ 
+@@ -38,8 +38,6 @@
+ #include "rgw_usage.h"
+ #include "rgw_replica_log.h"
+ 
+-#include <atomic>
+-
+ class RGWObjectExpirer {
+ protected:
+   RGWRados *store;
+diff --git a/src/rgw/rgw_process.h b/src/rgw/rgw_process.h
+index 005f2db6fef7..3aaeaff61afb 100644
+--- a/src/rgw/rgw_process.h
++++ b/src/rgw/rgw_process.h
+@@ -184,7 +184,7 @@ class RGWLoadGenProcess : public RGWProcess {
+   void checkpoint();
+   void handle_request(RGWRequest* req) override;
+   void gen_request(const string& method, const string& resource,
+-		  int content_length, std::atomic<int64_t>* fail_flag);
++		  int content_length, std::atomic<bool>* fail_flag);
+ 
+   void set_access_key(RGWAccessKey& key) { access_key = key; }
+ };
+diff --git a/src/rgw/rgw_request.h b/src/rgw/rgw_request.h
+index 3c835f7b1c94..11345bb0d230 100644
+--- a/src/rgw/rgw_request.h
++++ b/src/rgw/rgw_request.h
+@@ -59,10 +59,10 @@ struct RGWLoadGenRequest : public RGWRequest {
+ 	string method;
+ 	string resource;
+ 	int content_length;
+-	std::atomic<int64_t>* fail_flag = nullptr;
++	std::atomic<bool>* fail_flag = nullptr;
+ 
+ RGWLoadGenRequest(uint64_t req_id, const string& _m, const  string& _r, int _cl,
+-		std::atomic<int64_t> *ff)
++		std::atomic<bool> *ff)
+ 	: RGWRequest(req_id), method(_m), resource(_r), content_length(_cl),
+ 		fail_flag(ff) {}
+ };
diff --git a/debian/patches/series b/debian/patches/series
index 41d9bfc..7a2292e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ i386-build-fixes.patch
 0001-CoreLocalArray-class.patch
 0002-core-local-array-type-conversions.patch
 0003-Core-local-statistics.patch
+rgw-migrate-atomic_t-to-std_atomic.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list