" specify input or output file (for certain commands)\n"
" --create\n"
" create the pool or directory that was specified\n"
+" -N namespace\n"
+" --namespace=namespace\n"
+" specify the namespace to use for the object\n"
"\n"
"BENCH OPTIONS:\n"
" -t N\n"
bool create_pool = false;
const char *pool_name = NULL;
const char *target_pool_name = NULL;
- string oloc, target_oloc;
+ string oloc, target_oloc, nspace;
int concurrent_ios = 16;
int op_size = 1 << 22;
bool cleanup = true;
return -EINVAL;
}
}
+ i = opts.find("namespace");
+ if (i != opts.end()) {
+ nspace = i->second;
+ }
// open rados
if (oloc.size()) {
io_ctx.locator_set_key(oloc);
}
+ if (!nspace.empty()) {
+ io_ctx.set_namespace(nspace);
+ }
if (snapid != CEPH_NOSNAP) {
string name;
ret = io_ctx.snap_get_name(snapid, &name);
opts["lock-duration"] = val;
} else if (ceph_argparse_witharg(args, i, &val, "--lock-type", (char*)NULL)) {
opts["lock-type"] = val;
+ } else if (ceph_argparse_witharg(args, i, &val, "-N", "--namespace", (char*)NULL)) {
+ opts["namespace"] = val;
} else {
if (val[0] == '-')
usage_exit();