From 4a2575783a050f27b22b7bfe4364520bf29fc6a5 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 26 Jan 2021 12:24:41 -0500 Subject: [PATCH] cls/fifo: Don't error in the log if we're being probed for existence Signed-off-by: Adam C. Emerson --- src/cls/fifo/cls_fifo.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cls/fifo/cls_fifo.cc b/src/cls/fifo/cls_fifo.cc index db936078e8c3d..fc89a20e6b2bf 100644 --- a/src/cls/fifo/cls_fifo.cc +++ b/src/cls/fifo/cls_fifo.cc @@ -162,7 +162,7 @@ int write_part_header(cls_method_context_t hctx, int read_header(cls_method_context_t hctx, std::optional 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; } -- 2.39.5