]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_rados: sanitize dout print in GWRados::get_obj_iterate_cb(...)
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 6 Jan 2017 20:16:32 +0000 (15:16 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 13 Jan 2017 17:13:51 +0000 (12:13 -0500)
We cannot assume pbl may be deferenced.  Per review, move the dout
print into the r < 0 condition--since it's now an error, make it's
trace level 0.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit c0233c4abb9f99304e3d82272bbb4385086bbfc0)

src/rgw/rgw_rados.cc

index c971d345d6cf4be9bf29750456352137ab4a15f9..4f7af0f4785eada203efe323cecedfc0687d6e66 100644 (file)
@@ -1,4 +1,3 @@
-
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
@@ -9907,9 +9906,10 @@ int RGWRados::get_obj_iterate_cb(RGWObjectCtx *ctx, RGWObjState *astate,
   io_ctx.locator_set_key(key);
 
   r = io_ctx.aio_operate(oid, c, &op, NULL);
-  ldout(cct, 20) << "rados->aio_operate r=" << r << " bl.length=" << pbl->length() << dendl;
-  if (r < 0)
-    goto done_err;
+  if (r < 0) {
+       ldout(cct, 0) << "rados->aio_operate r=" << r << dendl;
+       goto done_err;
+  }
 
   // Flush data to client if there is any
   r = flush_read_list(d);