1 From 779ef67e6a401ad569c5d3d3a076352db8ad0f67 Mon Sep 17 00:00:00 2001
2 From: Yuan Zhou <yuan.zhou@intel.com>
3 Date: Mon, 6 Aug 2018 15:47:23 +0800
4 Subject: [PATCH 04/10] librbd: fix lookup object return
6 Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
8 src/tools/rbd_cache/CacheControllerSocketClient.hpp | 7 ++++++-
9 src/tools/rbd_cache/CacheControllerSocketCommon.h | 2 +-
10 2 files changed, 7 insertions(+), 2 deletions(-)
12 diff --git a/src/tools/rbd_cache/CacheControllerSocketClient.hpp b/src/tools/rbd_cache/CacheControllerSocketClient.hpp
13 index 57be78e..4e1f36c 100644
14 --- a/src/tools/rbd_cache/CacheControllerSocketClient.hpp
15 +++ b/src/tools/rbd_cache/CacheControllerSocketClient.hpp
16 @@ -99,7 +99,12 @@ public:
17 boost::asio::transfer_exactly(544),
18 [this, result](const boost::system::error_code& err, size_t cb) {
21 + rbdsc_req_type_t *io_ctx = (rbdsc_req_type_t*)(buffer_);
22 + if (io_ctx->type == RBDSC_READ_REPLY) {
28 m_client_process_msg(std::string(buffer_, cb));
30 diff --git a/src/tools/rbd_cache/CacheControllerSocketCommon.h b/src/tools/rbd_cache/CacheControllerSocketCommon.h
31 index ab89155..a9d73a8 100644
32 --- a/src/tools/rbd_cache/CacheControllerSocketCommon.h
33 +++ b/src/tools/rbd_cache/CacheControllerSocketCommon.h
35 #define RBDSC_REGISTER_REPLY 0X14
36 #define RBDSC_READ_REPLY 0X15
37 #define RBDSC_LOOKUP_REPLY 0X16
38 -#define RBDSC_READ_RADOS 0X16
39 +#define RBDSC_READ_RADOS 0X17