The value must be passed, and it shouldn't be below 4k
(enforced by the command line tool already) or above the
range expressible in the header.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
return -EEXIST;
}
+ if (!order)
+ return -EINVAL;
+
+ if (*order && (*order > 255 || *order < 12)) {
+ lderr(cct) << "order must be in the range [12, 255]" << dendl;
+ return -EDOM;
+ }
+
uint64_t bid;
string dir_info = RBD_INFO;
r = rbd_assign_bid(io_ctx, dir_info, &bid);