os/bluestore: set deferred_aggressive if initial throttle get fails

This ensures that in-progress transactions with deferred writes queue their
IO immediately.  Otherwise, we may end up waiting indefinitely.

This is a biggish hammer.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-08-03 16:37:36 -04:00
parent ca32d575eb
commit 3c6a6c46d5

View File

@ -8808,9 +8808,13 @@ int BlueStore::queue_transactions(
if (txc->deferred_txn) {
// ensure we do not block here because of deferred writes
if (!throttle_deferred_bytes.get_or_fail(txc->cost)) {
dout(10) << __func__ << " failed get throttle_deferred_bytes, aggressive"
<< dendl;
++deferred_aggressive;
deferred_submit_all();
throttle_deferred_bytes.get(txc->cost);
}
--deferred_aggressive;
}
}
utime_t tend = ceph_clock_now();