From: Samuel Just Date: Wed, 10 Apr 2013 21:55:13 +0000 (-0700) Subject: FileStore::_do_copy_range: read(2) might return EINTR X-Git-Tag: v0.61~136^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=016e975ab969a9e656cbce7ebd658efd58fcfd50;p=ceph.git FileStore::_do_copy_range: read(2) might return EINTR Signed-off-by: Samuel Just --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 52e14a286c0d..16ae21a700cd 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -3194,10 +3194,14 @@ int FileStore::_do_copy_range(int from, int to, uint64_t srcoff, uint64_t len, u r = ::read(from, buf, l); dout(25) << " read from " << pos << "~" << l << " got " << r << dendl; if (r < 0) { - r = -errno; - derr << "FileStore::_do_copy_range: read error at " << pos << "~" << len - << ", " << cpp_strerror(r) << dendl; - break; + if (errno == EINTR) { + continue; + } else { + r = -errno; + derr << "FileStore::_do_copy_range: read error at " << pos << "~" << len + << ", " << cpp_strerror(r) << dendl; + break; + } } if (r == 0) { // hrm, bad source range, wtf.