cerr << "rbd: " << err.str() << std::endl;
return EXIT_FAILURE;
}
+ if ((order <= 0) || (order < 12) || (order > 25)) {
+ cerr << "rbd: order must be between 12 (4 KB) and 25 (32 MB)" << std::endl;
+ return EXIT_FAILURE;
+ }
} else if (ceph_argparse_witharg(args, i, &bench_io_size, &err, "--io-size", (char*)NULL)) {
if (!err.str().empty()) {
cerr << "rbd: " << err.str() << std::endl;
}
if (opt_cmd == OPT_CREATE || opt_cmd == OPT_CLONE || opt_cmd == OPT_IMPORT) {
- if (order && (order < 12 || order > 25)) {
- cerr << "rbd: order must be between 12 (4 KB) and 25 (32 MB)"
- << std::endl;
- return EINVAL;
- }
if ((stripe_unit && !stripe_count) || (!stripe_unit && stripe_count)) {
cerr << "must specify both (or neither) of stripe-unit and stripe-count"
<< std::endl;