]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: cleanup debug log messages
authorJason Dillaman <dillaman@redhat.com>
Thu, 24 Mar 2016 16:07:49 +0000 (12:07 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 29 Mar 2016 19:19:25 +0000 (15:19 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/image_replayer/CloseImageRequest.cc
src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc
src/tools/rbd_mirror/image_sync/ImageCopyRequest.cc
src/tools/rbd_mirror/image_sync/ObjectCopyRequest.cc
src/tools/rbd_mirror/image_sync/SnapshotCopyRequest.cc
src/tools/rbd_mirror/image_sync/SyncPointCreateRequest.cc
src/tools/rbd_mirror/image_sync/SyncPointPruneRequest.cc

index a2a39a6c94d4ee408101c5575b80fe0fbd957977..247c6299c68dd7b45d4e6adea86a2b369b44d738 100644 (file)
@@ -51,7 +51,7 @@ void CloseImageRequest<I>::handle_close_image(int r) {
   dout(20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    derr << "error encountered while closing image: " << cpp_strerror(r)
+    derr << "error encountered while closing image: " << cpp_strerror(r)
          << dendl;
   }
 
index 4bdb85285ff96840710b99b2e1ec7f1e8aa59380..9367ed6dfa96c4274fe88bdd5e5150abbe6ae477 100644 (file)
@@ -101,7 +101,7 @@ void OpenLocalImageRequest<I>::handle_open_image(int r) {
   dout(20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    derr << "failed to open image '" << m_local_image_id << "': "
+    derr << "failed to open image '" << m_local_image_id << "': "
          << cpp_strerror(r) << dendl;
     send_close_image(true, r);
     return;
@@ -119,7 +119,7 @@ void OpenLocalImageRequest<I>::send_lock_image() {
 
   RWLock::RLocker owner_locker((*m_local_image_ctx)->owner_lock);
   if ((*m_local_image_ctx)->exclusive_lock == nullptr) {
-    derr << "image does not support exclusive lock" << dendl;
+    derr << "image does not support exclusive lock" << dendl;
     send_close_image(false, -EINVAL);
     return;
   }
@@ -128,7 +128,7 @@ void OpenLocalImageRequest<I>::send_lock_image() {
   bool tag_owner;
   int r = Journal::is_tag_owner(*m_local_image_ctx, &tag_owner);
   if (r < 0) {
-    derr << "failed to query journal: " << cpp_strerror(r) << dendl;
+    derr << "failed to query journal: " << cpp_strerror(r) << dendl;
     send_close_image(false, r);
     return;
   }
@@ -136,7 +136,7 @@ void OpenLocalImageRequest<I>::send_lock_image() {
   // if the local image owns the tag -- don't steal the lock since
   // we aren't going to mirror peer data into this image anyway
   if (tag_owner) {
-    dout(10) << "local image is primary -- skipping image replay" << dendl;
+    dout(10) << "local image is primary -- skipping image replay" << dendl;
     send_close_image(false, -EREMOTEIO);
     return;
   }
@@ -153,13 +153,13 @@ void OpenLocalImageRequest<I>::handle_lock_image(int r) {
   dout(20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    derr << "failed to lock image '" << m_local_image_id << "': "
+    derr << "failed to lock image '" << m_local_image_id << "': "
        << cpp_strerror(r) << dendl;
     send_close_image(false, r);
     return;
   } else if ((*m_local_image_ctx)->exclusive_lock == nullptr ||
              !(*m_local_image_ctx)->exclusive_lock->is_lock_owner()) {
-    derr << "image is not locked" << dendl;
+    derr << "image is not locked" << dendl;
     send_close_image(false, -EBUSY);
     return;
   }
index e22eb5f3158c796eb933380cfc6df7aba71988b2..f627f17cca24bcb82713adc652492647d2532659 100644 (file)
@@ -96,7 +96,8 @@ void ImageCopyRequest<I>::handle_update_max_object_count(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to update client data: " << cpp_strerror(r) << dendl;
+    lderr(cct) << ": failed to update client data: " << cpp_strerror(r)
+               << dendl;
     finish(r);
     return;
   }
@@ -171,7 +172,7 @@ void ImageCopyRequest<I>::handle_object_copy(int r) {
     --m_current_ops;
 
     if (r < 0) {
-      lderr(cct) << "object copy failed: " << cpp_strerror(r) << dendl;
+      lderr(cct) << "object copy failed: " << cpp_strerror(r) << dendl;
       if (m_ret_val == 0) {
         m_ret_val = r;
       }
@@ -221,7 +222,8 @@ void ImageCopyRequest<I>::handle_flush_sync_point(int r) {
   if (r < 0) {
     *m_client_meta = m_client_meta_copy;
 
-    lderr(cct) << "failed to update client data: " << cpp_strerror(r) << dendl;
+    lderr(cct) << ": failed to update client data: " << cpp_strerror(r)
+               << dendl;
     finish(r);
     return;
   }
@@ -248,7 +250,7 @@ int ImageCopyRequest<I>::compute_snap_map() {
     RWLock::RLocker snap_locker(m_remote_image_ctx->snap_lock);
     snap_id_end = m_remote_image_ctx->get_snap_id(m_sync_point->snap_name);
     if (snap_id_end == CEPH_NOSNAP) {
-      lderr(cct) << "failed to locate snapshot: "
+      lderr(cct) << "failed to locate snapshot: "
                  << m_sync_point->snap_name << dendl;
       return -ENOENT;
     }
@@ -257,7 +259,7 @@ int ImageCopyRequest<I>::compute_snap_map() {
       snap_id_start = m_remote_image_ctx->get_snap_id(
         m_sync_point->from_snap_name);
       if (snap_id_start == CEPH_NOSNAP) {
-        lderr(cct) << "failed to locate from snapshot: "
+        lderr(cct) << "failed to locate from snapshot: "
                    << m_sync_point->from_snap_name << dendl;
         return -ENOENT;
       }
@@ -278,7 +280,7 @@ int ImageCopyRequest<I>::compute_snap_map() {
   }
 
   if (m_snap_map.empty()) {
-    lderr(cct) << "failed to map snapshots within boundary" << dendl;
+    lderr(cct) << "failed to map snapshots within boundary" << dendl;
     return -EINVAL;
   }
 
index c49beed2f101b924562c67c6ada4842c88b0030e..7cf12923df5a8f9fbdc0645594f490f6a6003d1e 100644 (file)
@@ -74,7 +74,7 @@ void ObjectCopyRequest<I>::handle_list_snaps(int r) {
     return;
   }
   if (r < 0) {
-    lderr(cct) << "failed to list snaps: " << cpp_strerror(r) << dendl;
+    lderr(cct) << "failed to list snaps: " << cpp_strerror(r) << dendl;
     finish(r);
     return;
   }
@@ -142,7 +142,7 @@ void ObjectCopyRequest<I>::handle_read_object(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to read from remote object: " << cpp_strerror(r)
+    lderr(cct) << "failed to read from remote object: " << cpp_strerror(r)
                << dendl;
     finish(r);
     return;
@@ -208,7 +208,7 @@ void ObjectCopyRequest<I>::handle_write_object(int r) {
     r = 0;
   }
   if (r < 0) {
-    lderr(cct) << "failed to write to local object: " << cpp_strerror(r)
+    lderr(cct) << "failed to write to local object: " << cpp_strerror(r)
                << dendl;
     finish(r);
     return;
index 63202bcc7a00698f20bb8bd705f652ecd39fb3c3..53dc1e3844f1b95bed39e4ab9c4556466ef05930 100644 (file)
@@ -73,7 +73,7 @@ void SnapshotCopyRequest<I>::send_snap_remove() {
                      [](const std::pair<librados::snap_t, librbd::SnapInfo>& pair) {
             return pair.second.parent.spec.pool_id != -1;
           }) != m_remote_image_ctx->snap_info.end()) {
-      lderr(cct) << "cloned images are not currentl supported" << dendl;
+      lderr(cct) << ": cloned images are not currently supported" << dendl;
       finish(-EINVAL);
       return;
     }
@@ -118,7 +118,7 @@ void SnapshotCopyRequest<I>::handle_snap_remove(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to remove snapshot '" << m_snap_name << "': "
+    lderr(cct) << "failed to remove snapshot '" << m_snap_name << "': "
                << cpp_strerror(r) << dendl;
     finish(r);
     return;
@@ -168,7 +168,7 @@ void SnapshotCopyRequest<I>::handle_snap_create(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to create snapshot '" << m_snap_name << "': "
+    lderr(cct) << "failed to create snapshot '" << m_snap_name << "': "
                << cpp_strerror(r) << dendl;
     finish(r);
     return;
@@ -215,7 +215,8 @@ void SnapshotCopyRequest<I>::handle_update_client(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to update client data: " << cpp_strerror(r) << dendl;
+    lderr(cct) << ": failed to update client data: " << cpp_strerror(r)
+               << dendl;
     finish(r);
     return;
   }
index 74460498d690d39638dc95dc61a5649312a95693..589f532fd2c296b5fcf8f1644a09077cff58ddd3 100644 (file)
@@ -79,7 +79,8 @@ void SyncPointCreateRequest<I>::handle_update_client(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to update client data: " << cpp_strerror(r) << dendl;
+    lderr(cct) << ": failed to update client data: " << cpp_strerror(r)
+               << dendl;
     finish(r);
     return;
   }
@@ -107,7 +108,7 @@ void SyncPointCreateRequest<I>::handle_refresh_image(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "remote image refresh failed: " << cpp_strerror(r) << dendl;
+    lderr(cct) << "remote image refresh failed: " << cpp_strerror(r) << dendl;
     finish(r);
     return;
   }
@@ -138,7 +139,7 @@ void SyncPointCreateRequest<I>::handle_create_snap(int r) {
     send_update_client();
     return;
   } else if (r < 0) {
-    lderr(cct) << "failed to create snapshot: " << cpp_strerror(r) << dendl;
+    lderr(cct) << "failed to create snapshot: " << cpp_strerror(r) << dendl;
     finish(r);
     return;
   }
index 6c653e4a47301a09f26dc70dd218effc5fc93ceb..4b72bc26ee8f3f07cb665fb15ce067e479796b22 100644 (file)
@@ -113,7 +113,7 @@ void SyncPointPruneRequest<I>::handle_remove_snap(int r) {
     r = 0;
   }
   if (r < 0) {
-    lderr(cct) << "failed to remove snapshot '" << snap_name << "': "
+    lderr(cct) << "failed to remove snapshot '" << snap_name << "': "
                << cpp_strerror(r) << dendl;
     finish(r);
     return;
@@ -139,7 +139,7 @@ void SyncPointPruneRequest<I>::handle_refresh_image(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "remote image refresh failed: " << cpp_strerror(r) << dendl;
+    lderr(cct) << "remote image refresh failed: " << cpp_strerror(r) << dendl;
     finish(r);
     return;
   }
@@ -176,7 +176,8 @@ void SyncPointPruneRequest<I>::handle_update_client(int r) {
   ldout(cct, 20) << ": r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to update client data: " << cpp_strerror(r) << dendl;
+    lderr(cct) << ": failed to update client data: " << cpp_strerror(r)
+               << dendl;
     finish(r);
     return;
   }