]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix typo in deep_copy::ObjectCopyRequest::compute_read_ops 27049/head
authorMykola Golub <mgolub@suse.com>
Tue, 19 Mar 2019 12:04:23 +0000 (12:04 +0000)
committerMykola Golub <mgolub@suse.com>
Tue, 19 Mar 2019 12:04:23 +0000 (12:04 +0000)
The second arg for interval_set insert method is the inserting
interval lenth, while the end position was provided. It still
worked correctly, because the end position value is always larger
than the truncated length.

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/librbd/deep_copy/ObjectCopyRequest.cc

index 2f1332cdcae5a8cdee8c117c67d5725f73033c2c..b223f678872c1a0d907c0c98d4262dc9acaaef00 100644 (file)
@@ -628,7 +628,7 @@ void ObjectCopyRequest<I>::compute_read_ops() {
       // clip diff to size of object (in case it was truncated)
       if (end_size < prev_end_size) {
         interval_set<uint64_t> trunc;
-        trunc.insert(end_size, prev_end_size);
+        trunc.insert(end_size, prev_end_size - end_size);
         trunc.intersection_of(diff);
         diff.subtract(trunc);
         ldout(m_cct, 20) << "clearing truncate diff: " << trunc << dendl;