return 0;
}
if (ret < 0) {
- CLS_LOG(1, "ERROR: encode_list_index_key(): cls_cxx_map_get_val returned %d\n", ret);
+ CLS_LOG(1, "ERROR: encode_list_index_key(): cls_cxx_map_get_val returned %d", ret);
return ret;
}
}
}
-static string escape_str(const string& s)
+static std::string escape_str(const std::string& s)
{
int len = escape_json_attr_len(s.c_str(), s.size());
std::string escaped(len, 0);
split_key(index_key, vals);
if (vals.empty()) {
- CLS_LOG(0, "ERROR: %s(): bad index_key (%s): split_key() returned empty vals", __func__, escape_str(index_key).c_str());
+ CLS_LOG(0, "ERROR: %s: bad index_key (%s): split_key() returned empty vals", __func__, escape_str(index_key).c_str());
return -EIO;
}
++iter;
if (iter == vals.end()) {
- CLS_LOG(0, "ERROR: %s(): bad index_key (%s): no vals", __func__, escape_str(index_key).c_str());
+ CLS_LOG(0, "ERROR: %s: bad index_key (%s): no vals", __func__, escape_str(index_key).c_str());
return -EIO;
}
const char *s = val.c_str() + 1;
*ver = strict_strtoll(s, 10, &err);
if (!err.empty()) {
- CLS_LOG(0, "ERROR: %s(): bad index_key (%s): could not parse val (v=%s)", __func__, escape_str(index_key).c_str(), s);
+ CLS_LOG(0, "ERROR: %s: bad index_key (%s): could not parse val (v=%s)", __func__, escape_str(index_key).c_str(), s);
return -EIO;
}
}
int rgw_bucket_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// maximum number of calls to get_obj_vals we'll try; compromise
// between wanting to return the requested # of entries, but not
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: %s: failed to decode request\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
int rc = read_bucket_header(hctx, &new_dir.header);
if (rc < 0) {
- CLS_LOG(1, "ERROR: %s: failed to read header\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to read header", __func__);
return rc;
}
if (rc < 0) {
return rc;
}
- CLS_LOG(20, "%s: on attempt %d get_obj_vls returned %ld entries, more=%d\n",
+ CLS_LOG(20, "%s: on attempt %d get_obj_vls returned %ld entries, more=%d",
__func__, attempt, keys.size(), more);
done = keys.empty();
auto eiter = entrybl.cbegin();
decode(entry, eiter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: %s: failed to decode entry, key=%s\n",
+ CLS_LOG(1, "ERROR: %s: failed to decode entry, key=%s",
__func__, kiter->first.c_str());
return -EINVAL;
}
uint64_t ver;
int ret = decode_list_index_key(kiter->first, &key, &ver);
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s: failed to decode list index key (%s)\n",
+ CLS_LOG(0, "ERROR: %s: failed to decode list index key (%s)",
__func__, escape_str(kiter->first).c_str());
continue;
}
if (!entry.is_valid()) {
- CLS_LOG(20, "%s: entry %s[%s] is not valid\n",
+ CLS_LOG(20, "%s: entry %s[%s] is not valid",
__func__, key.name.c_str(), key.instance.c_str());
continue;
}
// filter out noncurrent versions, delete markers, and initial marker
if (!op.list_versions &&
(!entry.is_visible() || op.start_obj.name == key.name)) {
- CLS_LOG(20, "%s: entry %s[%s] is not visible\n",
+ CLS_LOG(20, "%s: entry %s[%s] is not visible",
__func__, key.name.c_str(), key.instance.c_str());
continue;
}
proxy_entry.flags = rgw_bucket_dir_entry::FLAG_COMMON_PREFIX;
name_entry_map[prefix_key] = proxy_entry;
- CLS_LOG(20, "%s: got common prefix entry %s[%s] num entries=%lu\n",
+ CLS_LOG(20, "%s: got common prefix entry %s[%s] num entries=%lu",
__func__, proxy_key.name.c_str(), proxy_key.instance.c_str(),
name_entry_map.size());
}
kiter->first != prev_omap_key) {
name_entry_map[kiter->first] = entry;
prev_omap_key = kiter->first;
- CLS_LOG(20, "%s: got object entry %s[%s] num entries=%d\n",
+ CLS_LOG(20, "%s: got object entry %s[%s] num entries=%d",
__func__, key.name.c_str(), key.instance.c_str(),
int(name_entry_map.size()));
}
if (ret.is_truncated) {
ret.marker = start_after_entry_key;
}
- CLS_LOG(20, "%s: normal exit returning %ld entries, is_truncated=%d\n",
+ CLS_LOG(20, "%s: normal exit returning %ld entries, is_truncated=%d",
__func__, ret.dir.m.size(), ret.is_truncated);
encode(ret, *out);
if (ret.is_truncated && name_entry_map.size() == 0) {
- CLS_LOG(5, "%s: returning value RGWBIAdvanceAndRetryError\n", __func__);
+ CLS_LOG(5, "%s: returning value RGWBIAdvanceAndRetryError", __func__);
return RGWBIAdvanceAndRetryError;
} else {
return 0;
try {
decode(entry, eiter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: rgw_bucket_list(): failed to decode entry, key=%s\n", kiter->first.c_str());
+ CLS_LOG(1, "ERROR: rgw_bucket_list(): failed to decode entry, key=%s", kiter->first.c_str());
return -EIO;
}
rgw_bucket_category_stats& stats = calc_header->stats[entry.meta.category];
int rgw_bucket_check_index(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
rgw_cls_check_index_ret ret;
int rc = check_index(hctx, &ret.existing_header, &ret.calculated_header);
int rgw_bucket_rebuild_index(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
rgw_bucket_dir_header existing_header;
rgw_bucket_dir_header calc_header;
int rc = check_index(hctx, &existing_header, &calc_header);
int rgw_bucket_update_stats(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_bucket_update_stats_op op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: %s(): failed to decode request\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
- CLS_LOG(1, "ERROR: %s(): failed to read header\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to read header", __func__);
return rc;
}
int rgw_bucket_init_index(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
bufferlist header_bl;
int rc = cls_cxx_map_read_header(hctx, &header_bl);
if (rc < 0) {
int rgw_bucket_set_tag_timeout(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_tag_timeout_op op;
auto iter = in->cbegin();
int rgw_bucket_prepare_op(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_obj_prepare_op op;
auto iter = in->cbegin();
return -EINVAL;
}
- CLS_LOG(1, "rgw_bucket_prepare_op(): request: op=%d name=%s instance=%s tag=%s\n",
+ CLS_LOG(1, "rgw_bucket_prepare_op(): request: op=%d name=%s instance=%s tag=%s",
op.op, op.key.name.c_str(), op.key.instance.c_str(), op.tag.c_str());
// get on-disk state
static void log_entry(const char *func, const char *str, rgw_bucket_dir_entry *entry)
{
- CLS_LOG(1, "%s(): %s: ver=%ld:%llu name=%s instance=%s locator=%s\n", func, str,
+ CLS_LOG(1, "%s: %s: ver=%ld:%llu name=%s instance=%s locator=%s", func, str,
(long)entry->ver.pool, (unsigned long long)entry->ver.epoch,
entry->key.name.c_str(), entry->key.instance.c_str(), entry->locator.c_str());
}
static void log_entry(const char *func, const char *str, rgw_bucket_olh_entry *entry)
{
- CLS_LOG(1, "%s(): %s: epoch=%llu name=%s instance=%s tag=%s\n", func, str,
+ CLS_LOG(1, "%s: %s: epoch=%llu name=%s instance=%s tag=%s", func, str,
(unsigned long long)entry->epoch, entry->key.name.c_str(), entry->key.instance.c_str(),
entry->tag.c_str());
}
try {
decode(*entry, cur_iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: %s(): failed to decode entry\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to decode entry", __func__);
return -EIO;
}
return 0;
int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_obj_complete_op op;
auto iter = in->cbegin();
CLS_LOG(1, "ERROR: rgw_bucket_complete_op(): failed to decode request\n");
return -EINVAL;
}
- CLS_LOG(1, "rgw_bucket_complete_op(): request: op=%d name=%s instance=%s ver=%lu:%llu tag=%s\n",
+ CLS_LOG(1, "rgw_bucket_complete_op(): request: op=%d name=%s instance=%s ver=%lu:%llu tag=%s",
op.op, op.key.name.c_str(), op.key.instance.c_str(),
(unsigned long)op.ver.pool, (unsigned long long)op.ver.epoch,
op.tag.c_str());
return rc;
}
- CLS_LOG(20, "rgw_bucket_complete_op(): remove_objs.size()=%d\n", (int)op.remove_objs.size());
+ CLS_LOG(20, "rgw_bucket_complete_op(): remove_objs.size()=%d", (int)op.remove_objs.size());
for (auto remove_iter = op.remove_objs.begin(); remove_iter != op.remove_objs.end(); ++remove_iter) {
cls_rgw_obj_key& remove_key = *remove_iter;
- CLS_LOG(1, "rgw_bucket_complete_op(): removing entries, read_index_entry name=%s instance=%s\n",
+ CLS_LOG(1, "rgw_bucket_complete_op(): removing entries, read_index_entry name=%s instance=%s",
remove_key.name.c_str(), remove_key.instance.c_str());
rgw_bucket_dir_entry remove_entry;
string k;
int ret = read_key_entry(hctx, remove_key, &k, &remove_entry);
if (ret < 0) {
- CLS_LOG(1, "rgw_bucket_complete_op(): removing entries, read_index_entry name=%s instance=%s ret=%d\n",
+ CLS_LOG(1, "rgw_bucket_complete_op(): removing entries, read_index_entry name=%s instance=%s ret=%d",
remove_key.name.c_str(), remove_key.instance.c_str(), ret);
continue;
}
CLS_LOG(0,
- "rgw_bucket_complete_op(): entry.name=%s entry.instance=%s entry.meta.category=%d\n",
+ "rgw_bucket_complete_op(): entry.name=%s entry.instance=%s entry.meta.category=%d",
remove_entry.key.name.c_str(),
remove_entry.key.instance.c_str(),
int(remove_entry.meta.category));
ret = cls_cxx_map_remove_key(hctx, k);
if (ret < 0) {
- CLS_LOG(1, "rgw_bucket_complete_op(): cls_cxx_map_remove_key, failed to remove entry, name=%s instance=%s read_index_entry ret=%d\n", remove_key.name.c_str(), remove_key.instance.c_str(), rc);
+ CLS_LOG(1, "rgw_bucket_complete_op(): cls_cxx_map_remove_key, failed to remove entry, name=%s instance=%s read_index_entry ret=%d", remove_key.name.c_str(), remove_key.instance.c_str(), rc);
continue;
}
}
int write(uint64_t epoch, bool current) {
if (instance_entry.versioned_epoch > 0) {
- CLS_LOG(20, "%s(): instance_entry.versioned_epoch=%d epoch=%d", __func__, (int)instance_entry.versioned_epoch, (int)epoch);
+ CLS_LOG(20, "%s: instance_entry.versioned_epoch=%d epoch=%d", __func__, (int)instance_entry.versioned_epoch, (int)epoch);
/* this instance has a previous list entry, remove that entry */
int ret = unlink_list_entry();
if (ret < 0) {
*/
static int rgw_bucket_link_olh(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
string olh_data_idx;
string instance_idx;
if (olh_found && olh.get_entry().delete_marker) {
CLS_LOG(10,
"%s: delete marker received for \"%s\" although OLH"
- " already refers to a delete marker\n",
+ " already refers to a delete marker",
__func__, escape_str(op.key.to_string()).c_str());
return -ENOENT;
}
static int rgw_bucket_unlink_instance(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
string olh_data_idx;
string instance_idx;
rgw_bucket_olh_entry& olh_entry = olh.get_entry();
cls_rgw_obj_key& olh_key = olh_entry.key;
- CLS_LOG(20, "%s(): updating olh log: existing olh entry: %s[%s] (delete_marker=%d)", __func__,
+ CLS_LOG(20, "%s: updating olh log: existing olh entry: %s[%s] (delete_marker=%d)", __func__,
olh_key.name.c_str(), olh_key.instance.c_str(), olh_entry.delete_marker);
if (olh_key == dest_key) {
return ret;
}
- CLS_LOG(20, "%s(): updating olh log: link olh -> %s[%s] (is_delete=%d)", __func__,
+ CLS_LOG(20, "%s: updating olh log: link olh -> %s[%s] (is_delete=%d)", __func__,
next_key.name.c_str(), next_key.instance.c_str(), (int)next.is_delete_marker());
olh.update(next_key, next.is_delete_marker());
static int rgw_bucket_read_olh_log(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_read_olh_log_op op;
auto iter = in->cbegin();
}
if (olh_data_entry.tag != op.olh_tag) {
- CLS_LOG(1, "NOTICE: %s(): olh_tag_mismatch olh_data_entry.tag=%s op.olh_tag=%s", __func__, olh_data_entry.tag.c_str(), op.olh_tag.c_str());
+ CLS_LOG(1, "NOTICE: %s: olh_tag_mismatch olh_data_entry.tag=%s op.olh_tag=%s", __func__, olh_data_entry.tag.c_str(), op.olh_tag.c_str());
return -ECANCELED;
}
static int rgw_bucket_trim_olh_log(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_trim_olh_log_op op;
auto iter = in->cbegin();
}
if (olh_data_entry.tag != op.olh_tag) {
- CLS_LOG(1, "NOTICE: %s(): olh_tag_mismatch olh_data_entry.tag=%s op.olh_tag=%s", __func__, olh_data_entry.tag.c_str(), op.olh_tag.c_str());
+ CLS_LOG(1, "NOTICE: %s: olh_tag_mismatch olh_data_entry.tag=%s op.olh_tag=%s", __func__, olh_data_entry.tag.c_str(), op.olh_tag.c_str());
return -ECANCELED;
}
static int rgw_bucket_clear_olh(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_bucket_clear_olh_op op;
auto iter = in->cbegin();
}
if (olh_data_entry.tag != op.olh_tag) {
- CLS_LOG(1, "NOTICE: %s(): olh_tag_mismatch olh_data_entry.tag=%s op.olh_tag=%s", __func__, olh_data_entry.tag.c_str(), op.olh_tag.c_str());
+ CLS_LOG(1, "NOTICE: %s: olh_tag_mismatch olh_data_entry.tag=%s op.olh_tag=%s", __func__, olh_data_entry.tag.c_str(), op.olh_tag.c_str());
return -ECANCELED;
}
ret = cls_cxx_map_remove_key(hctx, olh_data_key);
if (ret < 0) {
- CLS_LOG(1, "NOTICE: %s(): can't remove key %s ret=%d", __func__, olh_data_key.c_str(), ret);
+ CLS_LOG(1, "NOTICE: %s: can't remove key %s ret=%d", __func__, olh_data_key.c_str(), ret);
return ret;
}
ret = cls_cxx_map_remove_key(hctx, op.key.name);
if (ret < 0) {
- CLS_LOG(1, "NOTICE: %s(): can't remove key %s ret=%d", __func__, op.key.name.c_str(), ret);
+ CLS_LOG(1, "NOTICE: %s: can't remove key %s ret=%d", __func__, op.key.name.c_str(), ret);
return ret;
}
int rgw_dir_suggest_changes(cls_method_context_t hctx,
bufferlist *in, bufferlist *out)
{
- CLS_LOG(1, "entered %s()\n", __func__);
+ CLS_LOG(1, "entered %s", __func__);
bufferlist header_bl;
rgw_bucket_dir_header header;
}
}
- CLS_LOG(20, "cur_disk.pending_map.empty()=%d op=%d cur_disk.exists=%d cur_change.pending_map.size()=%d cur_change.exists=%d\n",
+ CLS_LOG(20, "cur_disk.pending_map.empty()=%d op=%d cur_disk.exists=%d cur_change.pending_map.size()=%d cur_change.exists=%d",
cur_disk.pending_map.empty(), (int)op, cur_disk.exists,
(int)cur_change.pending_map.size(), cur_change.exists);
if (cur_disk.pending_map.empty()) {
if (cur_disk.exists) {
rgw_bucket_category_stats& old_stats = header.stats[cur_disk.meta.category];
- CLS_LOG(10, "total_entries: %" PRId64 " -> %" PRId64 "\n", old_stats.num_entries, old_stats.num_entries - 1);
+ CLS_LOG(10, "total_entries: %" PRId64 " -> %" PRId64 "", old_stats.num_entries, old_stats.num_entries - 1);
old_stats.num_entries--;
old_stats.total_size -= cur_disk.meta.accounted_size;
old_stats.total_size_rounded -= cls_rgw_get_rounded_size(cur_disk.meta.accounted_size);
op &= CEPH_RGW_DIR_SUGGEST_OP_MASK;
switch(op) {
case CEPH_RGW_REMOVE:
- CLS_LOG(10, "CEPH_RGW_REMOVE name=%s instance=%s\n", cur_change.key.name.c_str(), cur_change.key.instance.c_str());
+ CLS_LOG(10, "CEPH_RGW_REMOVE name=%s instance=%s", cur_change.key.name.c_str(), cur_change.key.instance.c_str());
ret = cls_cxx_map_remove_key(hctx, cur_change_key);
if (ret < 0)
return ret;
ret = log_index_operation(hctx, cur_disk.key, CLS_RGW_OP_DEL, cur_disk.tag, cur_disk.meta.mtime,
cur_disk.ver, CLS_RGW_STATE_COMPLETE, header.ver, header.max_marker, 0, NULL, NULL, NULL);
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s(): failed to log operation ret=%d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: failed to log operation ret=%d", __func__, ret);
return ret;
}
}
break;
case CEPH_RGW_UPDATE:
- CLS_LOG(10, "CEPH_RGW_UPDATE name=%s instance=%s total_entries: %" PRId64 " -> %" PRId64 "\n",
+ CLS_LOG(10, "CEPH_RGW_UPDATE name=%s instance=%s total_entries: %" PRId64 " -> %" PRId64 "",
cur_change.key.name.c_str(), cur_change.key.instance.c_str(), stats.num_entries, stats.num_entries + 1);
stats.num_entries++;
ret = log_index_operation(hctx, cur_change.key, CLS_RGW_OP_ADD, cur_change.tag, cur_change.meta.mtime,
cur_change.ver, CLS_RGW_STATE_COMPLETE, header.ver, header.max_marker, 0, NULL, NULL, NULL);
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s(): failed to log operation ret=%d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: failed to log operation ret=%d", __func__, ret);
return ret;
}
}
static int rgw_obj_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_obj_remove_op op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
map<string, bufferlist> attrset;
int ret = cls_cxx_getxattrs(hctx, &attrset);
if (ret < 0 && ret != -ENOENT) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_getxattrs() returned %d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_getxattrs() returned %d", __func__, ret);
return ret;
}
}
}
- CLS_LOG(20, "%s(): removing object", __func__);
+ CLS_LOG(20, "%s: removing object", __func__);
ret = cls_cxx_remove(hctx);
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_remove returned %d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_remove returned %d", __func__, ret);
return ret;
}
ret = cls_cxx_create(hctx, false);
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_create returned %d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_create returned %d", __func__, ret);
return ret;
}
const auto& attr = aiter->first;
ret = cls_cxx_setxattr(hctx, attr.c_str(), &aiter->second);
- CLS_LOG(20, "%s(): setting attr: %s", __func__, attr.c_str());
+ CLS_LOG(20, "%s: setting attr: %s", __func__, attr.c_str());
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_setxattr (attr=%s) returned %d", __func__, attr.c_str(), ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_setxattr (attr=%s) returned %d", __func__, attr.c_str(), ret);
return ret;
}
}
static int rgw_obj_store_pg_ver(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_obj_store_pg_ver_op op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
encode(ver, bl);
int ret = cls_cxx_setxattr(hctx, op.attr.c_str(), &bl);
if (ret < 0) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_setxattr (attr=%s) returned %d", __func__, op.attr.c_str(), ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_setxattr (attr=%s) returned %d", __func__, op.attr.c_str(), ret);
return ret;
}
static int rgw_obj_check_attrs_prefix(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_obj_check_attrs_prefix op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
map<string, bufferlist> attrset;
int ret = cls_cxx_getxattrs(hctx, &attrset);
if (ret < 0 && ret != -ENOENT) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_getxattrs() returned %d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_getxattrs() returned %d", __func__, ret);
return ret;
}
static int rgw_obj_check_mtime(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_obj_check_mtime op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
real_time obj_ut;
int ret = cls_cxx_stat2(hctx, NULL, &obj_ut);
if (ret < 0 && ret != -ENOENT) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_stat() returned %d", __func__, ret);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_stat() returned %d", __func__, ret);
return ret;
}
if (ret == -ENOENT) {
static int rgw_bi_get_op(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_bi_get_op op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
encode_olh_data_key(op.key, &idx);
break;
default:
- CLS_LOG(10, "%s(): invalid key type encoding: %d",
+ CLS_LOG(10, "%s: invalid key type encoding: %d",
__func__, int(op.type));
return -EINVAL;
}
int r = cls_cxx_map_get_val(hctx, idx, &entry.data);
if (r < 0) {
- CLS_LOG(10, "%s(): cls_cxx_map_get_val() returned %d", __func__, r);
+ CLS_LOG(10, "%s: cls_cxx_map_get_val() returned %d", __func__, r);
return r;
}
static int rgw_bi_put_op(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_bi_put_op op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
int r = cls_cxx_map_set_val(hctx, entry.idx, &entry.data);
if (r < 0) {
- CLS_LOG(0, "ERROR: %s(): cls_cxx_map_set_val() returned r=%d", __func__, r);
+ CLS_LOG(0, "ERROR: %s: cls_cxx_map_set_val() returned r=%d", __func__, r);
}
return 0;
bool& end_key_reached,
bool& more)
{
+ CLS_LOG(10, "Entered %s: name_filter=\"%s\", start_after_key=\"%s\", end_key=\"%s\", max=%d",
+ __func__, escape_str(name_filter).c_str(), escape_str(start_after_key).c_str(),
+ escape_str(end_key).c_str(), max);
int count = 0;
std::map<std::string, bufferlist> raw_entries;
int ret = cls_cxx_map_get_vals(hctx, start_after_key, name_filter, max,
&raw_entries, &more);
+ CLS_LOG(20, "%s: cls_cxx_map_get_vals ret=%d, raw_entries.size()=%lu, more=%d",
+ __func__, ret, raw_entries.size(), more);
if (ret < 0) {
return ret;
}
end_key_reached = false;
for (auto iter : raw_entries) {
if (!end_key.empty() && iter.first >= end_key) {
+ CLS_LOG(20, "%s: end key reached at \"%s\"",
+ __func__, escape_str(iter.first).c_str());
end_key_reached = true;
more = false;
return count;
bool* pmore,
const PlainEntriesRegion region = PlainEntriesRegion::Both)
{
+ CLS_LOG(10, "entered %s: name_filter=\"%s\", marker=\"%s\", max=%d, region=%d",
+ __func__, escape_str(name_filter).c_str(), escape_str(marker).c_str(), max, static_cast<int>(region));
int r = 0;
bool end_key_reached = false;
bool more = false;
// listing ascii plain namespace
int r = list_plain_entries_help(hctx, name_filter, marker, BI_PREFIX_BEGIN, max,
entries, end_key_reached, more);
+ CLS_LOG(20, "%s: first list_plain_entries_help r=%d, end_key_reached=%d, more=%d",
+ __func__, r, end_key_reached, more);
if (r < 0) {
return r;
}
// listing non-ascii plain namespace
r = list_plain_entries_help(hctx, name_filter, start_after_key, {}, max,
entries, end_key_reached, more);
+ CLS_LOG(20, "%s: second list_plain_entries_help r=%d, end_key_reached=%d, more=%d",
+ __func__, r, end_key_reached, more);
if (r < 0) {
return r;
}
if (max > 0) {
ret = cls_cxx_map_get_vals(hctx, start_after_key, string(), max,
&keys, pmore);
- CLS_LOG(20, "%s(): start_after_key=%s first_instance_idx=%s keys.size()=%d",
+ CLS_LOG(20, "%s: start_after_key=\"%s\" first_instance_idx=\"%s\" keys.size()=%d",
__func__, escape_str(start_after_key).c_str(),
escape_str(first_instance_idx).c_str(), (int)keys.size());
if (ret < 0) {
return count;
}
- CLS_LOG(20, "%s(): entry.idx=%s", __func__, escape_str(entry.idx).c_str());
+ CLS_LOG(20, "%s: entry.idx=\"%s\"", __func__, escape_str(entry.idx).c_str());
auto biter = entry.data.cbegin();
try {
decode(e, biter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode buffer (size=%d)", __func__, entry.data.length());
+ CLS_LOG(0, "ERROR: %s: failed to decode buffer (size=%d)", __func__, entry.data.length());
return -EIO;
}
if (max > 0) {
ret = cls_cxx_map_get_vals(hctx, start_after_key, string(), max,
&keys, pmore);
- CLS_LOG(20, "%s(): start_after_key=%s first_instance_idx=%s keys.size()=%d",
+ CLS_LOG(20, "%s: start_after_key=\"%s\", first_instance_idx=\"%s\", keys.size()=%d",
__func__, escape_str(start_after_key).c_str(),
escape_str(first_instance_idx).c_str(), (int)keys.size());
if (ret < 0) {
return count;
}
- CLS_LOG(20, "%s(): entry.idx=%s", __func__, escape_str(entry.idx).c_str());
+ CLS_LOG(20, "%s: entry.idx=\"%s\"", __func__, escape_str(entry.idx).c_str());
auto biter = entry.data.cbegin();
try {
decode(e, biter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode buffer (size=%d)", __func__, entry.data.length());
+ CLS_LOG(0, "ERROR: %s: failed to decode buffer (size=%d)", __func__, entry.data.length());
return -EIO;
}
bufferlist *in,
bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
// decode request
rgw_cls_bi_list_op op;
auto iter = in->cbegin();
try {
decode(op, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: %s(): failed to decode request", __func__);
+ CLS_LOG(0, "ERROR: %s: failed to decode request", __func__);
return -EINVAL;
}
constexpr uint32_t MAX_BI_LIST_ENTRIES = 1000;
const uint32_t max = std::min(op.max, MAX_BI_LIST_ENTRIES);
+ CLS_LOG(20, "%s: op.marker=\"%s\", op.name_filter=\"%s\", op.max=%u max=%u",
+ __func__, escape_str(op.marker).c_str(), escape_str(op.name_filter).c_str(),
+ op.max, max);
int ret;
uint32_t count = 0;
}
count = ret;
- CLS_LOG(20, "found %d plain ascii (low) entries", count);
+ CLS_LOG(20, "%s: found %d plain ascii (low) entries, count=%u", __func__, ret, count);
if (!more) {
ret = list_instance_entries(hctx, op.name_filter, op.marker, max - count, &op_ret.entries, &more);
}
count += ret;
+ CLS_LOG(20, "%s: found %d instance entries, count=%u", __func__, ret, count);
}
if (!more) {
}
count += ret;
+ CLS_LOG(20, "%s: found %d olh entries, count=%u", __func__, ret, count);
}
if (!more) {
}
count += ret;
- CLS_LOG(20, "found %d non-ascii (high) plain entries", count);
+ CLS_LOG(20, "%s: found %d non-ascii (high) plain entries, count=%u", __func__, ret, count);
}
op_ret.is_truncated = (count > max) || more;
count--;
}
+ CLS_LOG(20, "%s: returning %lu entries, is_truncated=%d", __func__, op_ret.entries.size(), op_ret.is_truncated);
encode(op_ret, *out);
return 0;
end_key.append(end_marker);
}
- CLS_LOG(10, "bi_log_iterate_entries start_after_key=%s end_key=%s\n",
+ CLS_LOG(10, "bi_log_iterate_entries start_after_key=%s end_key=%s",
start_after_key.c_str(), end_key.c_str());
string filter;
const string& key = iter->first;
rgw_bi_log_entry e;
- CLS_LOG(10, "bi_log_iterate_entries key=%s bl.length=%d\n", key.c_str(), (int)iter->second.length());
+ CLS_LOG(10, "bi_log_iterate_entries key=%s bl.length=%d", key.c_str(), (int)iter->second.length());
if (key.compare(end_key) > 0) {
key_iter = key;
static int rgw_bi_log_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_bi_log_list_op op;
static int rgw_bi_log_trim(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_bi_log_trim_op op;
static int rgw_bi_log_resync(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
static int rgw_bi_log_stop(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
int rgw_user_usage_log_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
rgw_cls_usage_log_add_op op;
usage_record_name_by_time(entry.epoch, puser->to_str(), entry.bucket, key_by_time);
- CLS_LOG(10, "rgw_user_usage_log_add user=%s bucket=%s\n", puser->to_str().c_str(), entry.bucket.c_str());
+ CLS_LOG(10, "rgw_user_usage_log_add user=%s bucket=%s", puser->to_str().c_str(), entry.bucket.c_str());
bufferlist record_bl;
int ret = cls_cxx_map_get_val(hctx, key_by_time, &record_bl);
if (ret < 0 && ret != -ENOENT) {
- CLS_LOG(1, "ERROR: rgw_user_usage_log_add(): cls_cxx_map_read_key returned %d\n", ret);
+ CLS_LOG(1, "ERROR: rgw_user_usage_log_add(): cls_cxx_map_read_key returned %d", ret);
return -EINVAL;
}
if (ret >= 0) {
int (*cb)(cls_method_context_t, const string&, rgw_usage_log_entry&, void *),
void *param)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
map<string, bufferlist> keys;
string filter_prefix;
int rgw_user_usage_log_read(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
rgw_cls_usage_log_read_op op;
int rgw_user_usage_log_trim(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
/* only continue if object exists! */
int ret = cls_cxx_stat(hctx, NULL, NULL);
int rgw_usage_log_clear(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
int ret = cls_cxx_map_clear(hctx);
/* if object doesn't exist all the logs are cleared anyway */
get_time_key(old_info.time, &key);
ret = gc_omap_remove(hctx, GC_OBJ_TIME_INDEX, key);
if (ret < 0 && ret != -ENOENT) {
- CLS_LOG(0, "ERROR: failed to remove key=%s\n", key.c_str());
+ CLS_LOG(0, "ERROR: failed to remove key=%s", key.c_str());
return ret;
}
}
done_err:
- CLS_LOG(0, "ERROR: gc_set_entry error info.tag=%s, ret=%d\n",
+ CLS_LOG(0, "ERROR: gc_set_entry error info.tag=%s, ret=%d",
info.tag.c_str(), ret);
gc_omap_remove(hctx, GC_OBJ_NAME_INDEX, info.tag);
static int rgw_cls_gc_set_entry(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_gc_set_entry_op op;
static int rgw_cls_gc_defer_entry(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_gc_defer_entry_op op;
get_time_key(now, &now_str);
prepend_index_prefix(now_str, GC_OBJ_TIME_INDEX, &end_key);
- CLS_LOG(10, "gc_iterate_entries end_key=%s\n", end_key.c_str());
+ CLS_LOG(10, "gc_iterate_entries end_key=%s", end_key.c_str());
}
string filter;
const string& key = iter->first;
cls_rgw_gc_obj_info e;
- CLS_LOG(10, "gc_iterate_entries key=%s\n", key.c_str());
+ CLS_LOG(10, "gc_iterate_entries key=%s", key.c_str());
if (!end_key.empty() && key.compare(end_key) >= 0) {
if (truncated)
static int rgw_cls_gc_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_gc_list_op op;
cls_rgw_gc_obj_info info;
int ret = gc_omap_get(hctx, GC_OBJ_NAME_INDEX, tag, &info);
if (ret == -ENOENT) {
- CLS_LOG(0, "couldn't find tag in name index tag=%s\n", tag.c_str());
+ CLS_LOG(0, "couldn't find tag in name index tag=%s", tag.c_str());
continue;
}
if (ret < 0 && ret != -ENOENT)
return ret;
if (ret == -ENOENT) {
- CLS_LOG(0, "couldn't find key in time index key=%s\n", time_key.c_str());
+ CLS_LOG(0, "couldn't find key in time index key=%s", time_key.c_str());
}
ret = gc_omap_remove(hctx, GC_OBJ_NAME_INDEX, tag);
static int rgw_cls_gc_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_gc_remove_op op;
static int rgw_cls_lc_get_entry(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_lc_get_entry_op op;
static int rgw_cls_lc_set_entry(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_lc_set_entry_op op;
static int rgw_cls_lc_rm_entry(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_lc_rm_entry_op op;
static int rgw_cls_lc_get_next_entry(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_lc_get_next_entry_ret op_ret;
cls_rgw_lc_get_next_entry_op op;
static int rgw_cls_lc_list_entries(cls_method_context_t hctx, bufferlist *in,
bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
cls_rgw_lc_list_entries_op op;
auto in_iter = in->cbegin();
try {
static int rgw_cls_lc_put_head(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_lc_put_head_op op;
static int rgw_cls_lc_get_head(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
bufferlist bl;
int ret = cls_cxx_map_read_header(hctx, &bl);
if (ret < 0)
try {
decode(head, iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(0, "ERROR: rgw_cls_lc_get_head(): failed to decode entry %s\n",err.what());
+ CLS_LOG(0, "ERROR: rgw_cls_lc_get_head(): failed to decode entry %s",err.what());
return -EINVAL;
}
} else {
static int rgw_reshard_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_reshard_add_op op;
static int rgw_reshard_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
cls_rgw_reshard_list_op op;
auto in_iter = in->cbegin();
try {
static int rgw_reshard_get(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_reshard_get_op op;
static int rgw_reshard_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
auto in_iter = in->cbegin();
cls_rgw_reshard_remove_op op;
static int rgw_set_bucket_resharding(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
cls_rgw_set_bucket_resharding_op op;
auto in_iter = in->cbegin();
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
- CLS_LOG(1, "ERROR: %s(): failed to read header\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to read header", __func__);
return rc;
}
static int rgw_clear_bucket_resharding(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
cls_rgw_clear_bucket_resharding_op op;
auto in_iter = in->cbegin();
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
- CLS_LOG(1, "ERROR: %s(): failed to read header\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to read header", __func__);
return rc;
}
header.new_instance.clear();
static int rgw_guard_bucket_resharding(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
cls_rgw_guard_bucket_resharding_op op;
auto in_iter = in->cbegin();
try {
decode(op, in_iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: %s(): failed to decode entry\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to decode entry", __func__);
return -EINVAL;
}
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
- CLS_LOG(1, "ERROR: %s(): failed to read header\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to read header", __func__);
return rc;
}
static int rgw_get_bucket_resharding(cls_method_context_t hctx,
bufferlist *in, bufferlist *out)
{
- CLS_LOG(10, "entered %s()\n", __func__);
+ CLS_LOG(10, "entered %s", __func__);
cls_rgw_get_bucket_resharding_op op;
auto in_iter = in->cbegin();
try {
decode(op, in_iter);
} catch (ceph::buffer::error& err) {
- CLS_LOG(1, "ERROR: %s(): failed to decode entry\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to decode entry", __func__);
return -EINVAL;
}
rgw_bucket_dir_header header;
int rc = read_bucket_header(hctx, &header);
if (rc < 0) {
- CLS_LOG(1, "ERROR: %s(): failed to read header\n", __func__);
+ CLS_LOG(1, "ERROR: %s: failed to read header", __func__);
return rc;
}