]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: do not call allocator's release on empty set 47730/head
authorIgor Fedotov <ifedotov@suse.com>
Tue, 23 Aug 2022 17:21:48 +0000 (20:21 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Mon, 19 Dec 2022 08:39:47 +0000 (11:39 +0300)
Signed-off-by: Igor Fedotov <ifedotov@croit.io>
src/os/bluestore/BlueStore.cc

index 33d1d9983087c282e6d02932c440331c57613f2e..33eb0943c0a21d75b03be7cf600fe0c9b9dc8f21 100644 (file)
@@ -13055,7 +13055,8 @@ void BlueStore::_txc_release_alloc(TransContext *txc)
 {
   bool discard_queued = false;
   // it's expected we're called with lazy_release_lock already taken!
-  if (unlikely(cct->_conf->bluestore_debug_no_reuse_blocks)) {
+  if (unlikely(cct->_conf->bluestore_debug_no_reuse_blocks ||
+               txc->released.size() == 0)) {
       goto out;
   }
   discard_queued = bdev->try_discard(txc->released);