summaryrefslogtreecommitdiffstats
path: root/src/ceph/0004-librbd-fix-lookup-object-return.patch
diff options
context:
space:
mode:
authorQiaowei Ren <qiaowei.ren@intel.com>2018-09-11 10:54:20 +0800
committerQiaowei Ren <qiaowei.ren@intel.com>2018-09-11 10:54:20 +0800
commitd65e22d27ab305d38059046dae60d7a66ff4a4e0 (patch)
treed0bd06459534ef33d0b930f6c164c4501bd527d7 /src/ceph/0004-librbd-fix-lookup-object-return.patch
parent828acdd1d5c5c2aeef287aa69e473bf44fcbce70 (diff)
ceph: shared persistent read-only rbd cache
This patch introduces introduces RBD shared persistent RO cache which can provide client-side sharing cache for rbd clone/snapshot case. Change-Id: Icad8063f4f10b1ab4ce31920e90d5affa7d0abdc Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com> Signed-off-by: Dehao Shang <dehao.shang@intel.com> Signed-off-by: Tushar Gohad <tushar.gohad@intel.com> Signed-off-by: Jason Dillaman <dillaman@redhat.com> Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
Diffstat (limited to 'src/ceph/0004-librbd-fix-lookup-object-return.patch')
-rw-r--r--src/ceph/0004-librbd-fix-lookup-object-return.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/ceph/0004-librbd-fix-lookup-object-return.patch b/src/ceph/0004-librbd-fix-lookup-object-return.patch
new file mode 100644
index 0000000..0a2e2eb
--- /dev/null
+++ b/src/ceph/0004-librbd-fix-lookup-object-return.patch
@@ -0,0 +1,45 @@
+From 779ef67e6a401ad569c5d3d3a076352db8ad0f67 Mon Sep 17 00:00:00 2001
+From: Yuan Zhou <yuan.zhou@intel.com>
+Date: Mon, 6 Aug 2018 15:47:23 +0800
+Subject: [PATCH 04/10] librbd: fix lookup object return
+
+Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
+---
+ src/tools/rbd_cache/CacheControllerSocketClient.hpp | 7 ++++++-
+ src/tools/rbd_cache/CacheControllerSocketCommon.h | 2 +-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools/rbd_cache/CacheControllerSocketClient.hpp b/src/tools/rbd_cache/CacheControllerSocketClient.hpp
+index 57be78e..4e1f36c 100644
+--- a/src/tools/rbd_cache/CacheControllerSocketClient.hpp
++++ b/src/tools/rbd_cache/CacheControllerSocketClient.hpp
+@@ -99,7 +99,12 @@ public:
+ boost::asio::transfer_exactly(544),
+ [this, result](const boost::system::error_code& err, size_t cb) {
+ if (!err) {
+- *result = true;
++ rbdsc_req_type_t *io_ctx = (rbdsc_req_type_t*)(buffer_);
++ if (io_ctx->type == RBDSC_READ_REPLY) {
++ *result = true;
++ } else {
++ *result = false;
++ }
+ cv.notify_one();
+ m_client_process_msg(std::string(buffer_, cb));
+ } else {
+diff --git a/src/tools/rbd_cache/CacheControllerSocketCommon.h b/src/tools/rbd_cache/CacheControllerSocketCommon.h
+index ab89155..a9d73a8 100644
+--- a/src/tools/rbd_cache/CacheControllerSocketCommon.h
++++ b/src/tools/rbd_cache/CacheControllerSocketCommon.h
+@@ -10,7 +10,7 @@
+ #define RBDSC_REGISTER_REPLY 0X14
+ #define RBDSC_READ_REPLY 0X15
+ #define RBDSC_LOOKUP_REPLY 0X16
+-#define RBDSC_READ_RADOS 0X16
++#define RBDSC_READ_RADOS 0X17
+
+ namespace rbd {
+ namespace cache {
+--
+2.7.4
+