OPTION(memstore_device_bytes, OPT_U64)
OPTION(memstore_page_set, OPT_BOOL)
OPTION(memstore_page_size, OPT_U64)
+OPTION(memstore_debug_omit_block_device_write, OPT_BOOL)
OPTION(bdev_debug_inflight_ios, OPT_BOOL)
OPTION(bdev_inject_crash, OPT_INT) // if N>0, then ~ 1/N IOs will complete before we crash on flush.
.set_default(64_K)
.set_description(""),
+ Option("memstore_debug_omit_block_device_write", Option::TYPE_BOOL, Option::LEVEL_DEV)
+ .set_default(false)
+ .add_see_also("bluestore_debug_omit_block_device_write")
+ .set_description("write metadata only"),
+
Option("objectstore_blackhole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(false)
.set_description(""),
}
}
+using ceph::common::local_conf;
+
namespace ceph::os {
using ObjectRef = boost::intrusive_ptr<Object>;
return -ENOENT;
ObjectRef o = c->get_or_create_object(oid);
- if (len > 0) {
+ if (len > 0 && !local_conf()->memstore_debug_omit_block_device_write) {
const ssize_t old_size = o->get_size();
o->write(offset, bl);
used_bytes += (o->get_size() - old_size);
ObjectRef o = c->get_object(oid);
if (!o)
return -ENOENT;
+ if (local_conf()->memstore_debug_omit_block_device_write)
+ return 0;
const ssize_t old_size = o->get_size();
int r = o->truncate(size);
used_bytes += (o->get_size() - old_size);
return -ENOENT;
ObjectRef o = c->get_or_create_object(oid);
- if (len > 0) {
+ if (len > 0 && !cct->_conf->memstore_debug_omit_block_device_write) {
const ssize_t old_size = o->get_size();
o->write(offset, bl);
used_bytes += (o->get_size() - old_size);
ObjectRef o = c->get_object(oid);
if (!o)
return -ENOENT;
+ if (cct->_conf->memstore_debug_omit_block_device_write)
+ return 0;
const ssize_t old_size = o->get_size();
int r = o->truncate(size);
used_bytes += (o->get_size() - old_size);