]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/tools/rbd/action/Create.cc
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / tools / rbd / action / Create.cc
index 5a168d9bc268b4f879415c737a91ecb5afb0eef8..99efa0b50ad2b1eea65b57d93216ac32a1065a1c 100644 (file)
@@ -151,6 +151,9 @@ int write_data(librbd::Image &image, librbd::ImageOptions &opts,
       }
       ++i;
       off += tpw.chunk_size;
+      if(off > image_size) {
+        off = image_size;
+      }
       pc.update_progress(off, image_size);
     }
   }