From: Sage Weil Date: Tue, 22 Dec 2015 19:03:33 +0000 (-0500) Subject: os/bluestore: add bluestore_debug_no_reuse_blocks X-Git-Tag: v10.0.3~154^2~78 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2f9be0cc804ec7ae3036fb062d4c06cd6ff49930;p=ceph.git os/bluestore: add bluestore_debug_no_reuse_blocks This makes debugging a bit easier because we never use the same extent of the disk twice, leaving useful evidence behind. Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index e4b87f6fdd49..b548b073d123 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -886,6 +886,7 @@ OPTION(bluestore_overlay_max, OPT_INT, 0) OPTION(bluestore_open_by_handle, OPT_BOOL, true) OPTION(bluestore_o_direct, OPT_BOOL, true) OPTION(bluestore_debug_misc, OPT_BOOL, false) +OPTION(bluestore_debug_no_reuse_blocks, OPT_BOOL, false) OPTION(kstore_max_ops, OPT_U64, 512) OPTION(kstore_max_bytes, OPT_U64, 64*1024*1024) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index b400c9d9f9d6..da190ae486e6 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3322,7 +3322,8 @@ void BlueStore::_kv_sync_thread() ++p) { dout(20) << __func__ << " release " << p.get_start() << "~" << p.get_len() << dendl; - alloc->release(p.get_start(), p.get_len()); + if (!g_conf->bluestore_debug_no_reuse_blocks) + alloc->release(p.get_start(), p.get_len()); } vector bluefs_gift_extents;