long long bench_io_size = 4096, bench_io_threads = 16, bench_bytes = 1 << 30;
string bench_pattern = "seq";
bool diff_whole_object = false;
+ bool input_feature = false;
std::string val, parse_err;
std::ostringstream err;
resize_allow_shrink = true;
} else if (ceph_argparse_witharg(args, i, &val, "--image-feature", (char *)NULL)) {
uint64_t feature;
+ input_feature = true;
if (!decode_feature(val.c_str(), &feature)) {
cerr << "rbd: invalid image feature: " << val << std::endl;
return EXIT_FAILURE;
cerr << "rbd: using --image-features for specifying the rbd image format is"
<< " deprecated, use --image-feature instead" << std::endl;
features = strict_strtol(val.c_str(), 10, &parse_err);
+ input_feature = true;
if (!parse_err.empty()) {
cerr << "rbd: error parsing --image-features: " << parse_err
<< std::endl;
break;
case OPT_CREATE:
+ if (input_feature && (format == 1)){
+ cerr << "feature not allowed with format 1; use --image-format 2" << std::endl;
+ return EINVAL;
+ }
r = do_create(rbd, io_ctx, imgname, size, &order, format, features,
stripe_unit, stripe_count);
if (r < 0) {