]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add bluestore_debug_no_reuse_blocks
authorSage Weil <sage@redhat.com>
Tue, 22 Dec 2015 19:03:33 +0000 (14:03 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:24 +0000 (13:07 -0500)
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 <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc

index e4b87f6fdd496f953e4863bda5bec180868bd8fe..b548b073d123b66b6887486a08dfe3c5590a45ce 100644 (file)
@@ -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)
index b400c9d9f9d61aae30ba0614fcdadae988ad2e63..da190ae486e67c24dd49411f1a2d447f03ac78ae 100644 (file)
@@ -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<bluestore_extent_t> bluefs_gift_extents;