'Check whether the given rbd volume has extents.
Return True if has extents, otherwise False.'

def _rbd_has_extents(self, rbd_volume):

    extents = []
    def iter_cb(offset, length, exists):
        if exists:
            extents.append(length)
    rbd_volume.diff_iterate(0, rbd_volume.size(), None, iter_cb)
    if extents:
        LOG.debug('RBD    has    %s    extents', sum(extents))
        return True
    return False
