]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix clone_range
authorSage Weil <sage.weil@dreamhost.com>
Mon, 21 Feb 2011 04:55:49 +0000 (20:55 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Mon, 21 Feb 2011 04:58:16 +0000 (20:58 -0800)
This was broken by the safe_write() switchover; the success return value
is now 0, not the number of bytes written.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/FileStore.cc

index 3f4528004e6c0ca33ab8cb0ef1c60b731ab606c7..dd4181885dffd0fc1446c72aab74fa5292e1d60c 100644 (file)
@@ -2353,7 +2353,7 @@ int FileStore::_do_clone_range(int from, int to, uint64_t off, uint64_t len)
             << ", " << cpp_strerror(r) << dendl;
        break;
       }
-      op += r2;
+      op += (r-op);
     }
     if (r < 0)
       break;