]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: don't insert zero length extents in a diff
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 1 Apr 2013 06:07:39 +0000 (23:07 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 1 Apr 2013 15:56:07 +0000 (08:56 -0700)
They're useless, and trigger an assert in interval_set::inesrt.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librados/snap_set_diff.cc

index 08a45e15931f9a5cedc5b7dabebf6986db845697..60cfec6f8103cc4cf311ae51f85dee9fe24d4e4e 100644 (file)
@@ -54,7 +54,8 @@ void calc_snap_set_diff(CephContext *cct, const librados::snap_set_t& snap_set,
       if (start < a) {
        ldout(cct, 20) << "  start, after " << start << dendl;
        // this means the object didn't exist at start
-       diff->insert(0, r->size);
+       if (r->size)
+         diff->insert(0, r->size);
        start_size = 0;
       } else {
        ldout(cct, 20) << "  start" << dendl;