]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/fifo: Don't error in the log if we're being probed for existence
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 26 Jan 2021 17:24:41 +0000 (12:24 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 29 Mar 2021 16:25:58 +0000 (12:25 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/cls/fifo/cls_fifo.cc

index db936078e8c3da8b1e65437c10623fe0a692407f..fc89a20e6b2bfd310e65757f7dc617d4229e9e7c 100644 (file)
@@ -162,7 +162,7 @@ int write_part_header(cls_method_context_t hctx,
 
 int read_header(cls_method_context_t hctx,
                std::optional<objv> objv,
-               info* info)
+               info* info, bool get_info = false)
 {
   std::uint64_t size;
 
@@ -180,7 +180,11 @@ int read_header(cls_method_context_t hctx,
   }
 
   if (r == 0) {
-    CLS_ERR("ERROR: %s: Zero length object, returning ENODATA", __PRETTY_FUNCTION__);
+    if (get_info) {
+      CLS_LOG(5, "%s: Zero length object, likely probe, returning ENODATA", __PRETTY_FUNCTION__);
+    } else {
+      CLS_ERR("ERROR: %s: Zero length object, returning ENODATA", __PRETTY_FUNCTION__);
+    }
     return -ENODATA;
   }
 
@@ -366,7 +370,7 @@ int get_meta(cls_method_context_t hctx, ceph::buffer::list* in,
   }
 
   op::get_meta_reply reply;
-  int r = read_header(hctx, op.version, &reply.info);
+  int r = read_header(hctx, op.version, &reply.info, true);
   if (r < 0) {
     return r;
   }