" getxattr <obj-name> attr\n"
" setxattr <obj-name> attr val\n"
" rmxattr <obj-name> attr\n"
-" stat objname stat the named object\n"
+" stat <obj-name> stat the named object\n"
" mapext <obj-name>\n"
" rollback <obj-name> <snap-name> roll back object to snap <snap-name>\n"
"\n"
f.dump_string("error", "oi_attr_missing");
if (err.has_oi_attr_corrupted())
f.dump_string("error", "oi_attr_corrupted");
+ if (err.has_obj_size_oi_mismatch())
+ f.dump_string("error", "obj_size_oi_mismatch");
+ if (err.has_ss_attr_missing())
+ f.dump_string("error", "ss_attr_missing");
+ if (err.has_ss_attr_corrupted())
+ f.dump_string("error", "ss_attr_corrupted");
f.close_section();
}
::decode(oi, bliter); // Can't be corrupted
f.dump_stream("object_info") << oi;
}
- if (inc.has_attr_name_mismatch() || inc.has_attr_value_mismatch()) {
+ if (inc.has_attr_name_mismatch() || inc.has_attr_value_mismatch()
+ || inc.union_shards.has_oi_attr_missing()
+ || inc.union_shards.has_oi_attr_corrupted()
+ || inc.union_shards.has_ss_attr_missing()
+ || inc.union_shards.has_ss_attr_corrupted()) {
f.open_array_section("attrs");
for (auto kv : shard.attrs) {
f.open_object_section("attr");
f.open_object_section("shard");
auto& osd_shard = shard_info.first;
f.dump_int("osd", osd_shard.osd);
+ f.dump_bool("primary", shard_info.second.primary);
auto shard = osd_shard.shard;
if (shard != shard_id_t::NO_SHARD)
f.dump_unsigned("shard", shard);
usage_exit();
if (operation != OP_WRITE) {
if (block_size_specified) {
- cerr << "-b|--block_size option can be used only with `write' bench test"
+ cerr << "-b|--block_size option can be used only with 'write' bench test"
<< std::endl;
ret = -EINVAL;
goto out;
}
if (!formatter && output) {
- cerr << "-o|--output option can be used only with '--format' option"
+ cerr << "-o|--output option can only be used with '--format' option"
<< std::endl;
ret = -EINVAL;
goto out;
concurrent_ios, op_size, object_size,
max_objects, cleanup, hints, run_name, no_verify);
if (ret != 0)
- cerr << "error during benchmark: " << ret << std::endl;
+ cerr << "error during benchmark: " << cpp_strerror(ret) << std::endl;
if (formatter && output)
delete outstream;
}
RadosBencher bencher(g_ceph_context, rados, io_ctx);
ret = bencher.clean_up(prefix, concurrent_ios, run_name);
if (ret != 0)
- cerr << "error during cleanup: " << ret << std::endl;
+ cerr << "error during cleanup: " << cpp_strerror(ret) << std::endl;
}
else if (strcmp(nargs[0], "watch") == 0) {
if (!pool_name || nargs.size() < 2)
uint64_t cookie;
ret = io_ctx.watch2(oid, &cookie, &ctx);
if (ret != 0)
- cerr << "error calling watch: " << ret << std::endl;
+ cerr << "error calling watch: " << cpp_strerror(ret) << std::endl;
else {
cout << "press enter to exit..." << std::endl;
getchar();
::encode(msg, bl);
ret = io_ctx.notify2(oid, bl, 10000, &replybl);
if (ret != 0)
- cerr << "error calling notify: " << ret << std::endl;
+ cerr << "error calling notify: " << cpp_strerror(ret) << std::endl;
if (replybl.length()) {
map<pair<uint64_t,uint64_t>,bufferlist> rm;
set<pair<uint64_t,uint64_t> > missed;