OPTION(osd_max_omap_entries_per_request, OPT_U64)
OPTION(osd_max_omap_bytes_per_request, OPT_U64)
+OPTION(osd_max_write_op_reply_len, OPT_U64)
OPTION(osd_objectstore, OPT_STR) // ObjectStore backend type
OPTION(osd_objectstore_tracing, OPT_BOOL) // true if LTTng-UST tracepoints should be enabled
.set_default(1_G)
.set_description(""),
+ Option("osd_max_write_op_reply_len", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
+ .set_default(32)
+ .set_description("Max size of the per-op payload for requests with the RETURNVEC flag set")
+ .set_long_description("This value caps the amount of data (per op; a request may have many ops) that will be sent back to the client and recorded in the PG log."),
+
Option("osd_objectstore", Option::TYPE_STR, Option::LEVEL_ADVANCED)
.set_default("bluestore")
.set_enum_allowed({"bluestore", "filestore", "memstore", "kstore"})
// successful update
if (ctx->op->allows_returnvec()) {
// enforce reasonable bound on the return buffer sizes
-#warning write me
+ for (auto& i : *ctx->ops) {
+ if (i.outdata.length() > cct->_conf->osd_max_write_op_reply_len) {
+ dout(10) << __func__ << " op " << i << " outdata overflow" << dendl;
+ result = -EOVERFLOW; // overall result is overflow
+ i.rval = -EOVERFLOW;
+ i.outdata.clear();
+ }
+ }
} else {
// legacy behavior -- zero result and return data etc.
ignore_out_data = true;