flags:
- create
with_legacy: false
+- name: bluestore_write_v2
+ type: bool
+ level: advanced
+ desc: Use faster write path
+ long_desc: Original write path was developed over long time by constantly adding features.
+ The price was layered inefficiencies gained along the way.
+ Rework of write path done from scratch clears it and optimizes for typical cases.
+ Write_v2 is necessary for recompression feature.
+ default: false
+ flags:
+ - startup
+ with_legacy: false
- name: bluestore_allocator
type: str
level: advanced
return r;
}
}
-
+ use_write_v2 = cct->_conf.get_val<bool>("bluestore_write_v2");
_kv_only = false;
if (cct->_conf->bluestore_fsck_on_mount) {
int rc = fsck(cct->_conf->bluestore_fsck_on_mount_deep);
r = -E2BIG;
} else {
_assign_nid(txc, o);
- r = _do_write(txc, c, o, offset, length, bl, fadvise_flags);
+ if (use_write_v2) {
+ r = _do_write_v2(txc, c, o, offset, length, bl, fadvise_flags);
+ } else {
+ r = _do_write(txc, c, o, offset, length, bl, fadvise_flags);
+ }
txc->write_onode(o);
}
auto finish = mono_clock::now();
std::numeric_limits<decltype(min_alloc_size)>::digits,
"not enough bits for min_alloc_size");
bool elastic_shared_blobs = false; ///< use smart ExtentMap::dup to reduce shared blob count
+ bool use_write_v2 = false; ///< use new write path
enum {
// Please preserve the order since it's DB persistent