]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: check sync write error
authorYan, Zheng <zyan@redhat.com>
Mon, 8 Apr 2019 03:28:32 +0000 (11:28 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 30 Mar 2020 02:24:47 +0000 (10:24 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/client/Client.cc

index 092a799915c1eb67980df1360538e3e6edb546da..f1848124a580266882ab8a77a9f8b16f2f6cf18e 100644 (file)
@@ -9646,9 +9646,11 @@ int64_t Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf,
                       in->truncate_size, in->truncate_seq,
                       &onfinish);
     client_lock.unlock();
-    onfinish.wait();
+    r = onfinish.wait();
     client_lock.lock();
     _sync_write_commit(in);
+    if (r < 0)
+      goto done;
   }
 
   // if we get here, write was successful, update client metadata