]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: extra request required if journal enabled w/ caching
authorJason Dillaman <dillaman@redhat.com>
Fri, 18 Dec 2015 18:14:58 +0000 (13:14 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 18 Dec 2015 18:14:58 +0000 (13:14 -0500)
Fixes: #14108
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/AioImageRequest.cc

index f0c3228119c6b614590285e841e4b967531db3a7..45627e0c0a55a9a06b0d606b067a40745be00fc0 100644 (file)
@@ -375,7 +375,7 @@ uint64_t AioImageDiscard::append_journal_event(
 
 uint32_t AioImageDiscard::get_cache_request_count(bool journaling) const {
   // extra completion request is required for tracking journal commit
-  return (journaling ? 1 : 0);
+  return (m_image_ctx.object_cacher != nullptr && journaling ? 1 : 0);
 }
 
 void AioImageDiscard::send_cache_requests(const ObjectExtents &object_extents,