From: Kefu Chai Date: Thu, 2 Apr 2020 04:22:54 +0000 (+0800) Subject: librbd/cache: undefine dout_subsys before defining it X-Git-Tag: wip-pdonnell-testing-20200918.022351~1639^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0a86c8f6bef4cae3bfdedc678c2a286262e269ca;p=ceph-ci.git librbd/cache: undefine dout_subsys before defining it otherwise we could have following warning from compiler ``` In file included from ../src/test/librbd/cache/test_mock_ReplicatedWriteLog.cc:42: ../src/librbd/cache/ImageWriteback.cc:13: warning: "dout_subsys" redefined 13 | #define dout_subsys ceph_subsys_rbd | In file included from ../src/test/librbd/cache/test_mock_ReplicatedWriteLog.cc:39: ../src/librbd/cache/ReplicatedWriteLog.cc:23: note: this is the location of the previous definition 23 | #define dout_subsys ceph_subsys_rbd_rwl | In file included from ../src/test/librbd/cache/test_mock_ReplicatedWriteLog.cc:43: ../src/librbd/cache/rwl/ImageCacheState.cc:12: warning: "dout_subsys" redefined 12 | #define dout_subsys ceph_subsys_rbd_rwl | In file included from ../src/test/librbd/cache/test_mock_ReplicatedWriteLog.cc:42: ../src/librbd/cache/ImageWriteback.cc:13: note: this is the location of the previous definition 13 | #define dout_subsys ceph_subsys_rbd | ``` Signed-off-by: Kefu Chai --- diff --git a/src/librbd/cache/ImageWriteback.cc b/src/librbd/cache/ImageWriteback.cc index 909691a2a80..102d02943a4 100644 --- a/src/librbd/cache/ImageWriteback.cc +++ b/src/librbd/cache/ImageWriteback.cc @@ -10,6 +10,7 @@ #include "librbd/io/ImageRequest.h" #include "librbd/io/ReadResult.h" +#undef dout_subsys #define dout_subsys ceph_subsys_rbd #undef dout_prefix #define dout_prefix *_dout << "librbd::ImageWriteback: " << __func__ << ": " diff --git a/src/librbd/cache/ReplicatedWriteLog.cc b/src/librbd/cache/ReplicatedWriteLog.cc index 51d789e31f1..2a827454e7d 100644 --- a/src/librbd/cache/ReplicatedWriteLog.cc +++ b/src/librbd/cache/ReplicatedWriteLog.cc @@ -20,6 +20,7 @@ #include #include +#undef dout_subsys #define dout_subsys ceph_subsys_rbd_rwl #undef dout_prefix #define dout_prefix *_dout << "librbd::cache::ReplicatedWriteLog: " << this << " " \ diff --git a/src/librbd/cache/rwl/ImageCacheState.cc b/src/librbd/cache/rwl/ImageCacheState.cc index dcf1d7e7901..7a449733db1 100644 --- a/src/librbd/cache/rwl/ImageCacheState.cc +++ b/src/librbd/cache/rwl/ImageCacheState.cc @@ -9,6 +9,7 @@ #include "common/config_proxy.h" #include "common/ceph_json.h" +#undef dout_subsys #define dout_subsys ceph_subsys_rbd_rwl #undef dout_prefix #define dout_prefix *_dout << "librbd::cache::rwl::ImageCacheState: " << this << " " \