From: Yan, Zheng Date: Mon, 8 Apr 2019 03:28:32 +0000 (+0800) Subject: client: check sync write error X-Git-Tag: wip-pdonnell-testing-20200918.022351~1627^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2cf6184e41f8364f79fb3adda737f21c9ee149f6;p=ceph-ci.git client: check sync write error Signed-off-by: "Yan, Zheng" --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 092a799915c..f1848124a58 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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