Skip to content

Commit

Permalink
Merge pull request #11788 from liewegas/wip-bluestore-blackhole
Browse files Browse the repository at this point in the history
os: make filestore_blackhole -> objectstore_blackhole
  • Loading branch information
liewegas committed Nov 4, 2016
2 parents 20c3fd8 + d7c8f2d commit 83d5df8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/common/config_opts.h
Expand Up @@ -945,6 +945,8 @@ OPTION(bdev_block_size, OPT_INT, 4096)
OPTION(bdev_nvme_unbind_from_kernel, OPT_BOOL, false)
OPTION(bdev_nvme_retry_count, OPT_INT, -1) // -1 means by default which is 4

OPTION(objectstore_blackhole, OPT_BOOL, false)

OPTION(bluefs_alloc_size, OPT_U64, 1048576)
OPTION(bluefs_max_prefetch, OPT_U64, 1048576)
OPTION(bluefs_min_log_runway, OPT_U64, 1048576) // alloc when we get this low
Expand Down
9 changes: 9 additions & 0 deletions src/os/bluestore/BlueStore.cc
Expand Up @@ -6931,6 +6931,15 @@ int BlueStore::queue_transactions(
ObjectStore::Transaction::collect_contexts(
tls, &onreadable, &ondisk, &onreadable_sync);

if (g_conf->objectstore_blackhole) {
dout(0) << __func__ << " objectstore_blackhole = TRUE, dropping transaction"
<< dendl;
delete ondisk;
delete onreadable;
delete onreadable_sync;
return 0;
}

// set up the sequencer
OpSequencer *osr;
assert(posr);
Expand Down
6 changes: 4 additions & 2 deletions src/os/filestore/FileStore.cc
Expand Up @@ -2054,8 +2054,10 @@ int FileStore::queue_transactions(Sequencer *posr, vector<Transaction>& tls,
Context *onreadable_sync;
ObjectStore::Transaction::collect_contexts(
tls, &onreadable, &ondisk, &onreadable_sync);
if (g_conf->filestore_blackhole) {
dout(0) << "queue_transactions filestore_blackhole = TRUE, dropping transaction" << dendl;

if (g_conf->objectstore_blackhole) {
dout(0) << __func__ << " objectstore_blackhole = TRUE, dropping transaction"
<< dendl;
delete ondisk;
delete onreadable;
delete onreadable_sync;
Expand Down

0 comments on commit 83d5df8

Please sign in to comment.