]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/cache: undefine dout_subsys before defining it
authorKefu Chai <kchai@redhat.com>
Thu, 2 Apr 2020 04:22:54 +0000 (12:22 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 3 Apr 2020 05:07:51 +0000 (13:07 +0800)
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 <kchai@redhat.com>
src/librbd/cache/ImageWriteback.cc
src/librbd/cache/ReplicatedWriteLog.cc
src/librbd/cache/rwl/ImageCacheState.cc

index 909691a2a804726b6ddd29bc31f3c38ab9dc7b04..102d02943a41708eeb99aa3a72978282dcff99ef 100644 (file)
@@ -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__ << ": "
index 51d789e31f1faeed3004bf1c1cff4b18bd737113..2a827454e7dbfd22ec85588522d41514f3f2fd02 100644 (file)
@@ -20,6 +20,7 @@
 #include <map>
 #include <vector>
 
+#undef dout_subsys
 #define dout_subsys ceph_subsys_rbd_rwl
 #undef dout_prefix
 #define dout_prefix *_dout << "librbd::cache::ReplicatedWriteLog: " << this << " " \
index dcf1d7e7901be6355f7fc1e977203998d9278752..7a449733db14ac7fd78358485786b186f4adac8b 100644 (file)
@@ -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 << " " \