From 3d6cde017aebaf2c46d2ee57f3dc3ead564baf9e Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 27 Aug 2015 14:21:05 -0400 Subject: [PATCH] librbd: possible unit test race condition It's possible during unit tests for the requests to complete prior to marking the Context as complete. In this case, the Context will fire while locks are being held. Signed-off-by: Jason Dillaman --- src/librbd/operation/TrimRequest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/operation/TrimRequest.cc b/src/librbd/operation/TrimRequest.cc index d29f2018b7f5..71b1546ef6d2 100644 --- a/src/librbd/operation/TrimRequest.cc +++ b/src/librbd/operation/TrimRequest.cc @@ -330,7 +330,7 @@ void TrimRequest::send_clean_boundary() { extents); ContextCompletion *completion = - new ContextCompletion(create_callback_context(), true); + new ContextCompletion(create_async_callback_context(), true); for (vector::iterator p = extents.begin(); p != extents.end(); ++p) { ldout(cct, 20) << " ex " << *p << dendl; -- 2.47.3