From 662cda684a8f7ed1651fee91a39331f5f684106e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 15 Nov 2016 15:31:35 -0500 Subject: [PATCH] os/bluestore: prevent sync_submit if there is unstable io for this osr If this txc or any txc that precedes it has unstable IO we cannot queue our kv transaction without a bdev sync. Currently such a sync is only triggered from the kv_sync_thread, so we need to do this kv submission async. Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index b1f35184a130..ce753fbb89fb 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6234,6 +6234,9 @@ void BlueStore::_txc_state_proc(TransContext *txc) // sequencer that is committing serially it is possible to keep // submitting new transactions fast enough that we get stuck doing // so. the alternative is to block here... fixme? + } else if (txc->osr->txc_with_unstable_io) { + dout(20) << __func__ << " prior txc(s) with unstable ios " + << txc->osr->txc_with_unstable_io.load() << dendl; } else if (g_conf->bluestore_debug_randomize_serial_transaction && rand() % g_conf->bluestore_debug_randomize_serial_transaction == 0) { -- 2.47.3