]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: synchronous block_writes should return possible error result
authorJason Dillaman <dillaman@redhat.com>
Thu, 28 Apr 2016 16:42:49 +0000 (12:42 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 28 Apr 2016 17:00:04 +0000 (13:00 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/AioImageRequestWQ.cc
src/librbd/AioImageRequestWQ.h

index 97c6fa4cda0b13e8516b485f366db5b9e72a8c5a..5ed3e2e8428d9c8a0e432f235b2e7dab6e287e6d 100644 (file)
@@ -231,10 +231,10 @@ bool AioImageRequestWQ::is_lock_request_needed() const {
           (m_require_lock_on_read && m_queued_reads.read() > 0));
 }
 
-void AioImageRequestWQ::block_writes() {
+int AioImageRequestWQ::block_writes() {
   C_SaferCond cond_ctx;
   block_writes(&cond_ctx);
-  cond_ctx.wait();
+  return cond_ctx.wait();
 }
 
 void AioImageRequestWQ::block_writes(Context *on_blocked) {
index e21aa860f67bc23de138e0db69b26c0192fa2425..74b8438e7253ad84ea2cb28612f5a997f1d4cd65 100644 (file)
@@ -46,7 +46,7 @@ public:
     return (m_write_blockers > 0);
   }
 
-  void block_writes();
+  int block_writes();
   void block_writes(Context *on_blocked);
   void unblock_writes();