From: Josh Durgin Date: Thu, 24 Oct 2013 15:18:19 +0000 (-0700) Subject: cls_log: always return final marker from log_list X-Git-Tag: v0.72-rc1~20^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e74776f4176470122485a79a4c07e9c12c9fc036;p=ceph.git cls_log: always return final marker from log_list There's no reason to restrict returning the marker to the case where less than the whole log is returned, since there's already a truncated flag to tell the client what happened. Giving the client the last marker makes it easy to consume when the log entries do not contain their own marker. If the last marker is not returned, the client cannot get the last marker without racing with updates to the log. Backport: dumpling Signed-off-by: Josh Durgin --- diff --git a/src/cls/log/cls_log.cc b/src/cls/log/cls_log.cc index 46ba357480c5d..7b254fdbea548 100644 --- a/src/cls/log/cls_log.cc +++ b/src/cls/log/cls_log.cc @@ -211,9 +211,8 @@ static int cls_log_list(cls_method_context_t hctx, bufferlist *in, bufferlist *o if (iter == keys.end()) done = true; - else - ret.marker = marker; + ret.marker = marker; ret.truncated = !done; ::encode(ret, *out);